diff --git a/ChangeLog b/ChangeLog index 7cdba21ead..52f867da6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Mon Apr 2 15:06:13 2001 Owen Taylor + + * gtk/gtkstyle.c (_gtk_style_peek_property_value): Reference + param spec when caching property values, since we unref it + later when we free the style. + + * gtk/gtkoptionmenu.c (gtk_option_menu_get_props): Dont' free + values since they are retrieved with G_VALUE_NO_COPY_CONTENTS. + Mon Apr 2 10:47:57 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_class_init): Fix diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 7cdba21ead..52f867da6f 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +Mon Apr 2 15:06:13 2001 Owen Taylor + + * gtk/gtkstyle.c (_gtk_style_peek_property_value): Reference + param spec when caching property values, since we unref it + later when we free the style. + + * gtk/gtkoptionmenu.c (gtk_option_menu_get_props): Dont' free + values since they are retrieved with G_VALUE_NO_COPY_CONTENTS. + Mon Apr 2 10:47:57 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_class_init): Fix diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7cdba21ead..52f867da6f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Mon Apr 2 15:06:13 2001 Owen Taylor + + * gtk/gtkstyle.c (_gtk_style_peek_property_value): Reference + param spec when caching property values, since we unref it + later when we free the style. + + * gtk/gtkoptionmenu.c (gtk_option_menu_get_props): Dont' free + values since they are retrieved with G_VALUE_NO_COPY_CONTENTS. + Mon Apr 2 10:47:57 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_class_init): Fix diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 7cdba21ead..52f867da6f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +Mon Apr 2 15:06:13 2001 Owen Taylor + + * gtk/gtkstyle.c (_gtk_style_peek_property_value): Reference + param spec when caching property values, since we unref it + later when we free the style. + + * gtk/gtkoptionmenu.c (gtk_option_menu_get_props): Dont' free + values since they are retrieved with G_VALUE_NO_COPY_CONTENTS. + Mon Apr 2 10:47:57 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_class_init): Fix diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7cdba21ead..52f867da6f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +Mon Apr 2 15:06:13 2001 Owen Taylor + + * gtk/gtkstyle.c (_gtk_style_peek_property_value): Reference + param spec when caching property values, since we unref it + later when we free the style. + + * gtk/gtkoptionmenu.c (gtk_option_menu_get_props): Dont' free + values since they are retrieved with G_VALUE_NO_COPY_CONTENTS. + Mon Apr 2 10:47:57 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_class_init): Fix diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7cdba21ead..52f867da6f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Mon Apr 2 15:06:13 2001 Owen Taylor + + * gtk/gtkstyle.c (_gtk_style_peek_property_value): Reference + param spec when caching property values, since we unref it + later when we free the style. + + * gtk/gtkoptionmenu.c (gtk_option_menu_get_props): Dont' free + values since they are retrieved with G_VALUE_NO_COPY_CONTENTS. + Mon Apr 2 10:47:57 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_class_init): Fix diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7cdba21ead..52f867da6f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Mon Apr 2 15:06:13 2001 Owen Taylor + + * gtk/gtkstyle.c (_gtk_style_peek_property_value): Reference + param spec when caching property values, since we unref it + later when we free the style. + + * gtk/gtkoptionmenu.c (gtk_option_menu_get_props): Dont' free + values since they are retrieved with G_VALUE_NO_COPY_CONTENTS. + Mon Apr 2 10:47:57 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_class_init): Fix diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c index d9e52f4c30..5258837348 100644 --- a/gtk/gtkoptionmenu.c +++ b/gtk/gtkoptionmenu.c @@ -339,15 +339,14 @@ gtk_option_menu_get_props (GtkOptionMenu *option_menu, NULL); if (indicator_size) - { - props->indicator_size = *indicator_size; - gtk_requisition_free (indicator_size); - } + props->indicator_size = *indicator_size; + else + props->indicator_size = default_props.indicator_size; + if (indicator_spacing) - { - props->indicator_spacing = *indicator_spacing; - gtk_border_free (indicator_spacing); - } + props->indicator_spacing = *indicator_spacing; + else + props->indicator_spacing = default_props.indicator_spacing; } static void diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index af203e06db..3b01a5614a 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -1311,6 +1311,8 @@ _gtk_style_peek_property_value (GtkStyle *style, if (!rcprop) g_param_value_set_default (pspec, &pcache->value); + g_param_spec_ref (pcache->pspec); + return &pcache->value; } diff --git a/gtk/testgtkrc b/gtk/testgtkrc index 19ec7fa736..4abd0853d1 100644 --- a/gtk/testgtkrc +++ b/gtk/testgtkrc @@ -32,7 +32,6 @@ style "global-style-properties" { # xthickness = 20 GtkSpinButton::shadow_type = etched-out - GtkOptionMenu::indicator_spacing = { 10, 10, 10, 10 } } class "GtkWidget" style "global-style-properties" diff --git a/tests/testgtkrc b/tests/testgtkrc index 19ec7fa736..4abd0853d1 100644 --- a/tests/testgtkrc +++ b/tests/testgtkrc @@ -32,7 +32,6 @@ style "global-style-properties" { # xthickness = 20 GtkSpinButton::shadow_type = etched-out - GtkOptionMenu::indicator_spacing = { 10, 10, 10, 10 } } class "GtkWidget" style "global-style-properties"