aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage-set-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-05-17 21:43:54 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-05-17 21:43:54 +0800
commitff02cf593c542e1801d689ab6db2a40a927b8683 (patch)
tree8eb2ca01080164fe76907860b4ec4ea1f506cc1c /shell/e-storage-set-view.c
parent3f50ef47d5f2e55e19a9da1f5bc7349a7f7c8aaa (diff)
downloadgsoc2013-evolution-ff02cf593c542e1801d689ab6db2a40a927b8683.tar.gz
gsoc2013-evolution-ff02cf593c542e1801d689ab6db2a40a927b8683.tar.zst
gsoc2013-evolution-ff02cf593c542e1801d689ab6db2a40a927b8683.zip
Change the code to pop-up the folder context menu to use the stuff
already defined in the UI xml file for the shell views. svn path=/trunk/; revision=9867
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r--shell/e-storage-set-view.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index e9e7acad04..de5bc21671 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -703,39 +703,12 @@ folder_context_menu_remove_cb (BonoboUIComponent *uih,
}
static void
-populate_folder_context_menu_with_common_items (EStorageSetView *storage_set_view,
- BonoboUIComponent *uih)
-{
- static char popup_xml[] =
- "<submenu name=\"Folder\" _label=\"Folder\">\n"
- " <menuitem name=\"Activate\" verb=\"ActivateView\" _label=\"_View\" _tip=\"View the selected folder\"/>\n"
- " <menuitem name=\"Remove\" verb=\"RemoveFolder\" _label=\"_Remove\" _tip=\"Remove the selected folder\"/>\n"
- " <placeholder name=\"componentPlaceholder\" delimit=\"top\"/>\n"
-#ifdef DEBUG_XML
- " <separator/>\n"
- " <menuitem name=\"Dump\" verb=\"BonoboUIDump\" _label=\"_Dump XML\" _tip=\"Dump the bonobo xml\"/>\n"
-#endif
- "</submenu>\n";
-
- bonobo_ui_component_add_verb (uih, "ActivateView",
- folder_context_menu_activate_cb,
- storage_set_view);
-
- bonobo_ui_component_add_verb (uih, "RemoveFolder",
- folder_context_menu_remove_cb,
- storage_set_view);
-
- bonobo_ui_component_set_translate (uih, "/popups/folderPopup", popup_xml, NULL);
-}
-
-static void
popup_folder_menu (EStorageSetView *storage_set_view,
GdkEventButton *event)
{
EvolutionShellComponentClient *handler;
EStorageSetViewPrivate *priv;
EFolderTypeRegistry *folder_type_registry;
- BonoboUIComponent *uih;
EFolder *folder;
GtkWidget *menu;
@@ -754,20 +727,9 @@ popup_folder_menu (EStorageSetView *storage_set_view,
e_folder_get_type_string (folder));
g_assert (handler != NULL);
- uih = bonobo_ui_component_new ("folder-popup");
-
- bonobo_ui_component_set_container (uih,
- bonobo_object_corba_objref (BONOBO_OBJECT (priv->container)));
-
- bonobo_ui_component_set (uih, "/",
- "<popups> <popup name=\"folderPopup\"/> </popups>", NULL);
-
- populate_folder_context_menu_with_common_items (storage_set_view, uih);
-
menu = gtk_menu_new ();
-
bonobo_window_add_popup (bonobo_ui_container_get_win (priv->container),
- GTK_MENU (menu), "/popups/folderPopup");
+ GTK_MENU (menu), "/popups/FolderPopup");
evolution_shell_component_client_populate_folder_context_menu (handler,
priv->container,
@@ -776,8 +738,6 @@ popup_folder_menu (EStorageSetView *storage_set_view,
gtk_widget_show (GTK_WIDGET (menu));
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 3, 0);
-
- bonobo_object_unref (BONOBO_OBJECT (uih));
}