pidgin: 99e45113: Destroy the inspector window when a tab ...

qulogic at pidgin.im qulogic at pidgin.im
Thu Sep 22 03:50:49 EDT 2011


----------------------------------------------------------------------
Revision: 99e45113699d6b9dee918ac11cdc124dc6ea5f0b
Parent:   388197f8d51b8d4eefd761c6a41d642829ad27f3
Author:   qulogic at pidgin.im
Date:     09/21/11 17:10:14
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/99e45113699d6b9dee918ac11cdc124dc6ea5f0b

Changelog: 

Destroy the inspector window when a tab is closed. This prevents
a crash if you try to use the inspector without the tab open.
Also, remove an unused variable.

Changes against parent 388197f8d51b8d4eefd761c6a41d642829ad27f3

  patched  pidgin/plugins/webkit.c

-------------- next part --------------
============================================================
--- pidgin/plugins/webkit.c	b0f6b8ff237fe25b64eb5291b46160a16fe47e99
+++ pidgin/plugins/webkit.c	151aa009b01abdb56bdf6d866c1e29cbb6dcf962
@@ -46,6 +46,7 @@ create_gtk_window_around_it(WebKitWebIns
 	gtk_window_set_title(GTK_WINDOW(win), title);
 	g_free(title);
 	gtk_window_set_default_size(GTK_WINDOW(win), 600, 400);
+	g_signal_connect_swapped(G_OBJECT(gtkconv->tab_cont), "destroy", G_CALLBACK(gtk_widget_destroy), win);
 
 	view = webkit_web_view_new();
 	gtk_container_add(GTK_CONTAINER(win), view);
@@ -91,14 +92,12 @@ remove_inspector(PidginConversation *gtk
 	GtkWidget *webview = gtkconv->webview;
 	GtkWidget *win;
 	WebKitWebSettings *settings;
-	WebKitWebInspector *inspector;
 
 	win = g_object_get_data(G_OBJECT(webview), "inspector-window");
 	gtk_widget_destroy(win);
 	g_object_set_data(G_OBJECT(webview), "inspector-window", NULL);
 
 	settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webview));
-	inspector = webkit_web_view_get_inspector(WEBKIT_WEB_VIEW(webview));
 
 	g_object_set(G_OBJECT(settings), "enable-developer-extras", FALSE, NULL);
 }


More information about the Commits mailing list