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 596371 - AppWell improvements
AppWell improvements
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks: gnome-shell-2-28
 
 
Reported: 2009-09-25 20:47 UTC by Colin Walters
Modified: 2009-10-02 23:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[AppWell] Add Add/Remove from favorites menu, unify lists more (7.93 KB, patch)
2009-09-25 20:47 UTC, Colin Walters
committed Details | Review
[ShellMenu] Allow any button to deactivate menu (926 bytes, patch)
2009-09-25 20:47 UTC, Colin Walters
needs-work Details | Review
[AppIcon] Immediately pop up menu on right click (1.48 KB, patch)
2009-09-25 20:47 UTC, Colin Walters
accepted-commit_now Details | Review
Immediately pop up menu on right click (2.60 KB, patch)
2009-09-28 20:21 UTC, Colin Walters
reviewed Details | Review
[ShellMenu] Allow conditional cancellation depending on button (2.18 KB, patch)
2009-09-28 20:21 UTC, Colin Walters
reviewed Details | Review
Allow conditional cancellation depending on button (2.26 KB, patch)
2009-10-02 17:47 UTC, Colin Walters
needs-work Details | Review
Immediately pop up menu on right click (2.59 KB, patch)
2009-10-02 17:48 UTC, Colin Walters
needs-work Details | Review
Ignore releases of buttons other than the activating button (2.36 KB, patch)
2009-10-02 19:26 UTC, Owen Taylor
committed Details | Review
Immediately pop up menu on right click (2.47 KB, patch)
2009-10-02 19:27 UTC, Owen Taylor
committed Details | Review

Description Colin Walters 2009-09-25 20:47:48 UTC
Add add/remove, fix up right click
Comment 1 Colin Walters 2009-09-25 20:47:50 UTC
Created attachment 144033 [details] [review]
[AppWell] Add Add/Remove from favorites menu, unify lists more

Also have inactive applications pop up a menu.

Add/Remove from favorites is now in the menu.

Concatenate the favorites/not-favorites instead of having a gap only
if you happened to have a not-divisible-by-4 number of favorites.
Comment 2 Colin Walters 2009-09-25 20:47:52 UTC
Created attachment 144034 [details] [review]
[ShellMenu] Allow any button to deactivate menu

For some reason we were limiting popdowns to only button 1 before;
other menus popdown on any button, so we should fit in with the
crowd.
Comment 3 Colin Walters 2009-09-25 20:47:56 UTC
Created attachment 144035 [details] [review]
[AppIcon] Immediately pop up menu on right click

We were actually showing a menu on button 3 before, but only
through a chain of coincidences.  This patch explicitly supports
it and makes sure we show it immediately rather than after
a timeout.
Comment 4 Owen Taylor 2009-09-25 22:06:58 UTC
Review of attachment 144033 [details] [review]:

Menu part loosk fine to me. Removal of the "separator" looks right. Think the DND behavior might need a bit more tweeking.

::: js/ui/appDisplay.js
@@ -900,3 @@
 
-        let dropIsFavorite = this._grid.isBeforeSeparator(x - this._grid.actor.x,
-                                                          y - this._grid.actor.y);

It doesn't really make sense to me that dragging a not-favorite app a little bit and releasing would mark it is favorite. I think only the gesture of dragging an app from somwehere else (not the well) should favorite it. To favorite stuff in the well, you need to use the menu or whatever.

