diff options
author | Dan Winship <danw@src.gnome.org> | 2004-04-09 23:51:36 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2004-04-09 23:51:36 +0800 |
commit | c35cccb170c74c3656ce0981b7e6376d712fca5b (patch) | |
tree | 0c763052d0cad5df607203f70d67ce4b42f72a8e /addressbook | |
parent | d084ec18e84d91c36dc68d4c336511577d816a7a (diff) | |
download | gsoc2013-evolution-c35cccb170c74c3656ce0981b7e6376d712fca5b.tar.gz gsoc2013-evolution-c35cccb170c74c3656ce0981b7e6376d712fca5b.tar.zst gsoc2013-evolution-c35cccb170c74c3656ce0981b7e6376d712fca5b.zip |
create an EUserCreatableItemsHandler (addressbook_view_clear): destroy it
* gui/component/addressbook.c (addressbook_new_control): create an
EUserCreatableItemsHandler
(addressbook_view_clear): destroy it
(control_activate): Activate it
* gui/component/addressbook-component.c
(impl__get_userCreatableItems): Add object/folder flags to the
creatable items. Rename "Address Book" to "Contacts Group" per new
specs
svn path=/trunk/; revision=25381
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 12 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-component.c | 11 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook.c | 11 |
3 files changed, 30 insertions, 4 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 3702604460..4550e08d32 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,15 @@ +2004-04-09 Dan Winship <danw@ximian.com> + + * gui/component/addressbook.c (addressbook_new_control): create an + EUserCreatableItemsHandler + (addressbook_view_clear): destroy it + (control_activate): Activate it + + * gui/component/addressbook-component.c + (impl__get_userCreatableItems): Add object/folder flags to the + creatable items. Rename "Address Book" to "Contacts Group" per new + specs + 2004-04-07 Chris Toshok <toshok@ximian.com> * util/e-destination.c (e_destination_copy): we don't have an 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); |