aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-19 19:21:39 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-12-26 16:48:52 +0800
commitc4d4989d12cf0854167e8881e8077bece0c91161 (patch)
tree75af495675556e6ccaafd9505d08bf139621611e
parent5c9fcab82a633d6a627b033ceb954547da7257d2 (diff)
downloadgsoc2013-empathy-c4d4989d12cf0854167e8881e8077bece0c91161.tar
gsoc2013-empathy-c4d4989d12cf0854167e8881e8077bece0c91161.tar.gz
gsoc2013-empathy-c4d4989d12cf0854167e8881e8077bece0c91161.tar.bz2
gsoc2013-empathy-c4d4989d12cf0854167e8881e8077bece0c91161.tar.lz
gsoc2013-empathy-c4d4989d12cf0854167e8881e8077bece0c91161.tar.xz
gsoc2013-empathy-c4d4989d12cf0854167e8881e8077bece0c91161.tar.zst
gsoc2013-empathy-c4d4989d12cf0854167e8881e8077bece0c91161.zip
factor out empathy_webkit_show_inspector()
https://bugzilla.gnome.org/show_bug.cgi?id=684357
-rw-r--r--libempathy-gtk/empathy-theme-adium.c7
-rw-r--r--libempathy-gtk/empathy-webkit-utils.c12
-rw-r--r--libempathy-gtk/empathy-webkit-utils.h2
3 files changed, 15 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index f0667bccb..ee2b314fc 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -1744,13 +1744,8 @@ void
empathy_theme_adium_show_inspector (EmpathyThemeAdium *self)
{
WebKitWebView *web_view = WEBKIT_WEB_VIEW (self);
- WebKitWebInspector *inspector;
- g_object_set (G_OBJECT (webkit_web_view_get_settings (web_view)),
- "enable-developer-extras", TRUE, NULL);
-
- inspector = webkit_web_view_get_inspector (web_view);
- webkit_web_inspector_show (inspector);
+ empathy_webkit_show_inspector (web_view);
}
gboolean
diff --git a/libempathy-gtk/empathy-webkit-utils.c b/libempathy-gtk/empathy-webkit-utils.c
index 93abe71ca..f4194083b 100644
--- a/libempathy-gtk/empathy-webkit-utils.c
+++ b/libempathy-gtk/empathy-webkit-utils.c
@@ -313,3 +313,15 @@ empathy_webkit_context_menu_for_event (WebKitWebView *view,
g_object_unref (hit_test_result);
}
+
+void
+empathy_webkit_show_inspector (WebKitWebView *view)
+{
+ WebKitWebInspector *inspector;
+
+ g_object_set (G_OBJECT (webkit_web_view_get_settings (view)),
+ "enable-developer-extras", TRUE, NULL);
+
+ inspector = webkit_web_view_get_inspector (view);
+ webkit_web_inspector_show (inspector);
+}
diff --git a/libempathy-gtk/empathy-webkit-utils.h b/libempathy-gtk/empathy-webkit-utils.h
index bec8aaed5..9ab02eedd 100644
--- a/libempathy-gtk/empathy-webkit-utils.h
+++ b/libempathy-gtk/empathy-webkit-utils.h
@@ -45,6 +45,8 @@ void empathy_webkit_context_menu_for_event (WebKitWebView *view,
GdkEventButton *event,
EmpathyWebKitMenuFlags flags);
+void empathy_webkit_show_inspector (WebKitWebView *view);
+
G_END_DECLS
#endif