Reference param spec when caching property values, since we unref it later

Mon Apr  2 15:06:13 2001  Owen Taylor  <otaylor@redhat.com>

	* 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.
This commit is contained in:
Owen Taylor 2001-04-02 19:09:56 +00:00 committed by Owen Taylor
parent c944151a3c
commit 096fdfb797
11 changed files with 72 additions and 10 deletions

View File

@ -1,3 +1,12 @@
Mon Apr 2 15:06:13 2001 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com> Mon Apr 2 10:47:57 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init): Fix * gtk/gtkwidget.c (gtk_widget_class_init): Fix

View File

@ -1,3 +1,12 @@
Mon Apr 2 15:06:13 2001 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com> Mon Apr 2 10:47:57 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init): Fix * gtk/gtkwidget.c (gtk_widget_class_init): Fix

View File

@ -1,3 +1,12 @@
Mon Apr 2 15:06:13 2001 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com> Mon Apr 2 10:47:57 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init): Fix * gtk/gtkwidget.c (gtk_widget_class_init): Fix

View File

@ -1,3 +1,12 @@
Mon Apr 2 15:06:13 2001 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com> Mon Apr 2 10:47:57 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init): Fix * gtk/gtkwidget.c (gtk_widget_class_init): Fix

View File

@ -1,3 +1,12 @@
Mon Apr 2 15:06:13 2001 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com> Mon Apr 2 10:47:57 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init): Fix * gtk/gtkwidget.c (gtk_widget_class_init): Fix

View File

@ -1,3 +1,12 @@
Mon Apr 2 15:06:13 2001 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com> Mon Apr 2 10:47:57 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init): Fix * gtk/gtkwidget.c (gtk_widget_class_init): Fix

View File

@ -1,3 +1,12 @@
Mon Apr 2 15:06:13 2001 Owen Taylor <otaylor@redhat.com>
* 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 <otaylor@redhat.com> Mon Apr 2 10:47:57 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init): Fix * gtk/gtkwidget.c (gtk_widget_class_init): Fix

View File

@ -339,15 +339,14 @@ gtk_option_menu_get_props (GtkOptionMenu *option_menu,
NULL); NULL);
if (indicator_size) if (indicator_size)
{ props->indicator_size = *indicator_size;
props->indicator_size = *indicator_size; else
gtk_requisition_free (indicator_size); props->indicator_size = default_props.indicator_size;
}
if (indicator_spacing) if (indicator_spacing)
{ props->indicator_spacing = *indicator_spacing;
props->indicator_spacing = *indicator_spacing; else
gtk_border_free (indicator_spacing); props->indicator_spacing = default_props.indicator_spacing;
}
} }
static void static void

View File

@ -1311,6 +1311,8 @@ _gtk_style_peek_property_value (GtkStyle *style,
if (!rcprop) if (!rcprop)
g_param_value_set_default (pspec, &pcache->value); g_param_value_set_default (pspec, &pcache->value);
g_param_spec_ref (pcache->pspec);
return &pcache->value; return &pcache->value;
} }

View File

@ -32,7 +32,6 @@ style "global-style-properties"
{ {
# xthickness = 20 # xthickness = 20
GtkSpinButton::shadow_type = etched-out GtkSpinButton::shadow_type = etched-out
GtkOptionMenu::indicator_spacing = { 10, 10, 10, 10 }
} }
class "GtkWidget" style "global-style-properties" class "GtkWidget" style "global-style-properties"

View File

@ -32,7 +32,6 @@ style "global-style-properties"
{ {
# xthickness = 20 # xthickness = 20
GtkSpinButton::shadow_type = etched-out GtkSpinButton::shadow_type = etched-out
GtkOptionMenu::indicator_spacing = { 10, 10, 10, 10 }
} }
class "GtkWidget" style "global-style-properties" class "GtkWidget" style "global-style-properties"