[nautilus] places-sidebar: disallow context menus for sidebar headings



commit 7f762ed76a3a69c66b8e1c0ec3df8bd99744e5f5
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon May 7 14:21:08 2012 -0400

    places-sidebar: disallow context menus for sidebar headings
    
    We already make them non-selectable - there's no point in having a menu
    for headings here.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=819404

 src/nautilus-places-sidebar.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index fbc0e24..26dd93e 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -2983,6 +2983,7 @@ bookmarks_button_press_event_cb (GtkWidget             *widget,
 	GtkTreeIter iter;
 	GtkTreePath *path = NULL;
 	gboolean retval = FALSE;
+	PlaceType row_type;
 
 	if (event->type != GDK_BUTTON_PRESS) {
 		/* ignore multiple clicks */
@@ -2999,7 +3000,13 @@ bookmarks_button_press_event_cb (GtkWidget             *widget,
 	}
 
 	if (event->button == 3) {
-		bookmarks_popup_menu (sidebar, event);
+		gtk_tree_model_get (model, &iter,
+				    PLACES_SIDEBAR_COLUMN_ROW_TYPE, &row_type,
+				    -1);
+
+		if (row_type != PLACES_HEADING) {
+			bookmarks_popup_menu (sidebar, event);
+		}
 	} else if (event->button == 2) {
 		NautilusWindowOpenFlags flags = 0;
 



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