aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-28 20:54:50 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-28 20:54:50 +0800
commitc973419aca3319ba42363cd01fbbe8f762a3d7c6 (patch)
treeab139a11d1a31c3159218a3328c557e32e6da804 /widgets
parent9afe9af75c7fadd556582327cda05ef978700c91 (diff)
downloadgsoc2013-evolution-c973419aca3319ba42363cd01fbbe8f762a3d7c6.tar
gsoc2013-evolution-c973419aca3319ba42363cd01fbbe8f762a3d7c6.tar.gz
gsoc2013-evolution-c973419aca3319ba42363cd01fbbe8f762a3d7c6.tar.bz2
gsoc2013-evolution-c973419aca3319ba42363cd01fbbe8f762a3d7c6.tar.lz
gsoc2013-evolution-c973419aca3319ba42363cd01fbbe8f762a3d7c6.tar.xz
gsoc2013-evolution-c973419aca3319ba42363cd01fbbe8f762a3d7c6.tar.zst
gsoc2013-evolution-c973419aca3319ba42363cd01fbbe8f762a3d7c6.zip
Bug #641374 - "Send new mail to..." popup action doesn't work
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-web-view.c18
-rw-r--r--widgets/misc/e-web-view.h1
2 files changed, 18 insertions, 1 deletions
diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c
index d227a720ad..0e90d7dff9 100644
--- a/widgets/misc/e-web-view.c
+++ b/widgets/misc/e-web-view.c
@@ -88,6 +88,7 @@ enum {
STATUS_MESSAGE,
STOP_LOADING,
UPDATE_ACTIONS,
+ PROCESS_MAILTO,
LAST_SIGNAL
};
@@ -337,6 +338,7 @@ action_send_message_cb (GtkAction *action,
{
const gchar *uri;
gpointer parent;
+ gboolean handled;
parent = gtk_widget_get_toplevel (GTK_WIDGET (web_view));
parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
@@ -344,7 +346,11 @@ action_send_message_cb (GtkAction *action,
uri = e_web_view_get_selected_uri (web_view);
g_return_if_fail (uri != NULL);
- e_show_uri (parent, uri);
+ handled = FALSE;
+ g_signal_emit (web_view, signals[PROCESS_MAILTO], 0, uri, &handled);
+
+ if (!handled)
+ e_show_uri (parent, uri);
}
static void
@@ -1335,6 +1341,16 @@ e_web_view_class_init (EWebViewClass *class)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+
+ /* return TRUE when a signal handler processed the mailto URI */
+ signals[PROCESS_MAILTO] = g_signal_new (
+ "process-mailto",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EWebViewClass, process_mailto),
+ NULL, NULL,
+ e_marshal_BOOLEAN__STRING,
+ G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
}
static void
diff --git a/widgets/misc/e-web-view.h b/widgets/misc/e-web-view.h
index f7ffefe935..1ad87c6756 100644
--- a/widgets/misc/e-web-view.h
+++ b/widgets/misc/e-web-view.h
@@ -88,6 +88,7 @@ struct _EWebViewClass {
const gchar *status_message);
void (*stop_loading) (EWebView *web_view);
void (*update_actions) (EWebView *web_view);
+ gboolean (*process_mailto) (EWebView *web_view, const gchar *mailto_uri);
};
GType e_web_view_get_type (void);