[gthumb] Disable "Properties" context menu item when it does not make sense



commit 1815d59abbb94277618efe5ec6e57e4947ff0782
Author: Christophe Bisière <bisiere univ-tlse1 fr>
Date:   Mon May 24 12:17:28 2010 +0200

    Disable "Properties" context menu item when it does not make sense

 extensions/catalogs/callbacks.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/extensions/catalogs/callbacks.c b/extensions/catalogs/callbacks.c
index 7242e60..1e331b5 100644
--- a/extensions/catalogs/callbacks.c
+++ b/extensions/catalogs/callbacks.c
@@ -598,6 +598,10 @@ catalogs__gth_browser_folder_tree_popup_before_cb (GthBrowser    *browser,
 		action = gtk_action_group_get_action (data->actions, "Catalog_Rename");
 		sensitive = (folder != NULL) && g_file_info_get_attribute_boolean (folder->info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME);
 		g_object_set (action, "sensitive", sensitive, NULL);
+
+		action = gtk_action_group_get_action (data->actions, "Catalog_Properties");
+		sensitive = (folder != NULL) && (! _g_content_type_is_a (g_file_info_get_content_type (folder->info), "gthumb/library"));
+		g_object_set (action, "sensitive", sensitive, NULL);
 	}
 	else {
 		if (data->folder_popup_merge_id != 0) {



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