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 449371 - Open with menu has no effect
Open with menu has no effect
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.11.x
Other All
: High critical
: ---
Assigned To: gtk-bugs
gtk-bugs
: 448849 458588 464495 474331 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-06-20 06:14 UTC by Götz Waschk
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: 2.20.x
GNOME version: 2.19/2.20


Attachments
Shows a backtrace of how far the code makes it (4.46 KB, text/plain)
2007-09-07 18:30 UTC, Boyd Timothy
  Details
testcase (1.45 KB, text/x-csrc)
2007-09-08 04:11 UTC, Matthias Clasen
  Details
Ugly patch which fixes the issue (849 bytes, patch)
2007-09-11 17:30 UTC, Michael Natterer
committed Details | Review

Description Götz Waschk 2007-06-20 06:14:10 UTC
This is on Mandriva Cooker with nautilus 2.19.4. The open with context menu of files and directories has no effect. It doesn't matter what I click, nothing happens.
Comment 1 Pascal Terjan 2007-06-20 11:05:01 UTC
The label is "Open" and not "Open with « The default app for this kind of stuff »" ?
Comment 2 Pascal Terjan 2007-06-20 11:15:24 UTC
Indeed, I have the same issue after updating to nautilus 2.19.4 (without updating anything else. It looks like it can no longer find the associated application.
Comment 3 Götz Waschk 2007-06-20 11:16:02 UTC
The default action is working fine, it is the "Öffnen mit" aka "Open with" menu that doesn't work anymore.
Comment 4 Götz Waschk 2007-06-22 06:29:58 UTC
It seems it was fixed by one of the 2.19.4 updates.
Comment 5 Götz Waschk 2007-07-01 09:58:25 UTC
It has stopped working again :(
Comment 6 Peter Sääf 2007-07-26 22:22:18 UTC
I can confirm this on a gentoo system.

Some additional information.
The problem can be worked around by actually clicking on the 'open with' menu entry. Not just waiting for the sub-menu to open.

This also applies to bug 458547 which I think is a dupe of this one.
Comment 7 Peter Sääf 2007-07-26 22:29:35 UTC
*** Bug 448849 has been marked as a duplicate of this bug. ***
Comment 8 Sebastien Bacher 2007-08-17 08:35:22 UTC
Ubuntu bug on https://bugs.launchpad.net/nautilus/+bug/121796, I've set the GNOME target because that would be nice to fix this one before 2.20
Comment 9 André Klapper 2007-08-19 01:43:38 UTC
seb128, gnome-target is meant to be used on bugs severe enough to possibly
require delaying GNOME releases.  The target milestone is the field you want for bugs you'd like to remember to fix by a certain release.  You can add target
milestones for your product by clicking on the "Edit this product" link in the
lower-right hand corner of the browse.cgi ("product overview") page.  See also
the "Target Milestone" and "GNOME Target Milestone" sections of
http://bugzilla.gnome.org/page.cgi?id=bug-status.html.  :-)
Comment 10 Sebastien Bacher 2007-08-19 10:31:06 UTC
Andre, thanks but I know what the gnome-target means and I used it because I think the bug should be fixed for 2.20, is there any other mean to list the bugs and suggest that they should be fixed for the new version?
Comment 11 Sebastien Bacher 2007-08-20 22:08:51 UTC
https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/132372 describe it as a GTK issue

"In right-click menus, sub menus (eg the Create Document menu on the Desktop context menu) display fine, but when I primary(left) click on the entries, the menu disappears, but nothing happens. However, if I secondary(right) click on the entries, everything works: the menu disappears and the action occurs. Entries not in a sub menu (e.g. Change Desktop Background in the desktop context menu) work perfectly fine.

This happens in all GTK apps I've tried it in so far. Not sure about kde/qt apps as I don't have any kde apps installed. Interestingly though, the move to another workspace sub menu on the window list context menu is not affected.

I thought the problem was compiz fusion at first, but disabling it doesn't change anything. I also tried restarting X and logging in to gnome with compiz disabled, but the bug persists."
Comment 12 Pascal Terjan 2007-08-20 22:14:55 UTC
Bug #458588 would be a duplicate then ?
Comment 13 Pascal Terjan 2007-08-20 22:16:00 UTC
And maybe bug #464495 too
Comment 14 André Klapper 2007-08-21 14:53:42 UTC
many people will run into this issue, so it definitely should be fixed for 2.20 release. seb128, you're totally right here, i'm sorry.
Comment 15 André Klapper 2007-08-23 11:17:08 UTC
according to mitch (who would probably have prefered to not getting poked on this issue, hehe), all the right-click menus in gimp work with the new code.

can anybody provide a test case?

<mitch> so the problem is that when you use the right mouse button, submenus don't open any longer?
Comment 16 Pascal Terjan 2007-08-23 11:34:02 UTC
The submenu open, but when you click on a item in the submenu it does not always work (usually does not work).

I can also reproduce with gnome-terminal when asking to change profile, I had to do it 3 times before it changed, the one time was enough, then more than 10 times ...
Comment 17 Pascal Terjan 2007-08-23 11:37:28 UTC
(In reply to comment #11)
> However, if I secondary(right) click on the entries, everything works

Indeed, in gnome-terminal too, when right clicking on the menu entry it works fine 
Comment 18 Pascal Terjan 2007-08-23 11:37:58 UTC
*** Bug 458588 has been marked as a duplicate of this bug. ***
Comment 19 Pascal Terjan 2007-08-23 11:38:01 UTC
*** Bug 464495 has been marked as a duplicate of this bug. ***
Comment 20 Yanko Kaneti 2007-08-24 12:12:05 UTC
I can reproduce this 95% of the time with metacity's "Move to Another Workspace" -> submenu when its built when right-clicking the title bar. The same submenu works flawlessly when left clicking on the window icon.
Comment 21 Yanko Kaneti 2007-08-24 12:29:24 UTC
And I think I found the reliable way to reproduce the same thing. 
The workspaces submenu doesn't work when the rightclick on the metacity title bar is held down a little bit longer. It works fine if the click is released asap.
Comment 22 Boyd Timothy 2007-09-07 17:12:30 UTC
*** Bug 474331 has been marked as a duplicate of this bug. ***
Comment 23 Boyd Timothy 2007-09-07 18:30:39 UTC
Created attachment 95149 [details]
Shows a backtrace of how far the code makes it

This backtrace shows the code path of when a document _is_ created.  It also shows the spot at which the bug described here stops heading down the normal code path (at frames #14 and #15).

I tracked it down to gtk_menu_button_release (gtkmenushell.c:669) and noticed that there were a lot of changes made in r17659, which contained a bunch of changes surrounding submenus.

http://svn.gnome.org/viewcvs/gtk%2B?view=revision&revision=17659

I'm not expert in this area, but perhaps this information will help one of you figure out what's going on more quickly?
Comment 24 Matthias Clasen 2007-09-07 18:38:17 UTC
Mitch, do you have any insight here ?
Comment 25 Matthias Clasen 2007-09-08 04:11:40 UTC
Created attachment 95164 [details]
testcase

Here is a small testcase.
To reproduce, right-click on the window and hold for a bit after the menu pops up.
Then open a submenu and left-click on an item. Note that the callback is not triggered.
Comment 26 Matthias Clasen 2007-09-08 05:01:02 UTC
Ok, I tracked this further down.

With trunk, what I see that menu_shell->button remains set to 1 or 3 in the
slow-release case. The later click with the other button then triggers

      if (menu_shell->button && (event->button != menu_shell->button))

With 2.10, a slow release gets passed to the menu_shell_button_release function and causes menu_shell->button to be reset to 0, which later makes the condition false.

This change in behaviour is caused by the "don't pass down" part of 
http://svn.gnome.org/viewcvs/gtk%2B/trunk/gtk/gtkmenu.c?r1=17570&r2=17571
Comment 27 Michael Natterer 2007-09-11 17:30:15 UTC
Created attachment 95371 [details] [review]
Ugly patch which fixes the issue
Comment 28 Michael Natterer 2007-09-11 17:41:46 UTC
Fixed in SVN:

2007-09-11  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkmenu.c (gtk_menu_button_release): Make sure
	menu_shell->button gets reset to 0 when we bail out early here
	instead of chaining up, so it is in a consistent state for the
	next press/release in GtkMenuShell. Fixes bug #449371.