[goocanvas] Use gtk_box_pack_start() rather than gtk_container_add().



commit 170f98b599f9e1a6e6e923e9c40e3726151acfe0
Author: Damon Chaplin <damon gnome org>
Date:   Sat Nov 2 20:06:41 2013 +0000

    Use gtk_box_pack_start() rather than gtk_container_add().

 ChangeLog                |    5 +++++
 demo/demo-animation.c    |    2 +-
 demo/demo-clipping.c     |    2 +-
 demo/demo-focus.c        |    2 +-
 demo/demo-paths.c        |    2 +-
 demo/mv-demo-animation.c |    2 +-
 demo/mv-demo-clipping.c  |    2 +-
 demo/mv-demo-focus.c     |    2 +-
 demo/mv-demo-paths.c     |    2 +-
 9 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ca8bfd5..0016700 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-11-02  Damon Chaplin  <damon gnome org>
 
+       * demo/*.c: use gtk_box_pack_start() rather than gtk_container_add(),
+       for boxes, as the demos didn't appear correctly.
+
+2013-11-02  Damon Chaplin  <damon gnome org>
+
        * src/goocanvasutils.c (goo_canvas_line_dash_set_offset): new function
        to set the offset.
 
diff --git a/demo/demo-animation.c b/demo/demo-animation.c
index 433cf6a..3b21676 100644
--- a/demo/demo-animation.c
+++ b/demo/demo-animation.c
@@ -138,7 +138,7 @@ create_animation_page (void)
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
                                       GTK_SHADOW_IN);
   gtk_widget_show (scrolled_win);
-  gtk_container_add (GTK_CONTAINER (vbox), scrolled_win);
+  gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
 
   canvas = goo_canvas_new ();
   gtk_widget_set_size_request (canvas, 600, 450);
diff --git a/demo/demo-clipping.c b/demo/demo-clipping.c
index b3e5968..730e5e6 100644
--- a/demo/demo-clipping.c
+++ b/demo/demo-clipping.c
@@ -145,7 +145,7 @@ create_clipping_page (void)
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
                                       GTK_SHADOW_IN);
   gtk_widget_show (scrolled_win);
-  gtk_container_add (GTK_CONTAINER (vbox), scrolled_win);
+  gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
 
   canvas = goo_canvas_new ();
   gtk_widget_set_size_request (canvas, 600, 450);
diff --git a/demo/demo-focus.c b/demo/demo-focus.c
index a398391..b46bb3d 100644
--- a/demo/demo-focus.c
+++ b/demo/demo-focus.c
@@ -150,7 +150,7 @@ create_focus_page (void)
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
                                       GTK_SHADOW_IN);
   gtk_widget_show (scrolled_win);
-  gtk_container_add (GTK_CONTAINER (vbox), scrolled_win);
+  gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
 
   canvas = goo_canvas_new ();
   gtk_widget_set_can_focus (canvas, TRUE);
diff --git a/demo/demo-paths.c b/demo/demo-paths.c
index 2b23920..acd08ef 100644
--- a/demo/demo-paths.c
+++ b/demo/demo-paths.c
@@ -161,7 +161,7 @@ create_paths_page (void)
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
                                       GTK_SHADOW_IN);
   gtk_widget_show (scrolled_win);
-  gtk_container_add (GTK_CONTAINER (vbox), scrolled_win);
+  gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
 
   canvas = goo_canvas_new ();
   gtk_widget_set_size_request (canvas, 600, 450);
diff --git a/demo/mv-demo-animation.c b/demo/mv-demo-animation.c
index 7b66737..5cffa83 100644
--- a/demo/mv-demo-animation.c
+++ b/demo/mv-demo-animation.c
@@ -137,7 +137,7 @@ create_animation_page (void)
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
                                       GTK_SHADOW_IN);
   gtk_widget_show (scrolled_win);
-  gtk_container_add (GTK_CONTAINER (vbox), scrolled_win);
+  gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
 
   canvas = goo_canvas_new ();
   gtk_widget_set_size_request (canvas, 600, 450);
diff --git a/demo/mv-demo-clipping.c b/demo/mv-demo-clipping.c
index 0d9cc1f..9772305 100644
--- a/demo/mv-demo-clipping.c
+++ b/demo/mv-demo-clipping.c
@@ -159,7 +159,7 @@ create_clipping_page (void)
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
                                       GTK_SHADOW_IN);
   gtk_widget_show (scrolled_win);
-  gtk_container_add (GTK_CONTAINER (vbox), scrolled_win);
+  gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
 
   canvas = goo_canvas_new ();
   gtk_widget_set_size_request (canvas, 600, 450);
diff --git a/demo/mv-demo-focus.c b/demo/mv-demo-focus.c
index d4235fc..b15d450 100644
--- a/demo/mv-demo-focus.c
+++ b/demo/mv-demo-focus.c
@@ -165,7 +165,7 @@ create_focus_page (void)
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
                                       GTK_SHADOW_IN);
   gtk_widget_show (scrolled_win);
-  gtk_container_add (GTK_CONTAINER (vbox), scrolled_win);
+  gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
 
   canvas = goo_canvas_new ();
   gtk_widget_set_can_focus (canvas, TRUE);
diff --git a/demo/mv-demo-paths.c b/demo/mv-demo-paths.c
index c5747f1..ad40397 100644
--- a/demo/mv-demo-paths.c
+++ b/demo/mv-demo-paths.c
@@ -140,7 +140,7 @@ create_paths_page (void)
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
                                       GTK_SHADOW_IN);
   gtk_widget_show (scrolled_win);
-  gtk_container_add (GTK_CONTAINER (vbox), scrolled_win);
+  gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
 
   canvas = goo_canvas_new ();
   gtk_widget_set_size_request (canvas, 600, 450);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]