[empathy] factor out empathy_webkit_show_inspector()



commit c4d4989d12cf0854167e8881e8077bece0c91161
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Sep 19 13:21:39 2012 +0200

    factor out empathy_webkit_show_inspector()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684357

 libempathy-gtk/empathy-theme-adium.c  |    7 +------
 libempathy-gtk/empathy-webkit-utils.c |   12 ++++++++++++
 libempathy-gtk/empathy-webkit-utils.h |    2 ++
 3 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index f0667bc..ee2b314 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 93abe71..f419408 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 bec8aae..9ab02ee 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



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