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 706605 - two context menus on pathbar
two context menus on pathbar
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Path Bar
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 706765 707583 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-08-22 18:29 UTC by Sebastian Keller
Modified: 2013-09-07 15:04 UTC
See Also:
GNOME target: 3.10
GNOME version: ---


Attachments
pathbar: do not bubble up button-press-event (723 bytes, patch)
2013-08-23 14:28 UTC, Stefano Facchini
rejected Details | Review
pathbar: do not unconditionally bubble up button-press-event (772 bytes, patch)
2013-08-23 15:25 UTC, Stefano Facchini
committed Details | Review
window: Handle middle click in pathbar event callback (682 bytes, patch)
2013-08-25 12:41 UTC, Stefano Facchini
committed Details | Review

Description Sebastian Keller 2013-08-22 18:29:50 UTC
When you rightclick the pathbar in 3.9.90 you get two context menus, one for the pathbar and one for the headerbar.
Comment 1 Matthias Clasen 2013-08-23 14:23:25 UTC
nautilus needs to return the right value from its event handler to indicate that the event has been fully handled, not let it bubble up.
Comment 2 Stefano Facchini 2013-08-23 14:28:57 UTC
Created attachment 252870 [details] [review]
pathbar: do not bubble up button-press-event
Comment 3 Stefano Facchini 2013-08-23 14:33:11 UTC
Comment on attachment 252870 [details] [review]
pathbar: do not bubble up button-press-event

obviously this was too simple :)
Comment 4 Stefano Facchini 2013-08-23 15:25:29 UTC
Created attachment 252881 [details] [review]
pathbar: do not unconditionally bubble up button-press-event
Comment 5 Matthias Clasen 2013-08-23 15:59:57 UTC
Review of attachment 252881 [details] [review]:

looks fine to me
Comment 6 Cosimo Cecchi 2013-08-24 15:43:14 UTC
Thanks! Pushed this, and another patch on top of it, that uses a return value from path-event instead of depending on the window and the pathbar being in sync on the knowkledge of what happened.

Attachment 252881 [details] pushed as 0f30343 - pathbar: do not unconditionally bubble up button-press-event
Comment 7 Sebastian Keller 2013-08-25 07:35:10 UTC
I just noticed that there are other events that should be filtered in path_bar_path_event_callback as well:
- middle click sends the window to the background
- double clicking maximizes the window

But adding all those exceptions feels a bit wrong to me and would break whenever new events get added to the header bar. Maybe it would make more sense to default to TRUE in path_bar_path_event_callback and only return FALSE on events that would be handled by the buttons in the path bar. That way everything would be contained in the nautilus source and it would not depend on gtk not adding new events to the header bar.
Comment 8 Stefano Facchini 2013-08-25 12:41:42 UTC
Created attachment 253054 [details] [review]
window: Handle middle click in pathbar event callback

Probabily this is needed, too
Comment 9 Cosimo Cecchi 2013-08-25 20:26:25 UTC
*** Bug 706765 has been marked as a duplicate of this bug. ***
Comment 10 Cosimo Cecchi 2013-08-25 20:30:32 UTC
Review of attachment 253054 [details] [review]:

Looks good for now.
Comment 11 Stefano Facchini 2013-08-26 08:16:35 UTC
Comment on attachment 253054 [details] [review]
window: Handle middle click in pathbar event callback

Attachment 253054 [details] pushed as 9b6abc6 - window: Handle middle click in pathbar event callback
Comment 12 Nelson Benitez 2013-09-07 15:04:57 UTC
*** Bug 707583 has been marked as a duplicate of this bug. ***