diff options
author | Milan Crha <mcrha@redhat.com> | 2007-11-01 21:35:45 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2007-11-01 21:35:45 +0800 |
commit | 5a310a5c7f520b3b1e568d96b279a2b3fdf8730d (patch) | |
tree | 4973822a0556ce789dae0b371a8d3a07a6259ccf | |
parent | 88a914e0e874ece8e1aa2267256cc55d2bc54025 (diff) | |
download | gsoc2013-evolution-5a310a5c7f520b3b1e568d96b279a2b3fdf8730d.tar.gz gsoc2013-evolution-5a310a5c7f520b3b1e568d96b279a2b3fdf8730d.tar.zst gsoc2013-evolution-5a310a5c7f520b3b1e568d96b279a2b3fdf8730d.zip |
** Fix for bug #318592
2007-11-01 Milan Crha <mcrha@redhat.com>
** Fix for bug #318592
* e-msg-composer.h: (e_msg_composer_link_clicked):
* e-msg-composer.c: (e_msg_composer_link_clicked):
Helper function to response on editor's "link_clicked" event.
* listener.c: (impl_event): Call helper function on that event.
svn path=/trunk/; revision=34477
-rw-r--r-- | composer/ChangeLog | 9 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 21 | ||||
-rw-r--r-- | composer/e-msg-composer.h | 2 | ||||
-rw-r--r-- | composer/listener.c | 2 |
4 files changed, 34 insertions, 0 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index f848a1c8eb..5aaa7f86b0 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,12 @@ +2007-11-01 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #318592 + + * e-msg-composer.h: (e_msg_composer_link_clicked): + * e-msg-composer.c: (e_msg_composer_link_clicked): + Helper function to response on editor's "link_clicked" event. + * listener.c: (impl_event): Call helper function on that event. + 2007-11-01 Matthew Barnes <mbarnes@redhat.com> * e-msg-composer.c (e_msg_composer_set_body_text): diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 314f7f8ebf..f5b639dde0 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -63,6 +63,7 @@ #include <libgnome/gnome-exec.h> #include <libgnome/gnome-help.h> +#include <libgnome/gnome-url.h> #include <glib/gi18n.h> #include <libgnomeui/gnome-uidefs.h> #include <libgnomeui/gnome-window-icon.h> @@ -6630,6 +6631,26 @@ e_msg_composer_url_requested (EMsgComposer *composer, gchar *url) return part; } +void +e_msg_composer_link_clicked (EMsgComposer *composer, const gchar *url) +{ + g_return_if_fail (composer != NULL); + + if (url && *url && + g_ascii_strncasecmp (url, "mailto:", 7) && + g_ascii_strncasecmp (url, "thismessage:", 12) && + g_ascii_strncasecmp (url, "cid:", 4)) { + GError *err = NULL; + + gnome_url_show (url, &err); + + if (err) { + g_warning ("gnome_url_show: %s", err->message); + g_error_free (err); + } + } +} + EMsgComposerHdrs* e_msg_composer_get_hdrs (EMsgComposer *composer) { diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h index 9bddb9871e..a1ab0c1287 100644 --- a/composer/e-msg-composer.h +++ b/composer/e-msg-composer.h @@ -186,6 +186,8 @@ void e_msg_composer_delete (EMsgComposer *composer); gchar* e_msg_composer_resolve_image_url (EMsgComposer *composer, gchar *url); CamelMimePart* e_msg_composer_url_requested (EMsgComposer *composer, gchar *url); +void e_msg_composer_link_clicked (EMsgComposer *composer, const gchar *url); + EMsgComposerHdrs* e_msg_composer_get_hdrs (EMsgComposer *composer); void e_msg_composer_set_saved (EMsgComposer *composer); void e_msg_composer_set_send_options (EMsgComposer *composer, diff --git a/composer/listener.c b/composer/listener.c index 5f32ba53da..9bfd11a13d 100644 --- a/composer/listener.c +++ b/composer/listener.c @@ -117,6 +117,8 @@ impl_event (PortableServer_Servant _servant, camel_object_unref (cstream); + } else if (!strcmp (name, "link_clicked")) { + e_msg_composer_link_clicked (l->composer, BONOBO_ARG_GET_STRING (arg)); } return rv ? rv : get_any_null (); |