aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c4
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-folder-view.c15
-rw-r--r--mail/em-popup.c14
-rw-r--r--mail/em-popup.h2
6 files changed, 42 insertions, 7 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 96494e4230..932c016cdd 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-18 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #445812 from Gilles Dartiguelongue
+
+ * gui/widgets/eab-contact-display.c:
+
2007-06-11 Milan Crha <mcrha@redhat.com>
** Fix for bug #325882
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index c45ac78e7b..d6f020324f 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -170,8 +170,8 @@ eab_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EABContac
static EPopupItem eab_uri_popups[] = {
{ E_POPUP_ITEM, "05.open", N_("_Open Link in Browser"), eab_uri_popup_link_open, NULL, NULL, EAB_POPUP_URI_NOT_MAILTO },
- { E_POPUP_ITEM, "10.copy", N_("_Copy Link Location"), eab_uri_popup_link_copy, NULL, NULL, EAB_POPUP_URI_NOT_MAILTO },
- { E_POPUP_ITEM, "15.send", N_("_Send New Message To..."), eab_uri_popup_address_send, NULL, NULL, EAB_POPUP_URI_MAILTO},
+ { E_POPUP_ITEM, "10.copy", N_("_Copy Link Location"), eab_uri_popup_link_copy, NULL, "gtk-copy", EAB_POPUP_URI_NOT_MAILTO },
+ { E_POPUP_ITEM, "15.send", N_("_Send New Message To..."), eab_uri_popup_address_send, NULL, "stock_mail-compose", EAB_POPUP_URI_MAILTO},
{ E_POPUP_ITEM, "20.copy", N_("Copy _Email Address"), eab_uri_popup_email_address_copy, NULL, "gtk-copy", EAB_POPUP_URI_MAILTO},
};
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,
};
/**