[gtk+] places sidebar: don't open a bookmark when clicking eject



commit 24751cba8eb28ce7c0772196b389a7996840c9ef
Author: Joshua Lock <joshua lock intel com>
Date:   Fri Jul 12 12:39:23 2013 +0100

    places sidebar: don't open a bookmark when clicking eject
    
    Trying to open a bookmark which is being ejected is at best confusing.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704087

 gtk/gtkplacessidebar.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index 7e84cb4..1fadbf5 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -3265,13 +3265,18 @@ bookmarks_row_activated_cb (GtkWidget *widget,
                            GtkPlacesSidebar *sidebar)
 {
        GtkTreeIter iter;
+       GtkTreePath *clicked_path = NULL;
        GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
 
        if (!gtk_tree_model_get_iter (model, &iter, path)) {
                return;
        }
 
-       open_selected_bookmark (sidebar, model, &iter, 0);
+       if (!clicked_eject_button (sidebar, &clicked_path)) {
+               open_selected_bookmark (sidebar, model, &iter, 0);
+       } else {
+               gtk_tree_path_free (clicked_path);
+       }
 }
 
 static gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]