From b7350d3ebd40753efde31bb4fe4272a435cef7d7 Mon Sep 17 00:00:00 2001 From: Dave Foster Date: Thu, 13 Sep 2007 09:47:20 -0400 Subject: [PATCH] Temporary storage locations for texture reads. --- obrender/theme.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/obrender/theme.c b/obrender/theme.c index b7ebbb0c..fcdab972 100644 --- a/obrender/theme.c +++ b/obrender/theme.c @@ -110,6 +110,20 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, gchar *path; gboolean userdef; gint menu_overlap = 0; + RrAppearance *a_disabled_focused_tmp; + RrAppearance *a_disabled_unfocused_tmp; + RrAppearance *a_hover_focused_tmp; + RrAppearance *a_hover_unfocused_tmp; + RrAppearance *a_focused_unpressed_tmp; + RrAppearance *a_focused_pressed_tmp; + RrAppearance *a_unfocused_unpressed_tmp; + RrAppearance *a_unfocused_pressed_tmp; + RrAppearance *a_toggled_hover_focused_tmp; + RrAppearance *a_toggled_hover_unfocused_tmp; + RrAppearance *a_toggled_focused_unpressed_tmp; + RrAppearance *a_toggled_focused_pressed_tmp; + RrAppearance *a_toggled_unfocused_unpressed_tmp; + RrAppearance *a_toggled_unfocused_pressed_tmp; if (name) { db = loaddb(name, &path); @@ -133,7 +147,24 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, return NULL; } - theme = g_slice_new0(RrTheme); + /* initialize temp reading textures */ + a_disabled_focused_tmp = RrAppearanceNew(inst, 1); + a_disabled_unfocused_tmp = RrAppearanceNew(inst, 1); + a_hover_focused_tmp = RrAppearanceNew(inst, 1); + a_hover_unfocused_tmp = RrAppearanceNew(inst, 1); + a_toggled_focused_unpressed_tmp = RrAppearanceNew(inst, 1); + a_toggled_unfocused_unpressed_tmp = RrAppearanceNew(inst, 1); + a_toggled_hover_focused_tmp = RrAppearanceNew(inst, 1); + a_toggled_hover_unfocused_tmp = RrAppearanceNew(inst, 1); + a_toggled_focused_pressed_tmp = RrAppearanceNew(inst, 1); + a_toggled_unfocused_pressed_tmp = RrAppearanceNew(inst, 1); + a_focused_unpressed_tmp = RrAppearanceNew(inst, 1); + a_focused_pressed_tmp = RrAppearanceNew(inst, 1); + a_unfocused_unpressed_tmp = RrAppearanceNew(inst, 1); + a_unfocused_pressed_tmp = RrAppearanceNew(inst, 1); + + /* initialize theme */ + theme = g_slice_new0(RrTheme, 1); theme->inst = inst; theme->name = g_strdup(name ? name : DEFAULT_THEME); @@ -1272,6 +1303,21 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->button_size = theme->label_height - 2; theme->grip_width = 25; + RrAppearanceFree(a_disabled_focused_tmp); + RrAppearanceFree(a_disabled_unfocused_tmp); + RrAppearanceFree(a_hover_focused_tmp); + RrAppearanceFree(a_hover_unfocused_tmp); + RrAppearanceFree(a_focused_unpressed_tmp); + RrAppearanceFree(a_focused_pressed_tmp); + RrAppearanceFree(a_unfocused_unpressed_tmp); + RrAppearanceFree(a_unfocused_pressed_tmp); + RrAppearanceFree(a_toggled_hover_focused_tmp); + RrAppearanceFree(a_toggled_hover_unfocused_tmp); + RrAppearanceFree(a_toggled_focused_unpressed_tmp); + RrAppearanceFree(a_toggled_focused_pressed_tmp); + RrAppearanceFree(a_toggled_unfocused_unpressed_tmp); + RrAppearanceFree(a_toggled_unfocused_pressed_tmp); + return theme; } -- 2.45.2