[libgd] GdStack: Default to homogeneous



commit 1223eade34911247d480f1ff3324b7c5cdc52191
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Feb 19 11:15:25 2013 +0100

    GdStack: Default to homogeneous
    
    This is what almost every user wants.

 libgd/gd-stack.c |    3 ++-
 test-stack.c     |    2 ++
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libgd/gd-stack.c b/libgd/gd-stack.c
index faf3504..356149d 100644
--- a/libgd/gd-stack.c
+++ b/libgd/gd-stack.c
@@ -136,6 +136,7 @@ gd_stack_init (GdStack *stack)
   priv = GD_STACK_GET_PRIVATE (stack);
   stack->priv = priv;
   priv->duration = 200;
+  priv->homogeneous = TRUE;
 
   gtk_widget_set_has_window ((GtkWidget*) stack, FALSE);
   gtk_widget_set_redraw_on_allocate ((GtkWidget*) stack, TRUE);
@@ -244,7 +245,7 @@ gd_stack_class_init (GdStackClass * klass)
                                   g_param_spec_boolean ("homogeneous",
                                                         "Homogeneous",
                                                         "Homogeneous sizing",
-                                                        FALSE,
+                                                        TRUE,
                                                         GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT));
   g_object_class_install_property (object_class,
                                   PROP_VISIBLE_CHILD,
diff --git a/test-stack.c b/test-stack.c
index 9960286..525c059 100644
--- a/test-stack.c
+++ b/test-stack.c
@@ -93,6 +93,8 @@ main (gint argc,
   g_signal_connect (button, "clicked", (GCallback) set_visible_child_name, (gpointer) "3");
 
   button = gtk_check_button_new_with_label ("humongous");
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
+                               gd_stack_get_homogeneous (GD_STACK (stack)));
   gtk_container_add (GTK_CONTAINER (hbox), button);
   g_signal_connect (button, "clicked", (GCallback) toggle_homogeneous, NULL);
 


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