After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703530 - Proposals for the Fix of selection mode
Proposals for the Fix of selection mode
Status: RESOLVED OBSOLETE
Product: gnome-weather
Classification: Applications
Component: design
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Weather Maintainer(s)
GNOME Weather Maintainer(s)
: 703531 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-07-03 10:22 UTC by Evgeny Bobkin
Modified: 2015-03-18 19:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch proposal for the selectin mode ui rework (3.58 KB, patch)
2013-07-03 10:31 UTC, Evgeny Bobkin
accepted-commit_now Details | Review
patch proposal for the selectin mode ui rework (3.84 KB, patch)
2013-07-18 09:16 UTC, Evgeny Bobkin
committed Details | Review

Description Evgeny Bobkin 2013-07-03 10:22:02 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)
Comment 1 Evgeny Bobkin 2013-07-03 10:26:08 UTC
*** Bug 703531 has been marked as a duplicate of this bug. ***
Comment 2 Evgeny Bobkin 2013-07-03 10:31:01 UTC
Created attachment 248298 [details] [review]
patch proposal for the selectin mode ui rework
Comment 3 Evgeny Bobkin 2013-07-03 10:34:41 UTC
sorry for a double pack, bugzilla were not responding.
Comment 4 Evgeny Bobkin 2013-07-03 10:45:48 UTC
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
Comment 5 Giovanni Campagna 2013-07-13 16:52:20 UTC
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.
Comment 6 Giovanni Campagna 2013-07-13 16:53:53 UTC
(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.
Comment 7 Evgeny Bobkin 2013-07-18 09:14:32 UTC
(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?
Comment 8 Evgeny Bobkin 2013-07-18 09:16:56 UTC
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;
    },
Comment 9 Evgeny Bobkin 2013-07-18 09:18:54 UTC
(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.
Comment 10 Evgeny Bobkin 2013-07-18 09:27:23 UTC
(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.
Comment 11 Evgeny Bobkin 2013-07-18 09:30:23 UTC
I left this bug report opened due to remaining header bar height fluctuation between normal and selection modes.
Comment 12 Giovanni Campagna 2013-07-18 11:19:00 UTC
(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.
Comment 13 Giovanni Campagna 2015-03-18 19:57:00 UTC
Selection mode is gone since 3.14, closing this.