From d471640fe82b68d5430514120dffa69be196f852 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 10 Aug 2001 01:07:46 +0000 Subject: Updated to display the parent folder's URI and its type as well. * evolution-test-component.c (user_create_new_item_callback): Updated to display the parent folder's URI and its type as well. * evolution-shell-component.c (impl_userCreateNewItem): Updated to get the @parent_folder_physical_uri and the @parent_folder_type. (class_init): Update the "user_create_new_item" signal to have @parent_folder_physical_uri and @parent_folder_type args. * e-shell-view.c (get_type_for_folder): Don't bork on a NULL @physical_uri_return. (e_shell_view_get_current_physical_uri): New. (e_shell_view_get_current_folder_type): New. * e-shell-user-creatable-items-handler.c (e_shell_user_creatable_items_handler_setup_menus): Replace @ui_component arg with a @shell_view arg. Set it on the UIComponent using gtk_object_set_data(). (verb_fn): Pass the type and physical URI of the current folder; retrieve that from the shell_view got with gtk_object_get_data(). * Evolution-ShellComponent.idl (userCreateNewItem): New args @parent_folder_uri, @parent_folder_type. svn path=/trunk/; revision=11863 --- shell/evolution-shell-component.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'shell/evolution-shell-component.c') diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c index 18b53da202..ce49e843d4 100644 --- a/shell/evolution-shell-component.c +++ b/shell/evolution-shell-component.c @@ -529,6 +529,8 @@ impl_populateFolderContextMenu (PortableServer_Servant servant, static void impl_userCreateNewItem (PortableServer_Servant servant, const CORBA_char *id, + const CORBA_char *parent_physical_uri, + const CORBA_char *parent_type, CORBA_Environment *ev) { EvolutionShellComponent *shell_component; @@ -539,7 +541,7 @@ impl_userCreateNewItem (PortableServer_Servant servant, /* FIXME: Check that the type is good. */ - gtk_signal_emit (GTK_OBJECT (shell_component), signals[USER_CREATE_NEW_ITEM], id); + gtk_signal_emit (GTK_OBJECT (shell_component), signals[USER_CREATE_NEW_ITEM], id, parent_physical_uri, parent_type); } @@ -640,8 +642,10 @@ class_init (EvolutionShellComponentClass *klass) GTK_RUN_FIRST, object_class->type, GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, user_create_new_item), - gtk_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, + gtk_marshal_NONE__POINTER_POINTER_POINTER, + GTK_TYPE_NONE, 3, + GTK_TYPE_STRING, + GTK_TYPE_STRING, GTK_TYPE_STRING); gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -- cgit v1.2.3