diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-08-02 14:25:50 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-08-02 14:25:50 +0800 |
commit | 18b20048a2813ef487b3dbb08343d1b84991a30e (patch) | |
tree | 0cdbb80085d6940d4859350bb7575e8e97470929 /addressbook/gui/component | |
parent | 77316d782f31a8c321dbe8ccb9220c0a85f7fc47 (diff) | |
download | gsoc2013-evolution-18b20048a2813ef487b3dbb08343d1b84991a30e.tar gsoc2013-evolution-18b20048a2813ef487b3dbb08343d1b84991a30e.tar.gz gsoc2013-evolution-18b20048a2813ef487b3dbb08343d1b84991a30e.tar.bz2 gsoc2013-evolution-18b20048a2813ef487b3dbb08343d1b84991a30e.tar.lz gsoc2013-evolution-18b20048a2813ef487b3dbb08343d1b84991a30e.tar.xz gsoc2013-evolution-18b20048a2813ef487b3dbb08343d1b84991a30e.tar.zst gsoc2013-evolution-18b20048a2813ef487b3dbb08343d1b84991a30e.zip |
Added ContactsSaveAsVCard, ContactsSendContactToOther, and
2001-08-02 Christopher James Lahey <clahey@ximian.com>
* gui/component/addressbook.c: Added ContactsSaveAsVCard,
ContactsSendContactToOther, and ContactsSendMessageToContact verbs
here.
* gui/widgets/e-addressbook-view.c (e_addressbook_view_save_as,
e_addressbook_view_send, e_addressbook_view_send_to): New
functions to allow outside users to cause the addressbook to save,
send, or send a message to its selection.
svn path=/trunk/; revision=11567
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/addressbook.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index cb52b6fd5d..9337bfd601 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -83,6 +83,13 @@ new_contact_list_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void +save_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) +{ + AddressbookView *view = (AddressbookView *) user_data; + e_addressbook_view_save_as(view->view); +} + +static void config_cb (BonoboUIComponent *uih, void *user_data, const char *path) { addressbook_config (NULL /* XXX */); @@ -152,6 +159,20 @@ select_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *pat } static void +send_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) +{ + AddressbookView *view = (AddressbookView *) user_data; + e_addressbook_view_send(view->view); +} + +static void +send_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path) +{ + AddressbookView *view = (AddressbookView *) user_data; + e_addressbook_view_send_to(view->view); +} + +static void update_command_state (EAddressbookView *eav, AddressbookView *view) { BonoboUIComponent *uic = bonobo_control_get_ui_component (view->control); @@ -166,6 +187,11 @@ update_command_state (EAddressbookView *eav, AddressbookView *view) "sensitive", e_addressbook_view_can_create (view->view) ? "1" : "0", NULL); + bonobo_ui_component_set_prop (uic, + "/commands/ContactsSaveAsVCard", + "sensitive", + e_addressbook_view_can_save_as (view->view) ? "1" : "0", NULL); + /* Print Contact */ bonobo_ui_component_set_prop (uic, "/commands/ContactsPrint", @@ -195,6 +221,16 @@ update_command_state (EAddressbookView *eav, AddressbookView *view) "sensitive", e_addressbook_view_can_select_all (view->view) ? "1" : "0", NULL); + bonobo_ui_component_set_prop (uic, + "/commands/ContactsSendContactToOther", + "sensitive", + e_addressbook_view_can_send (view->view) ? "1" : "0", NULL); + + bonobo_ui_component_set_prop (uic, + "/commands/ContactsSendMessageToContact", + "sensitive", + e_addressbook_view_can_send_to (view->view) ? "1" : "0", NULL); + /* Stop */ bonobo_ui_component_set_prop (uic, @@ -211,6 +247,7 @@ change_view_type (AddressbookView *view, EAddressbookViewType view_type) BonoboUIVerb verbs [] = { BONOBO_UI_UNSAFE_VERB ("ContactsPrint", print_cb), + BONOBO_UI_UNSAFE_VERB ("ContactsSaveAsVCard", save_contact_cb), BONOBO_UI_UNSAFE_VERB ("ToolSearch", search_cb), BONOBO_UI_UNSAFE_VERB ("AddressbookConfig", config_cb), @@ -224,6 +261,9 @@ BonoboUIVerb verbs [] = { BONOBO_UI_UNSAFE_VERB ("ContactsCopy", copy_contacts_cb), BONOBO_UI_UNSAFE_VERB ("ContactsPaste", paste_contacts_cb), BONOBO_UI_UNSAFE_VERB ("ContactsSelectAll", select_all_contacts_cb), + + BONOBO_UI_UNSAFE_VERB ("ContactsSendContactToOther", send_contact_cb), + BONOBO_UI_UNSAFE_VERB ("ContactsSendMessageToContact", send_contact_to_cb), BONOBO_UI_VERB_END }; |