[gtk+/stack] Change transition-type property type



commit 4bb2226ae9033835314b35fd80090ca487c7b103
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Apr 21 21:16:46 2013 -0400

    Change transition-type property type
    
    This is an enum, so declare the property as such.

 gtk/gtkstack.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 6ca1fbb..c1d7f99 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -219,7 +219,7 @@ gtk_stack_get_property (GObject   *object,
       g_value_set_int (value, gtk_stack_get_transition_duration (stack));
       break;
     case PROP_TRANSITION_TYPE:
-      g_value_set_int (value, gtk_stack_get_transition_type (stack));
+      g_value_set_enum (value, gtk_stack_get_transition_type (stack));
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -250,7 +250,7 @@ gtk_stack_set_property (GObject     *object,
       gtk_stack_set_transition_duration (stack, g_value_get_int (value));
       break;
     case PROP_TRANSITION_TYPE:
-      gtk_stack_set_transition_type (stack, g_value_get_int (value));
+      gtk_stack_set_transition_type (stack, g_value_get_enum (value));
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -382,13 +382,12 @@ gtk_stack_class_init (GtkStackClass *klass)
                                                      GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT));
   g_object_class_install_property (object_class,
                                    PROP_TRANSITION_TYPE,
-                                   g_param_spec_int ("transition-type",
-                                                     P_("Transition type"),
-                                                     P_("The type of animation used to transition"),
-                                                     GTK_STACK_TRANSITION_TYPE_NONE,
-                                                     G_MAXINT,
-                                                     GTK_STACK_TRANSITION_TYPE_NONE,
-                                                     GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+                                   g_param_spec_enum ("transition-type",
+                                                      P_("Transition type"),
+                                                      P_("The type of animation used to transition"),
+                                                      GTK_TYPE_STACK_TRANSITION_TYPE,
+                                                      GTK_STACK_TRANSITION_TYPE_NONE,
+                                                      GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 
   gtk_container_class_install_child_property (container_class, CHILD_PROP_NAME,
     g_param_spec_string ("name",


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