GNOME Bugzilla – Bug 703530
Proposals for the Fix of selection mode
Last modified: 2015-03-18 19:57:00 UTC
the header bar is about 1 pixel thinner in normal mode when compared with selection mode. This height fluctuations are introduced since libgd port to Gtk corresponding widget. also observed in gnome-clocks((. any suggestions how to fix it? further refs: https://bugzilla.gnome.org/show_bug.cgi?id=701981 and https://bugzilla.gnome.org/show_bug.cgi?id=701980 since the header bar port menu appearing in selection mode has lost DOWN_ARROW, when selection mode is launched several times. This is fixed in the patch proposal. According to the discussion with Paolo and Allan the single action in selection mode in this case "delete-button" should be on the right hand side. please see https://bugzilla.gnome.org/show_bug.cgi?id=699913. This is fixed in the patch proposal. According to Allan the close button should not appear in selection mode. This is incorporated in the patch proposal. (it's implemented so in gnome-clocks)
*** Bug 703531 has been marked as a duplicate of this bug. ***
Created attachment 248298 [details] [review] patch proposal for the selectin mode ui rework
sorry for a double pack, bugzilla were not responding.
Moreover, i believe that the delete button should not be sensitive in the case there is nothing to delete. I forgot to mention, that I hit a strange issue that even once I set a sensitive property for a button to false on the first launch of the application it is still sensitive. however, it does not matter where I set the sensitive property to false, even if I do it in the code right behind the line 138 this._deleteButton = builder.get_object('delete-button'); with this._deleteButton.set_sensitive (false); it still appears sensitive. only on the first launch of the selection mode, however. can any one reproduce it? i do not understand it. is it a bug in my code, in gnome-weather, in gtk+ or in gjs
Review of attachment 248298 [details] [review]: Just a style nit. ::: src/window.js @@ +166,3 @@ + GObject.BindingFlags.INVERT_BOOLEAN); + iconView.bind_property('selection-mode', closeButton, 'visible', + GObject.BindingFlags.INVERT_BOOLEAN); I disagree with this choice, but if this is the designed way, ok. @@ +195,3 @@ + this._selectionMenuButtonLabel.set_label(label); + this._deleteButton.set_sensitive (sensitive); Don't use the function call syntax, use a property assignment.
(In reply to comment #4) > Moreover, i believe that the delete button should not be sensitive in the case > there is nothing to delete. > > I forgot to mention, that I hit a strange issue that even once I set a > sensitive property for a button to false on the first launch of the application > it is still sensitive. > > however, it does not matter where I set the sensitive property to false, even > if I do it in the code right behind the line 138 this._deleteButton = > builder.get_object('delete-button'); > with this._deleteButton.set_sensitive (false); it still appears sensitive. > only on the first launch of the selection mode, however. > can any one reproduce it? > i do not understand it. is it a bug in my code, in gnome-weather, in gtk+ or in > gjs Right, the delete button is an actionable button, so you should change it's sensitivity directly. Rather, change the enabled property on the right GAction.
(In reply to comment #0) > the header bar is about 1 pixel thinner in normal mode when compared with > selection mode. This height fluctuations are introduced since libgd port to Gtk > corresponding widget. also observed in gnome-clocks((. any suggestions how to > fix it? further refs: https://bugzilla.gnome.org/show_bug.cgi?id=701981 and > https://bugzilla.gnome.org/show_bug.cgi?id=701980 What do you think about this part?
Created attachment 249477 [details] [review] patch proposal for the selectin mode ui rework so for now I set sensitive of the deletebutton to false here _setSelectionMode: function(action, param) { this._worldView.iconView.selection_mode = param.get_boolean(); this._deleteButton.sensitive = false; },
(In reply to comment #5) > Review of attachment 248298 [details] [review]: > > Just a style nit. > > ::: src/window.js > @@ +166,3 @@ > + GObject.BindingFlags.INVERT_BOOLEAN); > + iconView.bind_property('selection-mode', closeButton, 'visible', > + GObject.BindingFlags.INVERT_BOOLEAN); > > I disagree with this choice, but if this is the designed way, ok. > > @@ +195,3 @@ > > + this._selectionMenuButtonLabel.set_label(label); > + this._deleteButton.set_sensitive (sensitive); > > Don't use the function call syntax, use a property assignment. I asked Allan to review if the above said is still valid. It is. I improved the patch according to your suggestion, and commit now.
(In reply to comment #6) > (In reply to comment #4) > > Moreover, i believe that the delete button should not be sensitive in the case > > there is nothing to delete. > > > > I forgot to mention, that I hit a strange issue that even once I set a > > sensitive property for a button to false on the first launch of the application > > it is still sensitive. > > > > however, it does not matter where I set the sensitive property to false, even > > if I do it in the code right behind the line 138 this._deleteButton = > > builder.get_object('delete-button'); > > with this._deleteButton.set_sensitive (false); it still appears sensitive. > > only on the first launch of the selection mode, however. > > can any one reproduce it? > > i do not understand it. is it a bug in my code, in gnome-weather, in gtk+ or in > > gjs > > Right, the delete button is an actionable button, so you should change it's > sensitivity directly. Rather, change the enabled property on the right GAction. I do not think that I understand you. It should be possible in m opinion to set the default sensitivity of a button in the constructor for example, or by glade, despite the fact that it's an actionable button.
I left this bug report opened due to remaining header bar height fluctuation between normal and selection modes.
(In reply to comment #10) > (In reply to comment #6) > [...] > > I do not think that I understand you. It should be possible in m opinion to set > the default sensitivity of a button in the constructor for example, or by > glade, despite the fact that it's an actionable button. No, buttons following a GAction bind the sensitive property to the enabled property of the GAction with a SYNC_CREATE binding. And that's how it should work anyway: you want to disable the button, you instead disable the underlying action.
Selection mode is gone since 3.14, closing this.