Yasumichi Akahoshi
yasum****@users*****
2005年 5月 10日 (火) 00:25:33 JST
Index: cxplorer/src/cxplorer-window.c diff -u cxplorer/src/cxplorer-window.c:1.47 cxplorer/src/cxplorer-window.c:1.48 --- cxplorer/src/cxplorer-window.c:1.47 Tue May 10 00:12:08 2005 +++ cxplorer/src/cxplorer-window.c Tue May 10 00:25:32 2005 @@ -341,15 +341,23 @@ CxplorerWindowPrivate *private = CXPLORER_WINDOW_GET_PRIVATE (user_data); GtkWidget *menu; GtkWidget *menuitem; + const gchar *path[] = { + "/menubar/FileMenu/SendMenu", + "/popup/SendMenu", + }; + guint idx; - if((menuitem = gtk_ui_manager_get_widget (private->ui_manager, "/menubar/FileMenu/SendMenu")) != NULL) + for (idx=0; idx<2; idx++) { - menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(menuitem)); - menuitem = gtk_menu_item_new_with_label (caption); - g_object_set_data (G_OBJECT (menuitem), "command", g_strdup(command)); - gtk_container_add (GTK_CONTAINER(menu), menuitem); - g_signal_connect (menuitem, "activate", G_CALLBACK(cxplorer_window_sendto_activate), user_data); - gtk_widget_show (menuitem); + if((menuitem = gtk_ui_manager_get_widget (private->ui_manager, path[idx])) != NULL) + { + menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(menuitem)); + menuitem = gtk_menu_item_new_with_label (caption); + g_object_set_data (G_OBJECT (menuitem), "command", g_strdup(command)); + gtk_container_add (GTK_CONTAINER(menu), menuitem); + g_signal_connect (menuitem, "activate", G_CALLBACK(cxplorer_window_sendto_activate), user_data); + gtk_widget_show (menuitem); + } } }