[yelp] [libyelp/yelp-view] printf javascript alert, useful for debugging
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] [libyelp/yelp-view] printf javascript alert, useful for debugging
- Date: Wed, 8 Dec 2010 18:13:38 +0000 (UTC)
commit e9dab4a3d96e4925cf0132a3200f764fac1d6746
Author: Shaun McCance <shaunm gnome org>
Date: Wed Dec 8 13:13:14 2010 -0500
[libyelp/yelp-view] printf javascript alert, useful for debugging
libyelp/yelp-view.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index 9db6be8..5c60557 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -76,6 +76,10 @@ static void popup_save_code (GtkMenuItem *item,
static void view_populate_popup (YelpView *view,
GtkMenu *menu,
gpointer data);
+static void view_script_alert (YelpView *view,
+ WebKitWebFrame *frame,
+ gchar **message,
+ gpointer data);
static gboolean view_navigation_requested (WebKitWebView *view,
WebKitWebFrame *frame,
WebKitNetworkRequest *request,
@@ -269,6 +273,8 @@ yelp_view_init (YelpView *view)
G_CALLBACK (view_set_vadjustment), NULL);
g_signal_connect (view, "populate-popup",
G_CALLBACK (view_populate_popup), NULL);
+ g_signal_connect (view, "script-alert",
+ G_CALLBACK (view_script_alert), NULL);
priv->action_group = gtk_action_group_new ("YelpView");
gtk_action_group_set_translation_domain (priv->action_group, GETTEXT_PACKAGE);
@@ -1179,6 +1185,15 @@ view_populate_popup (YelpView *view,
gtk_widget_show_all (GTK_WIDGET (menu));
}
+static void
+view_script_alert (YelpView *view,
+ WebKitWebFrame *frame,
+ gchar **message,
+ gpointer data)
+{
+ printf ("\n\n===ALERT===\n%s\n\n", message);
+}
+
static gboolean
view_navigation_requested (WebKitWebView *view,
WebKitWebFrame *frame,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]