[evolution/webkit-composer] Add action to open WebKit Inspector from the test application
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer] Add action to open WebKit Inspector from the test application
- Date: Wed, 15 Aug 2012 10:59:44 +0000 (UTC)
commit 8ecfea71112783d092ff786d073e62f05a8940af
Author: Dan VrÃtil <dvratil redhat com>
Date: Wed Aug 15 12:59:04 2012 +0200
Add action to open WebKit Inspector from the test application
widgets/editor/e-editor-test.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/widgets/editor/e-editor-test.c b/widgets/editor/e-editor-test.c
index ba614e6..e972a60 100644
--- a/widgets/editor/e-editor-test.c
+++ b/widgets/editor/e-editor-test.c
@@ -47,6 +47,7 @@ static const gchar *view_ui =
" <menuitem action='view-html-output'/>\n"
" <menuitem action='view-html-source'/>\n"
" <menuitem action='view-plain-source'/>\n"
+" <menuitem action='view-inspector'/>\n"
" </menu>\n"
" </menubar>\n"
"</ui>";
@@ -264,6 +265,19 @@ action_view_plain_source (GtkAction *action,
view_source_dialog (editor, _("Plain Source"), "text/plain", FALSE);
}
+static void
+action_view_inspector (GtkAction *action,
+ EEditor *editor)
+{
+ WebKitWebInspector *inspector;
+ EEditorWidget *widget;
+
+ widget = e_editor_get_editor_widget (editor);
+ inspector = webkit_web_view_get_inspector (WEBKIT_WEB_VIEW (widget));
+
+ webkit_web_inspector_show (inspector);
+}
+
static GtkActionEntry file_entries[] = {
{ "print",
@@ -332,6 +346,13 @@ static GtkActionEntry view_entries[] = {
NULL,
G_CALLBACK (action_view_plain_source) },
+ { "view-inspector",
+ NULL,
+ N_("Inspector"),
+ NULL,
+ NULL,
+ G_CALLBACK (action_view_inspector) },
+
{ "view-menu",
NULL,
N_("_View"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]