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 542653 - [tabs] open tab on button release
[tabs] open tab on button release
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Tabs
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-12 12:22 UTC by Jared Moore
Modified: 2012-09-05 14:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Act on sidebar items on button release not button down (4.04 KB, patch)
2012-09-05 13:44 UTC, William Jon McCann
reviewed Details | Review
Act on sidebar items on button release not button down (4.10 KB, patch)
2012-09-05 14:01 UTC, William Jon McCann
committed Details | Review

Description Jared Moore 2008-07-12 12:22:56 UTC
Currently, opening tabs by middle clicking on sidebar items activates on button press, but it should be button release.
Comment 1 Luis Medinas 2008-07-15 17:17:42 UTC
Issue confirmed it's just the items on the sidebar the toolbar is fine.
Comment 2 William Jon McCann 2012-09-05 13:44:53 UTC
Created attachment 223538 [details] [review]
Act on sidebar items on button release not button down

This allows one to change your mind and is consistent with other
actions.
Comment 3 Cosimo Cecchi 2012-09-05 13:53:16 UTC
Review of attachment 223538 [details] [review]:

Looks good overall

::: src/nautilus-places-sidebar.c
@@ +2818,1 @@
+	if (!res || path == NULL || !gtk_tree_model_get_iter (model, &iter, path)) {

This is probably in the original code as well, but AFAICS in case gtk_tree_model_get_iter() fails, we leak path. Can you split this check into two and free path too when get_iter() fails?
Comment 4 William Jon McCann 2012-09-05 13:56:25 UTC
Review of attachment 223538 [details] [review]:

::: src/nautilus-places-sidebar.c
@@ +2818,1 @@
+	if (!res || path == NULL || !gtk_tree_model_get_iter (model, &iter, path)) {

Ugh yeah I copy and pasted that. This is one reason I hate the style of putting things with side-effects in conditions.
Comment 5 William Jon McCann 2012-09-05 14:01:21 UTC
Created attachment 223541 [details] [review]
Act on sidebar items on button release not button down

This allows one to change your mind and is consistent with other
actions.
Comment 6 Cosimo Cecchi 2012-09-05 14:03:01 UTC
Review of attachment 223541 [details] [review]:

Thanks, looks good now.