[gtk+/wip/baedert/gtkimageview: 89/160] demo: Make sure the image_view stays alive long enough
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gtkimageview: 89/160] demo: Make sure the image_view stays alive long enough
- Date: Sun, 5 Jun 2016 14:30:10 +0000 (UTC)
commit dcf4b2afe348624dd754cad4aebe596f3dad4a04
Author: Timm Bäder <mail baedert org>
Date: Fri Jan 22 21:22:16 2016 +0100
demo: Make sure the image_view stays alive long enough
demos/gtk-demo/image_view.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/demos/gtk-demo/image_view.c b/demos/gtk-demo/image_view.c
index b41e20b..965d6a7 100644
--- a/demos/gtk-demo/image_view.c
+++ b/demos/gtk-demo/image_view.c
@@ -118,10 +118,12 @@ scrolled_check_button_active_cb (GObject *source)
GTK_POLICY_ALWAYS,
GTK_POLICY_ALWAYS);
gtk_scrolled_window_set_overlay_scrolling (GTK_SCROLLED_WINDOW (scroller), FALSE);
- gtk_widget_show (scroller);
+ g_object_ref (image_view);
gtk_container_remove (GTK_CONTAINER (parent), image_view);
gtk_container_add (GTK_CONTAINER (scroller), image_view);
gtk_container_add (GTK_CONTAINER (parent), scroller);
+ gtk_widget_show (scroller);
+ g_object_unref (image_view);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]