From: Dave Foster Date: Thu, 13 Sep 2007 13:47:20 +0000 (-0400) Subject: Temporary storage locations for texture reads. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=b7350d3ebd40753efde31bb4fe4272a435cef7d7;p=chaz%2Fopenbox Temporary storage locations for texture reads. --- 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; }