From ff02cf593c542e1801d689ab6db2a40a927b8683 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 17 May 2001 13:43:54 +0000 Subject: 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 --- shell/ChangeLog | 16 ++++++++++++++++ shell/e-shell-view.c | 1 - shell/e-storage-set-view.c | 42 +----------------------------------------- 3 files changed, 17 insertions(+), 42 deletions(-) (limited to 'shell') 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 + + * 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 + + * 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 * 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 @@ -702,32 +702,6 @@ folder_context_menu_remove_cb (BonoboUIComponent *uih, remove_cb, storage_set_view); } -static void -populate_folder_context_menu_with_common_items (EStorageSetView *storage_set_view, - BonoboUIComponent *uih) -{ - static char popup_xml[] = - "\n" - " \n" - " \n" - " \n" -#ifdef DEBUG_XML - " \n" - " \n" -#endif - "\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) @@ -735,7 +709,6 @@ popup_folder_menu (EStorageSetView *storage_set_view, 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, "/", - " ", 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)); } -- cgit v1.2.3