From 12de520a89398e2c9810f042b3d10e3c4c1ed1ef Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 11 May 2001 23:13:28 +0000 Subject: add this define for the xml path to use when adding menu items to the 2001-05-11 Chris Toshok * evolution-shell-component.h (EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER): add this define for the xml path to use when adding menu items to the folder popup. * e-storage-set-view.c (populate_folder_context_menu_with_common_items): add (#ifdef DEBUG_XML) a menu item to dump the bonobo xml. (popup_folder_menu): pass the BonoboUIContainer to the populate_folder_context_menu CORBA call, instead of the component. Also, reorder things a bit so the component doesn't get an error when setting xml the first time. svn path=/trunk/; revision=9777 --- shell/ChangeLog | 14 ++++++++++++++ shell/e-storage-set-view.c | 16 +++++++++++----- shell/evolution-shell-component.h | 1 + 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index 017a24ebff..c3e1404f4f 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,17 @@ +2001-05-11 Chris Toshok + + * evolution-shell-component.h + (EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER): add this define for + the xml path to use when adding menu items to the folder popup. + + * e-storage-set-view.c + (populate_folder_context_menu_with_common_items): add (#ifdef + DEBUG_XML) a menu item to dump the bonobo xml. + (popup_folder_menu): pass the BonoboUIContainer to the + populate_folder_context_menu CORBA call, instead of the component. + Also, reorder things a bit so the component doesn't get an error + when setting xml the first time. + 2001-05-11 Iain Holmes * e-shell-folder-selection-dialog.c (dbl_click_cb): Use gnome_dialog_close diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c index a72c3881fd..2a51735854 100644 --- a/shell/e-storage-set-view.c +++ b/shell/e-storage-set-view.c @@ -49,6 +49,8 @@ static char *list [] = { }; #endif +/*#define DEBUG_XML*/ + #define DRAG_RESISTANCE 3 /* FIXME hardcoded in ETable to this value as * well, and there is no way for us to use the * same value as it's not exported. */ @@ -652,6 +654,10 @@ populate_folder_context_menu_with_common_items (EStorageSetView *storage_set_vie "\n" " \n" " \n" +#ifdef DEBUG_XML + " \n" + " \n" +#endif "\n"; bonobo_ui_component_add_verb (uih, "ActivateView", @@ -695,11 +701,6 @@ popup_folder_menu (EStorageSetView *storage_set_view, bonobo_ui_component_set (uih, "/", " ", NULL); - evolution_shell_component_client_populate_folder_context_menu (handler, - uih, - e_folder_get_physical_uri (folder), - e_folder_get_type_string (folder)); - populate_folder_context_menu_with_common_items (storage_set_view, uih); menu = gtk_menu_new (); @@ -707,6 +708,11 @@ popup_folder_menu (EStorageSetView *storage_set_view, bonobo_window_add_popup (bonobo_ui_container_get_win (priv->container), GTK_MENU (menu), "/popups/folderPopup"); + evolution_shell_component_client_populate_folder_context_menu (handler, + priv->container, + e_folder_get_physical_uri (folder), + e_folder_get_type_string (folder)); + gtk_widget_show (GTK_WIDGET (menu)); gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 3, 0); diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h index 2b98b623ce..ac48ed97de 100644 --- a/shell/evolution-shell-component.h +++ b/shell/evolution-shell-component.h @@ -42,6 +42,7 @@ extern "C" { #define EVOLUTION_IS_SHELL_COMPONENT(obj) (GTK_CHECK_TYPE ((obj), EVOLUTION_TYPE_SHELL_COMPONENT)) #define EVOLUTION_IS_SHELL_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EVOLUTION_TYPE_SHELL_COMPONENT)) +#define EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER "/popups/folderPopup/Folder/componentPlaceholder" typedef struct _EvolutionShellComponent EvolutionShellComponent; typedef struct _EvolutionShellComponentPrivate EvolutionShellComponentPrivate; -- cgit v1.2.3