diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2005-07-06 12:11:14 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2005-07-06 12:11:14 +0800 |
commit | 4d41f5fc92fa62785cdde58fd81c136960490363 (patch) | |
tree | 2feca051279067d04763d8c423ad4a4cffcfe287 /addressbook/gui | |
parent | e7faa9958236bf7f91f9c55c3cec4ecca87cd3c8 (diff) | |
download | gsoc2013-evolution-4d41f5fc92fa62785cdde58fd81c136960490363.tar.gz gsoc2013-evolution-4d41f5fc92fa62785cdde58fd81c136960490363.tar.zst gsoc2013-evolution-4d41f5fc92fa62785cdde58fd81c136960490363.zip |
Fixed for bug 309245. Fixes the bug 206774, 242154. Fixes the bug 206774,
2005-07-06 Srinivasa Ragavan <sragavan@novell.com>
* gui/widgets/eab-gui-util.c: (contact_added_cb): Fixed for bug
309245.
* /gui/widgets/e-addressbook-view.c: Fixes the bug 206774, 242154.
* gui/widgets/eab-popup.c: (eab_popup_target_new_select) Fixes the
bug 206774, 242154.
* gui/widgets/eab-popup.h: Fixes the bug 206774, 242154.
svn path=/trunk/; revision=29641
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 18 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-popup.c | 7 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-popup.h | 2 |
4 files changed, 26 insertions, 3 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index feaabbb53b..106f53292c 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -897,6 +897,15 @@ move_to_folder (EPopup *ep, EPopupItem *pitem, void *data) } static void +open_contact (EPopup *ep, EPopupItem *pitem, void *data) +{ + ContactAndBook *contact_and_book = data; + + eab_view_view (contact_and_book->view); +} + + +static void new_card (EPopup *ep, EPopupItem *pitem, void *data) { /*ContactAndBook *contact_and_book = data;*/ @@ -917,13 +926,18 @@ new_list (EPopup *ep, EPopupItem *pitem, void *data) } static EPopupItem eabv_popup_items[] = { + { E_POPUP_ITEM, "05.open", N_("_Open"), open_contact, NULL, NULL, EAB_POPUP_SELECT_ANY|EAB_POPUP_SELECT_EDITABLE }, + { E_POPUP_BAR, "10.bar" }, { E_POPUP_ITEM, "10.new", N_("New Contact..."), new_card, NULL, "stock_contact", 0, EAB_POPUP_SELECT_EDITABLE}, { E_POPUP_ITEM, "15.newlist", N_("New Contact List..."), new_list, NULL, "stock_contact-list", 0, EAB_POPUP_SELECT_EDITABLE }, { E_POPUP_BAR, "20.bar" }, { E_POPUP_ITEM, "30.saveas", N_("Save as VCard..."), save_as, NULL, "stock_save-as", 0, EAB_POPUP_SELECT_ANY }, - { E_POPUP_ITEM, "40.forward", N_("Forward Contact"), send_as, NULL, "stock_mail-forward", 0, EAB_POPUP_SELECT_ANY }, - { E_POPUP_ITEM, "50.mailto", N_("Send Message to Contact"), send_to, NULL, "stock_mail-send", 0, EAB_POPUP_SELECT_ANY|EAB_POPUP_SELECT_EMAIL }, + { E_POPUP_ITEM, "40.forward", N_("Forward Contact"), send_as, NULL, "stock_mail-forward", EAB_POPUP_SELECT_ONE }, + { E_POPUP_ITEM, "40.forward", N_("Forward Contacts"), send_as, NULL, "stock_mail-forward", EAB_POPUP_SELECT_MANY }, + { E_POPUP_ITEM, "50.mailto", N_("Send Message to Contact"), send_to, NULL, "stock_mail-send", EAB_POPUP_SELECT_ONE|EAB_POPUP_SELECT_EMAIL|EAB_POPUP_CONTACT }, + { E_POPUP_ITEM, "50.mailto", N_("Send Message to List"), send_to, NULL, "stock_mail-send", EAB_POPUP_SELECT_ONE|EAB_POPUP_SELECT_EMAIL|EAB_POPUP_LIST }, + { E_POPUP_ITEM, "50.mailto", N_("Send Message to Contacts"), send_to, NULL, "stock_mail-send", EAB_POPUP_SELECT_MANY|EAB_POPUP_SELECT_EMAIL }, { E_POPUP_ITEM, "60.print", N_("Print"), print, NULL, "stock_print", 0, EAB_POPUP_SELECT_ANY }, { E_POPUP_BAR, "70.bar" }, diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 4a6ce2f470..836843da10 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -671,7 +671,7 @@ contact_added_cb (EBook* book, EBookStatus status, const char *id, gpointer user { ContactCopyProcess *process = user_data; - if (status != E_BOOK_ERROR_OK) { + if (status != E_BOOK_ERROR_OK && status != E_BOOK_ERROR_CANCELLED) { eab_error_dialog (_("Error adding contact"), status); } else { process_unref (process); diff --git a/addressbook/gui/widgets/eab-popup.c b/addressbook/gui/widgets/eab-popup.c index 8a292b745f..4a745a41f2 100644 --- a/addressbook/gui/widgets/eab-popup.c +++ b/addressbook/gui/widgets/eab-popup.c @@ -155,6 +155,13 @@ eab_popup_target_new_select(EABPopup *eabp, struct _EBook *book, int readonly, G } } + if (cards->len == 1) { + if (e_contact_get (E_CONTACT(cards->pdata[0]), E_CONTACT_IS_LIST)) + mask &= ~EAB_POPUP_LIST; + else + mask &= ~EAB_POPUP_CONTACT; + } + if (has_email) mask &= ~EAB_POPUP_SELECT_EMAIL; diff --git a/addressbook/gui/widgets/eab-popup.h b/addressbook/gui/widgets/eab-popup.h index 20aab2edfe..11e46f4c8c 100644 --- a/addressbook/gui/widgets/eab-popup.h +++ b/addressbook/gui/widgets/eab-popup.h @@ -65,6 +65,8 @@ enum _eab_popup_target_select_t { EAB_POPUP_SELECT_ANY = 1<<2, EAB_POPUP_SELECT_EDITABLE = 1<<3, EAB_POPUP_SELECT_EMAIL = 1<<4, + EAB_POPUP_LIST = 1<<5, + EAB_POPUP_CONTACT = 1<<6, }; /** |