(Maybe eventually we can have the kind of rearrangement interface discussed in the meeting yesterday, but then there needs to be an affordance for showing what's going to happen when you drop, like highlighting the part of the app well that is favorite apps and when you start dragging into there showing a tooltip like "Add to favorites")
Comment 5 Owen Taylor 2009-09-25 22:09:54 UTC
Review of attachment 144034 [details] [review]:

For click-hold-release, what you need to do here is to make the menu popdown on the release of the button it was opened with.

This doesn't really matter a lot for mice. It's a very big deal for Wacom tablets which have the tip as button 1 and a button on the side of the stylus as button 3. If you have a menu activated with the side button, it must not be deactivated if the user temporarily presses the tip.

On the other hand, if the user has clicked and released, then any click should activate/dismiss the menu.
Comment 6 Owen Taylor 2009-09-25 22:10:53 UTC
Review of attachment 144035 [details] [review]:

Looks good. (You'll have to psas in the button to popupMenu to get the behavior I described in the other bug, but that's separate from this.)
Comment 7 Colin Walters 2009-09-28 18:00:39 UTC
(In reply to comment #4)

> It doesn't really make sense to me that dragging a not-favorite app a little
> bit and releasing would mark it is favorite. I think only the gesture of
> dragging an app from somwehere else (not the well) should favorite it. To
> favorite stuff in the well, you need to use the menu or whatever.

I agree and that's what's implemented, note the patch removes the handling for WellDisplayItem:

-        if (source instanceof BaseWellItem) {
-            app = source.appInfo;
Comment 8 Owen Taylor 2009-09-28 18:07:25 UTC
(In reply to comment #7)
> (In reply to comment #4)
> 
> > It doesn't really make sense to me that dragging a not-favorite app a little
> > bit and releasing would mark it is favorite. I think only the gesture of
> > dragging an app from somwehere else (not the well) should favorite it. To
> > favorite stuff in the well, you need to use the menu or whatever.
> 
> I agree and that's what's implemented, note the patch removes the handling for
> WellDisplayItem:
> 
> -        if (source instanceof BaseWellItem) {
> -            app = source.appInfo;

Ah, OK
Comment 9 Colin Walters 2009-09-28 18:22:04 UTC
(In reply to comment #5)
> Review of attachment 144034 [details] [review]:
> 
> For click-hold-release, what you need to do here is to make the menu popdown on
> the release of the button it was opened with.
>

Hmm; GtkMenu appears to popdown on any release as well, or at least I just quickly tested with the menu bar in XChat-GNOME.
Comment 10 Owen Taylor 2009-09-28 18:43:38 UTC
(In reply to comment #9)
> (In reply to comment #5)
> > Review of attachment 144034 [details] [review] [details]:
> > 
> > For click-hold-release, what you need to do here is to make the menu popdown on
> > the release of the button it was opened with.
> >
> 
> Hmm; GtkMenu appears to popdown on any release as well, or at least I just
> quickly tested with the menu bar in XChat-GNOME.

Hmm, true, but it still doesn't make it right! (one thing to note about the GTK+ behavior is it only activates on the button that it was triggered with - other button releases just dismiss.)
Comment 11 Colin Walters 2009-09-28 20:21:24 UTC
Created attachment 144197 [details] [review]
Immediately pop up menu on right click

We were actually showing a menu on button 3 before, but only
through a chain of coincidences.  This patch explicitly supports
it and makes sure we show it immediately rather than after
a timeout.  In this case, allow deactivation on any button.

Also, in the click+hold case, pass the activating button in so
that we only pop down on that button.
Comment 12 Colin Walters 2009-09-28 20:21:46 UTC
Created attachment 144198 [details] [review]
[ShellMenu] Allow conditional cancellation depending on button

Before we hardcoded popdowns to only button 1 before.  Instead start
respecting the button passed in; if it's 0 we allow popdown on any
button, if specified then we only pop down on that button.
Comment 13 Owen Taylor 2009-09-29 13:03:40 UTC
Review of attachment 144197 [details] [review]:

One line that doesn't make sense to me and that the comment doesn't help on, rest looks good.

::: js/ui/appIcon.js
@@ +214,3 @@
+        } else if (button == 3) {
+            // Don't bind to the button for right click
+            this.popupMenu(0);

Why don't bind to the button for the right click?
Comment 14 Owen Taylor 2009-09-29 13:06:49 UTC
Review of attachment 144198 [details] [review]:

One fix needed, otherwise looks OK. (The needed fix may be the reason why you had the mysterious exclusion of right-clicks in the other patch)

::: src/shell-menu.c
@@ +125,1 @@
     return FALSE;

After this check, you should set box->priv->activating_button = 0, since once the button has been released once, it no longer matters for subsequent releases.
Comment 15 Colin Walters 2009-09-29 21:24:13 UTC
(In reply to comment #13)
> Review of attachment 144197 [details] [review]:
> 
> One line that doesn't make sense to me and that the comment doesn't help on,
> rest looks good.
> 
> ::: js/ui/appIcon.js
> @@ +214,3 @@
> +        } else if (button == 3) {
> +            // Don't bind to the button for right click
> +            this.popupMenu(0);
> 
> Why don't bind to the button for the right click?

// Allow any button to deactivate

?
Comment 16 Colin Walters 2009-10-02 17:47:41 UTC
Created attachment 144608 [details] [review]
Allow conditional cancellation depending on button

Before we hardcoded popdowns to only button 1 before.  Instead start
respecting the button passed in; if it's 0 we allow popdown on any
button, if specified then we only pop down on that button.
Comment 17 Colin Walters 2009-10-02 17:48:29 UTC
Created attachment 144609 [details] [review]
Immediately pop up menu on right click

We were actually showing a menu on button 3 before, but only
through a chain of coincidences.  This patch explicitly supports
it and makes sure we show it immediately rather than after
a timeout.  In this case, allow deactivation on any button.

Also, in the click+hold case, pass the activating button in so
that we only pop down on that button.
Comment 18 Owen Taylor 2009-10-02 19:08:19 UTC
Review of attachment 144608 [details] [review]:

::: src/shell-menu.c
@@ +124,3 @@
+  if (box->priv->activating_button > 0 && box->priv->activating_button != event->button)
+    {
+      box->priv->activating_button = 0;

This is still wrong, the activating_button needs to be cleared when the *activating button* is released, not when other buttons are released.
Comment 19 Owen Taylor 2009-10-02 19:09:01 UTC
Review of attachment 144609 [details] [review]:

Still wrong as commented before.
Comment 20 Owen Taylor 2009-10-02 19:26:31 UTC
Created attachment 144616 [details] [review]
Ignore releases of buttons other than the activating button

Just a tiny change from your patch - revised the comment
and cleared activating_button when the activating_button was
released not when the other buttons were released.
Comment 21 Owen Taylor 2009-10-02 19:27:06 UTC
Created attachment 144617 [details] [review]
Immediately pop up menu on right click

Even tinier change - changed the commit message, and pass in
'button' rather than 0. when button==3.
Comment 22 Colin Walters 2009-10-02 23:28:42 UTC
Attachment 144616 [details] pushed as c5ce405 - Ignore releases of buttons other than the activating button
Attachment 144617 [details] pushed as 3b8d530 - Immediately pop up menu on right click