diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-06-18 13:23:06 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-06-18 13:23:06 +0800 |
commit | 68b50c270671de5d3e854ff949efcd66f4c2f745 (patch) | |
tree | 05d563948b0cabe9cd78508fa9a9d199949ad05f /mail | |
parent | b977b54e2febcb4cb767dcf5e26a273f86e7b5db (diff) | |
download | gsoc2013-evolution-68b50c270671de5d3e854ff949efcd66f4c2f745.tar.gz gsoc2013-evolution-68b50c270671de5d3e854ff949efcd66f4c2f745.tar.zst gsoc2013-evolution-68b50c270671de5d3e854ff949efcd66f4c2f745.zip |
** Fix for bug #445812 from Gilles Dartiguelongue
svn path=/trunk/; revision=33699
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/em-folder-view.c | 15 | ||||
-rw-r--r-- | mail/em-popup.c | 14 | ||||
-rw-r--r-- | mail/em-popup.h | 2 |
4 files changed, 34 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 7d4f844659..07eca6c462 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,13 @@ 2007-06-18 Srinivasa Ragavan <sragavan@novell.com> + ** Fix for bug #445812 from Gilles Dartiguelongue + + * em-folder-view.c: (emfv_on_url_cb): + * em-popup.c: (em_popup_target_new_uri): + * em-popup.h: + +2007-06-18 Srinivasa Ragavan <sragavan@novell.com> + ** Fix for bug #437935 from Gilles Dartiguelongue * em-folder-tree-model.c: (em_folder_tree_model_is_type_inbox): diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 3fe1db0aea..56efc8c345 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -2596,7 +2596,8 @@ emp_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, void *data) } static EPopupItem emfv_uri_popups[] = { - { E_POPUP_ITEM, "00.uri.15", N_("_Copy Link Location"), emp_uri_popup_link_copy, NULL, NULL, EM_POPUP_URI_NOT_MAILTO }, + { E_POPUP_ITEM, "00.uri.11", N_("C_all To..."), emp_uri_popup_link_copy, NULL, NULL, EM_POPUP_URI_CALLTO }, + { E_POPUP_ITEM, "00.uri.15", N_("_Copy Link Location"), emp_uri_popup_link_copy, NULL, "gtk-copy", EM_POPUP_URI_NOT_MAILTO }, { E_POPUP_SUBMENU, "99.uri.00", N_("Create _Search Folder"), NULL, NULL, NULL, EM_POPUP_URI_MAILTO }, { E_POPUP_ITEM, "99.uri.00/00.10", N_("_From this Address"), emp_uri_popup_vfolder_sender, NULL, NULL, EM_POPUP_URI_MAILTO }, @@ -2979,6 +2980,18 @@ emfv_on_url_cb (GObject *emitter, const char *url, EMFolderView *emfv) g_free(addr); camel_url_free(curl); camel_object_unref(cia); + } else if (strncmp (url, "callto:", 7) == 0 || strncmp (url, "h323:", 5) == 0 || strncmp (url, "sip:", 4) == 0) { + CamelInternetAddress *cia = camel_internet_address_new(); + CamelURL *curl; + char *addr; + + curl = camel_url_new(url, NULL); + camel_address_decode((CamelAddress *)cia, curl->path); + addr = camel_address_format((CamelAddress *)cia); + nice_url = g_strdup_printf (_("Click to call %s"), addr&&addr[0]?addr:(url + 7)); + g_free(addr); + camel_url_free(curl); + camel_object_unref(cia); } else if (!strncmp (url, "##", 2)) { nice_url = g_strdup (_("Click to hide/unhide addresses")); } else diff --git a/mail/em-popup.c b/mail/em-popup.c index b059926f94..f6f7372c40 100644 --- a/mail/em-popup.c +++ b/mail/em-popup.c @@ -275,10 +275,15 @@ em_popup_target_new_uri(EMPopup *emp, const char *uri) if (g_ascii_strncasecmp(uri, "http:", 5) == 0 || g_ascii_strncasecmp(uri, "https:", 6) == 0) mask &= ~EM_POPUP_URI_HTTP; + else if (g_ascii_strncasecmp(uri, "sip:", 3) == 0 + || g_ascii_strncasecmp(uri, "h323:", 5) == 0 + || g_ascii_strncasecmp(uri, "callto:", 7) == 0) + mask &= ~EM_POPUP_URI_CALLTO; + if (g_ascii_strncasecmp(uri, "mailto:", 7) == 0) mask &= ~EM_POPUP_URI_MAILTO; else - mask &= ~EM_POPUP_URI_NOT_MAILTO; + mask &= ~(EM_POPUP_URI_NOT_MAILTO|~mask); t->target.mask = mask; @@ -622,9 +627,9 @@ emp_uri_popup_address_add(EPopup *ep, EPopupItem *item, void *data) } static EPopupItem emp_standard_uri_popups[] = { - { E_POPUP_ITEM, "00.uri.00", N_("_Open Link in Browser"), emp_uri_popup_link_open, NULL, NULL, EM_POPUP_URI_NOT_MAILTO }, - { E_POPUP_ITEM, "00.uri.10", N_("_Send New Message To..."), emp_uri_popup_address_send, NULL, NULL, EM_POPUP_URI_MAILTO }, - { E_POPUP_ITEM, "00.uri.20", N_("_Add to Address Book"), emp_uri_popup_address_add, NULL, NULL, EM_POPUP_URI_MAILTO }, + { E_POPUP_ITEM, "00.uri.00", N_("_Open Link in Browser"), emp_uri_popup_link_open, NULL, NULL, EM_POPUP_URI_HTTP }, + { E_POPUP_ITEM, "00.uri.10", N_("_Send New Message To..."), emp_uri_popup_address_send, NULL, "stock_mail-compose", EM_POPUP_URI_MAILTO }, + { E_POPUP_ITEM, "00.uri.20", N_("_Add to Address Book"), emp_uri_popup_address_add, NULL, "gtk-add", EM_POPUP_URI_MAILTO }, }; /* ********************************************************************** */ @@ -858,6 +863,7 @@ static const EPopupHookTargetMask emph_uri_masks[] = { { "http", EM_POPUP_URI_HTTP }, { "mailto", EM_POPUP_URI_MAILTO }, { "notmailto", EM_POPUP_URI_NOT_MAILTO }, + { "callto", EM_POPUP_URI_CALLTO }, { 0 } }; diff --git a/mail/em-popup.h b/mail/em-popup.h index 0a26e9c523..8acf3831e2 100644 --- a/mail/em-popup.h +++ b/mail/em-popup.h @@ -114,12 +114,14 @@ enum _em_popup_target_select_t { * @EM_POPUP_URI_HTTP: This is a HTTP or HTTPS url. * @EM_POPUP_URI_MAILTO: This is a MAILTO url. * @EM_POPUP_URI_NOT_MAILTO: This is not a MAILTO url. + * @EM_POPUP_URI_CALLTO: This is a CALLTO url. * **/ enum _em_popup_target_uri_t { EM_POPUP_URI_HTTP = 1<<0, EM_POPUP_URI_MAILTO = 1<<1, EM_POPUP_URI_NOT_MAILTO = 1<<2, + EM_POPUP_URI_CALLTO = 1<<3, }; /** |