diff options
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/addressbook-component.c | 11 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook.c | 11 |
2 files changed, 18 insertions, 4 deletions
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index b066b94b3e..17da13b43e 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -553,6 +553,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[0].tooltip = _("Create a new contact"); list->_buffer[0].menuShortcut = 'c'; list->_buffer[0].iconName = "evolution-contacts-mini.png"; + list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT; list->_buffer[1].id = "contact_list"; list->_buffer[1].description = _("New Contact List"); @@ -560,13 +561,15 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[1].tooltip = _("Create a new contact list"); list->_buffer[1].menuShortcut = 'l'; list->_buffer[1].iconName = "contact-list-16.png"; + list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT; list->_buffer[2].id = "address_book"; - list->_buffer[2].description = _("New Addressbook Book"); - list->_buffer[2].menuDescription = _("_Address Book"); - list->_buffer[2].tooltip = _("Create a new address book"); - list->_buffer[2].menuShortcut = 'a'; + list->_buffer[2].description = _("New Contacts Group"); + list->_buffer[2].menuDescription = _("_Contacts Group"); + list->_buffer[2].tooltip = _("Create a new contacts group"); + list->_buffer[2].menuShortcut = 'g'; list->_buffer[2].iconName = "evolution-contacts-mini.png"; + list->_buffer[2].type = GNOME_Evolution_CREATABLE_FOLDER; return list; } diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index a698094a94..6de2d8d921 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -39,6 +39,7 @@ #include <gal/util/e-util.h> #include "e-util/e-passwords.h" +#include "shell/e-user-creatable-items-handler.h" #include "evolution-shell-component-utils.h" #include "e-activity-handler.h" @@ -76,6 +77,7 @@ typedef struct { BonoboPropertyBag *properties; ESourceList *source_list; char *passwd; + EUserCreatableItemsHandler *creatable_items_handler; } AddressbookView; static void addressbook_view_ref (AddressbookView *); @@ -458,6 +460,8 @@ control_activate (BonoboControl *control, e_pixmaps_update (uic, pixmaps); + e_user_creatable_items_handler_activate (view->creatable_items_handler, uic); + bonobo_ui_component_thaw (uic, NULL); if (v) @@ -554,6 +558,11 @@ addressbook_view_clear (AddressbookView *view) g_hash_table_destroy (view->uid_to_view); view->uid_to_view = NULL; } + + if (view->creatable_items_handler) { + g_object_unref (view->creatable_items_handler); + view->creatable_items_handler = NULL; + } } static void @@ -1126,6 +1135,8 @@ addressbook_new_control (void) "changed", G_CALLBACK (source_list_changed_cb), view); + view->creatable_items_handler = e_user_creatable_items_handler_new ("contacts"); + g_signal_connect (view->control, "activate", G_CALLBACK (control_activate_cb), view); |