summaryrefslogtreecommitdiff
path: root/render/theme.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-10-10 05:39:21 +0000
committerDana Jansens <danakj@orodu.net>2003-10-10 05:39:21 +0000
commit281390a926a3b3b24e7dae748125fc12a42c01e1 (patch)
tree7477479b6c8b5078502cb872b69f5472f3416226 /render/theme.c
parentf8c81e8ca4ffb8421f823e40178f4ddafd868c68 (diff)
fix memory leak
Diffstat (limited to 'render/theme.c')
-rw-r--r--render/theme.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/render/theme.c b/render/theme.c
index 53fdc29f..0546869a 100644
--- a/render/theme.c
+++ b/render/theme.c
@@ -499,17 +499,10 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name)
"window.active.label.bg", theme->app_hilite_label,
TRUE))
set_default_appearance(theme->app_hilite_label);
- if (!read_appearance(db, inst,
- "window.active.label.bg", theme->app_hilite_fg,
- TRUE))
- set_default_appearance(theme->app_hilite_fg);
- else if (theme->app_hilite_fg->surface.grad == RR_SURFACE_PARENTREL) {
- if (!read_appearance(db, inst,
- "window.active.title.bg",
- theme->app_hilite_fg,
- FALSE))
- set_default_appearance(theme->app_hilite_fg);
- }
+ if (theme->a_focused_label->surface.grad != RR_SURFACE_PARENTREL)
+ theme->app_hilite_fg = RrAppearanceCopy(theme->a_focused_label);
+ else
+ theme->app_hilite_fg = RrAppearanceCopy(theme->a_focused_title);
if (!read_appearance(db, inst,
"window.inactive.title.bg", theme->app_unhilite_bg,
FALSE))
@@ -518,18 +511,10 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name)
"window.inactive.label.bg", theme->app_unhilite_label,
TRUE))
set_default_appearance(theme->app_unhilite_label);
- if (!read_appearance(db, inst,
- "window.inactive.label.bg", theme->app_unhilite_fg,
- TRUE))
- set_default_appearance(theme->app_unhilite_fg);
- else if (theme->app_unhilite_label->surface.grad == RR_SURFACE_PARENTREL) {
- if (!read_appearance(db, inst,
- "window.inactive.title.bg",
- theme->app_unhilite_fg,
- FALSE))
- set_default_appearance(theme->app_unhilite_fg);
- }
-
+ if (theme->a_unfocused_label->surface.grad != RR_SURFACE_PARENTREL)
+ theme->app_unhilite_fg = RrAppearanceCopy(theme->a_unfocused_label);
+ else
+ theme->app_unhilite_fg = RrAppearanceCopy(theme->a_unfocused_title);
/* read buttons textures */
if (!read_appearance(db, inst,