[anjal] Moblin Bugzilla: #3769 - Disable native webkit popups.



commit 5aca141660d97deeb031057fba415ff164e4ef03
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Wed Jun 24 12:43:18 2009 +0530

    Moblin Bugzilla: #3769 -  Disable native webkit popups.

 src/mail-message-view.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/mail-message-view.c b/src/mail-message-view.c
index 5e2f6c3..a52d5da 100644
--- a/src/mail-message-view.c
+++ b/src/mail-message-view.c
@@ -642,6 +642,15 @@ mmv_finished_webkit (WebKitWebView  *webkitwebview, WebKitWebFrame *arg1, gpoint
 	 gtk_label_set_text ((GtkLabel *)mmview->priv->spinner_label, _("Formatting message"));
 	 gtk_widget_show(mmview->priv->spinner);
 }
+
+static gboolean
+mmv_button_press (GtkWidget *widget, GdkEventButton *event, gpointer data)
+{
+	if (event->button == 3)
+		return TRUE;
+
+	return FALSE;
+}
 #endif
 
 #if HAVE_MOZILLA
@@ -880,6 +889,7 @@ mmv_create_webview (MailMessageView *mmv, GtkWidget *box)
 
 	g_signal_connect (web, "load-started", G_CALLBACK(mmv_finished_webkit), mmv);
 	g_signal_connect (web, "load-finished", G_CALLBACK(mmv_finished_loading_webkit), mmv);
+	g_signal_connect (web, "button-press-event", G_CALLBACK (mmv_button_press), mmv);
 
 	gtk_box_pack_start ((GtkBox *)box, (GtkWidget *)web, FALSE, FALSE, 0);
 	webkit_web_view_set_editable (web, FALSE);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]