aboutsummaryrefslogtreecommitdiffstats
path: root/shell
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
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')
-rw-r--r--shell/ChangeLog16
-rw-r--r--shell/e-shell-view.c1
-rw-r--r--shell/e-storage-set-view.c42
3 files changed, 17 insertions, 42 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 8f6d4ac35b..ba58043972 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,19 @@
+2001-05-17 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-storage-set-view.c
+ (populate_folder_context_menu_with_common_items): Removed.
+ (popup_folder_menu): Instead of creating the component and the
+ folder popup definition here, just do `bonobo_window_add_popup()'
+ and assume that "/popups/FolderPopup" is defined in the toplevel
+ window's UI xml file.
+
+2001-05-16 Ettore Perazzoli <ettore@ximian.com>
+
+ * evolution-shell-component-client.c: Moved some functions around
+ to avoid the warning about the static
+ `free_ShellComponentListener_servant()' function being used prior
+ to declaration.
+
2001-05-15 Ettore Perazzoli <ettore@ximian.com>
* e-shell-view-menu.c (command_run_bugbuddy): `#if 0'ed out.
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index f6e2a28dc1..8806b56ff4 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -728,7 +728,6 @@ delete_event (GtkWidget *widget,
EShell *shell;
shell = e_shell_view_get_shell (E_SHELL_VIEW (widget));
-/* e_shell_quit (shell); */
/* FIXME: Is this right, or should it be FALSE? */
return FALSE;
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));
}