summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--window_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/window_main.c b/window_main.c
index bbfa922..ac5b9bd 100644
--- a/window_main.c
+++ b/window_main.c
@@ -544,9 +544,15 @@ void on_tags_activate(GtkMenuItem *menuitem, gpointer user_data) {
inline static void thumbview_popup_add_items(GtkWidget *menu) {
GtkWidget *tags;
+ GList *list;
tags = gtk_menu_item_new_with_label("Tags");
+ list = gtk_icon_view_get_selected_items(GTK_ICON_VIEW(thumbview));
+ gtk_widget_set_sensitive(tags, (g_list_length(list) > 0 ? TRUE : FALSE));
+ g_list_foreach(list, (GFunc)gtk_tree_path_free, NULL);
+ g_list_free(list);
+
gtk_menu_shell_append(GTK_MENU_SHELL(menu), tags);
g_signal_connect(G_OBJECT(tags), "activate", G_CALLBACK(on_tags_activate), NULL);