diff options
author | Peter Williams <peterw@ximian.com> | 2001-08-14 05:59:50 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-08-14 05:59:50 +0800 |
commit | ecc57b7556cc3a9ec9137520f981384f26eb6ba7 (patch) | |
tree | 087e4ce771a1433739910686abf3980d45300653 /mail/component-factory.c | |
parent | df8180e04abf2efd32ca0624484df5b35e564759 (diff) | |
download | gsoc2013-evolution-ecc57b7556cc3a9ec9137520f981384f26eb6ba7.tar.gz gsoc2013-evolution-ecc57b7556cc3a9ec9137520f981384f26eb6ba7.tar.zst gsoc2013-evolution-ecc57b7556cc3a9ec9137520f981384f26eb6ba7.zip |
New function, handle "user creatable items". (component_fn): Tell the
2001-08-13 Peter Williams <peterw@ximian.com>
* component-factory.c (user_create_new_item_cb): New function,
handle "user creatable items".
(component_fn): Tell the shell that we're capable of creating
mail messages.
svn path=/trunk/; revision=11965
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c index c11706e628..73147a1dab 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -697,6 +697,21 @@ handle_external_uri_cb (EvolutionShellComponent *shell_component, send_to_url (uri); } +static void +user_create_new_item_cb (EvolutionShellComponent *shell_component, + const char *id, + const char *parent_folder_physical_uri, + const char *parent_folder_type, + gpointer data) +{ + if (!strcmp (id, "message")) { + send_to_url (NULL); + return; + } + + g_warning ("Don't know how to create item of type \"%s\"", id); +} + static BonoboObject * component_fn (BonoboGenericFactory *factory, void *closure) { @@ -720,6 +735,8 @@ component_fn (BonoboGenericFactory *factory, void *closure) bonobo_object_add_interface (BONOBO_OBJECT (shell_component), BONOBO_OBJECT (destination_interface)); + evolution_shell_component_add_user_creatable_item (shell_component, "message", _("New Mail Message"), _("New _Mail Message"), 'm'); + gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", GTK_SIGNAL_FUNC (owner_set_cb), NULL); gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset", @@ -730,6 +747,8 @@ component_fn (BonoboGenericFactory *factory, void *closure) GTK_SIGNAL_FUNC (owner_unset_cb), NULL); gtk_signal_connect (GTK_OBJECT (shell_component), "handle_external_uri", GTK_SIGNAL_FUNC (handle_external_uri_cb), NULL); + gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item", + GTK_SIGNAL_FUNC (user_create_new_item_cb), NULL); offline_handler = mail_offline_handler_new (); bonobo_object_add_interface (BONOBO_OBJECT (shell_component), BONOBO_OBJECT (offline_handler)); |