comparison src/collect-table.c @ 1397:a0bd58a6535f

In various Edit context menus, only display editors that match the file types in the selection.
author zas_
date Sun, 08 Mar 2009 13:23:25 +0000
parents fe4da037be21
children 3a9fb1b52559
comparison
equal deleted inserted replaced
1396:58f0b4586c8c 1397:a0bd58a6535f
837 ct->popup = NULL; 837 ct->popup = NULL;
838 838
839 filelist_free(ct->drop_list); 839 filelist_free(ct->drop_list);
840 ct->drop_list = NULL; 840 ct->drop_list = NULL;
841 ct->drop_info = NULL; 841 ct->drop_info = NULL;
842
843 filelist_free(ct->editmenu_fd_list);
844 ct->editmenu_fd_list = NULL;
842 } 845 }
843 846
844 static GtkWidget *collection_table_popup_menu(CollectTable *ct, gint over_icon) 847 static GtkWidget *collection_table_popup_menu(CollectTable *ct, gint over_icon)
845 { 848 {
846 GtkWidget *menu; 849 GtkWidget *menu;
875 menu_item_add(submenu, _("Invert selection"), 878 menu_item_add(submenu, _("Invert selection"),
876 G_CALLBACK(collection_table_popup_select_invert_cb), ct); 879 G_CALLBACK(collection_table_popup_select_invert_cb), ct);
877 gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu); 880 gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu);
878 menu_item_add_divider(menu); 881 menu_item_add_divider(menu);
879 882
883
884 ct->editmenu_fd_list = collection_table_selection_get_list(ct);
880 submenu_add_edit(menu, &item, 885 submenu_add_edit(menu, &item,
881 G_CALLBACK(collection_table_popup_edit_cb), ct); 886 G_CALLBACK(collection_table_popup_edit_cb), ct, ct->editmenu_fd_list);
882 gtk_widget_set_sensitive(item, over_icon); 887 gtk_widget_set_sensitive(item, over_icon);
883 888
884 menu_item_add_divider(menu); 889 menu_item_add_divider(menu);
885 menu_item_add_stock_sensitive(menu, _("_Copy..."), GTK_STOCK_COPY, over_icon, 890 menu_item_add_stock_sensitive(menu, _("_Copy..."), GTK_STOCK_COPY, over_icon,
886 G_CALLBACK(collection_table_popup_copy_cb), ct); 891 G_CALLBACK(collection_table_popup_copy_cb), ct);