[gtk/fix-fishbowl] gtk-demo: Fix fishbowl setup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-fishbowl] gtk-demo: Fix fishbowl setup
- Date: Mon, 11 Feb 2019 13:52:40 +0000 (UTC)
commit 220ccaf363e48a1dc30861da6501090ad020fea1
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Feb 11 08:24:06 2019 -0500
gtk-demo: Fix fishbowl setup
The fishbowl demo was failing to reset a static variable
when setting up, causing it to crash the second time around.
Closes: #1665
demos/gtk-demo/fishbowl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/demos/gtk-demo/fishbowl.c b/demos/gtk-demo/fishbowl.c
index af5a3ae8f9..0f926c8fd1 100644
--- a/demos/gtk-demo/fishbowl.c
+++ b/demos/gtk-demo/fishbowl.c
@@ -264,7 +264,10 @@ do_fishbowl (GtkWidget *do_widget)
NULL);
gtk_builder_connect_signals (builder, NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
+ g_signal_connect (window, "destroy",
+ G_CALLBACK (gtk_widget_destroyed), &window);
bowl = GTK_WIDGET (gtk_builder_get_object (builder, "bowl"));
+ selected_widget_type = -1;
set_widget_type (GTK_FISHBOWL (bowl), 0);
gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget));
@@ -279,6 +282,5 @@ do_fishbowl (GtkWidget *do_widget)
else
gtk_widget_destroy (window);
-
return window;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]