[nautilus] places-sidebar: respect middle-click for separate windows mode
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] places-sidebar: respect middle-click for separate windows mode
- Date: Wed, 23 Feb 2011 21:14:17 +0000 (UTC)
commit 5ae01f04d69f9e1d24cda75e9046aea4b4e96cd1
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Feb 23 16:13:07 2011 -0500
places-sidebar: respect middle-click for separate windows mode
Make it consistent with the rest, i.e. close behind.
This also fixes a crasher.
src/nautilus-places-sidebar.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 1006831..b49533c 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -2765,6 +2765,7 @@ bookmarks_button_press_event_cb (GtkWidget *widget,
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeView *tree_view;
+ NautilusWindowOpenFlags flags = 0;
tree_view = GTK_TREE_VIEW (widget);
g_assert (tree_view == sidebar->tree_view);
@@ -2774,10 +2775,16 @@ bookmarks_button_press_event_cb (GtkWidget *widget,
gtk_tree_view_get_path_at_pos (tree_view, (int) event->x, (int) event->y,
&path, NULL, NULL, NULL);
- open_selected_bookmark (sidebar, model, path,
- event->state & GDK_CONTROL_MASK ?
- NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW :
- NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB);
+ if (g_settings_get_boolean (nautilus_preferences,
+ NAUTILUS_PREFERENCES_ALWAYS_USE_BROWSER)) {
+ flags = (event->state & GDK_CONTROL_MASK) ?
+ NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW :
+ NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB;
+ } else {
+ flags = NAUTILUS_WINDOW_OPEN_FLAG_CLOSE_BEHIND;
+ }
+
+ open_selected_bookmark (sidebar, model, path, flags);
if (path != NULL) {
gtk_tree_path_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]