Commit c4d4989d authored by Guillaume Desmottes's avatar Guillaume Desmottes

factor out empathy_webkit_show_inspector()

https://bugzilla.gnome.org/show_bug.cgi?id=684357
parent 5c9fcab8
...@@ -1744,13 +1744,8 @@ void ...@@ -1744,13 +1744,8 @@ void
empathy_theme_adium_show_inspector (EmpathyThemeAdium *self) empathy_theme_adium_show_inspector (EmpathyThemeAdium *self)
{ {
WebKitWebView *web_view = WEBKIT_WEB_VIEW (self); WebKitWebView *web_view = WEBKIT_WEB_VIEW (self);
WebKitWebInspector *inspector;
g_object_set (G_OBJECT (webkit_web_view_get_settings (web_view)), empathy_webkit_show_inspector (web_view);
"enable-developer-extras", TRUE, NULL);
inspector = webkit_web_view_get_inspector (web_view);
webkit_web_inspector_show (inspector);
} }
gboolean gboolean
......
...@@ -313,3 +313,15 @@ empathy_webkit_context_menu_for_event (WebKitWebView *view, ...@@ -313,3 +313,15 @@ empathy_webkit_context_menu_for_event (WebKitWebView *view,
g_object_unref (hit_test_result); 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);
}
...@@ -45,6 +45,8 @@ void empathy_webkit_context_menu_for_event (WebKitWebView *view, ...@@ -45,6 +45,8 @@ void empathy_webkit_context_menu_for_event (WebKitWebView *view,
GdkEventButton *event, GdkEventButton *event,
EmpathyWebKitMenuFlags flags); EmpathyWebKitMenuFlags flags);
void empathy_webkit_show_inspector (WebKitWebView *view);
G_END_DECLS G_END_DECLS
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment