Revision: 1835 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1835&view=re... Author: colombanw Date: 2011-01-13 19:39:19 +0000 (Thu, 13 Jan 2011)
Log Message: ----------- WebHelper: Prevent separate window from being destroyed by the user
Modified Paths: -------------- trunk/geany-plugins/webhelper/src/gwh-plugin.c
Modified: trunk/geany-plugins/webhelper/src/gwh-plugin.c =================================================================== --- trunk/geany-plugins/webhelper/src/gwh-plugin.c 2011-01-13 19:38:55 UTC (rev 1834) +++ trunk/geany-plugins/webhelper/src/gwh-plugin.c 2011-01-13 19:39:19 UTC (rev 1835) @@ -73,6 +73,15 @@ static GwhSettings *G_settings = NULL;
+static gboolean +on_separate_window_delete_event (GtkWidget *widget, + GdkEvent *event, + gpointer data) +{ + /* never honor delete-event */ + return TRUE; +} + static void on_separate_window_destroy (GtkWidget *widget, gpointer data) @@ -109,6 +118,8 @@ "title", _("Web view"), "deletable", FALSE, NULL); + g_signal_connect (window, "delete-event", + G_CALLBACK (on_separate_window_delete_event), NULL); g_signal_connect (window, "destroy", G_CALLBACK (on_separate_window_destroy), NULL); gtk_container_add (GTK_CONTAINER (window), G_browser);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org