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
This commit is contained in:
Joshua Lock 2013-07-12 12:39:23 +01:00 committed by Federico Mena Quintero
parent 7b7b8eaaff
commit 24751cba8e

View File

@ -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