From 95ed8437020ca3070d7cafcdfef78f8b3985fb5f Mon Sep 17 00:00:00 2001 From: Dave Foster Date: Tue, 12 Oct 2010 23:59:51 -0400 Subject: [PATCH] cleaning up remnants of bad rebase merges and modernizing some sections --- obrender/render.c | 7 ------ obrender/theme.c | 58 ------------------------------------------- openbox/client_menu.c | 4 +-- openbox/prompt.c | 8 +++--- 4 files changed, 6 insertions(+), 71 deletions(-) diff --git a/obrender/render.c b/obrender/render.c index cb698d6b..fe9a2a80 100644 --- a/obrender/render.c +++ b/obrender/render.c @@ -231,13 +231,6 @@ void RrAppearanceClearTextures(RrAppearance *a) memset(a->texture, 0, a->textures * sizeof(RrTexture)); } -/* shallow copy means up the ref count and return it */ -RrAppearance *RrAppearanceCopyShallow(RrAppearance *orig) -{ - orig->ref++; - return orig; -} - /* deep copy of orig, means reset ref to 1 on copy * and copy each thing memwise. */ RrAppearance *RrAppearanceCopy(RrAppearance *orig) diff --git a/obrender/theme.c b/obrender/theme.c index 29db238b..64938505 100644 --- a/obrender/theme.c +++ b/obrender/theme.c @@ -1602,64 +1602,6 @@ void RrThemeFree(RrTheme *theme) RrFontClose(theme->osd_font_hilite); RrFontClose(theme->osd_font_unhilite); - RrAppearanceFree(theme->a_disabled_focused_max); - RrAppearanceFree(theme->a_disabled_unfocused_max); - RrAppearanceFree(theme->a_hover_focused_max); - RrAppearanceFree(theme->a_hover_unfocused_max); - RrAppearanceFree(theme->a_toggled_hover_focused_max); - RrAppearanceFree(theme->a_toggled_hover_unfocused_max); - RrAppearanceFree(theme->a_toggled_focused_unpressed_max); - RrAppearanceFree(theme->a_toggled_focused_pressed_max); - RrAppearanceFree(theme->a_toggled_unfocused_unpressed_max); - RrAppearanceFree(theme->a_toggled_unfocused_pressed_max); - RrAppearanceFree(theme->a_focused_unpressed_max); - RrAppearanceFree(theme->a_focused_pressed_max); - RrAppearanceFree(theme->a_unfocused_unpressed_max); - RrAppearanceFree(theme->a_unfocused_pressed_max); - RrAppearanceFree(theme->a_disabled_focused_close); - RrAppearanceFree(theme->a_disabled_unfocused_close); - RrAppearanceFree(theme->a_hover_focused_close); - RrAppearanceFree(theme->a_hover_unfocused_close); - RrAppearanceFree(theme->a_focused_unpressed_close); - RrAppearanceFree(theme->a_focused_pressed_close); - RrAppearanceFree(theme->a_unfocused_unpressed_close); - RrAppearanceFree(theme->a_unfocused_pressed_close); - RrAppearanceFree(theme->a_disabled_focused_desk); - RrAppearanceFree(theme->a_disabled_unfocused_desk); - RrAppearanceFree(theme->a_hover_focused_desk); - RrAppearanceFree(theme->a_hover_unfocused_desk); - RrAppearanceFree(theme->a_toggled_hover_focused_desk); - RrAppearanceFree(theme->a_toggled_hover_unfocused_desk); - RrAppearanceFree(theme->a_toggled_focused_unpressed_desk); - RrAppearanceFree(theme->a_toggled_focused_pressed_desk); - RrAppearanceFree(theme->a_toggled_unfocused_unpressed_desk); - RrAppearanceFree(theme->a_toggled_unfocused_pressed_desk); - RrAppearanceFree(theme->a_focused_unpressed_desk); - RrAppearanceFree(theme->a_focused_pressed_desk); - RrAppearanceFree(theme->a_unfocused_unpressed_desk); - RrAppearanceFree(theme->a_unfocused_pressed_desk); - RrAppearanceFree(theme->a_disabled_focused_shade); - RrAppearanceFree(theme->a_disabled_unfocused_shade); - RrAppearanceFree(theme->a_hover_focused_shade); - RrAppearanceFree(theme->a_hover_unfocused_shade); - RrAppearanceFree(theme->a_toggled_hover_focused_shade); - RrAppearanceFree(theme->a_toggled_hover_unfocused_shade); - RrAppearanceFree(theme->a_toggled_focused_unpressed_shade); - RrAppearanceFree(theme->a_toggled_focused_pressed_shade); - RrAppearanceFree(theme->a_toggled_unfocused_unpressed_shade); - RrAppearanceFree(theme->a_toggled_unfocused_pressed_shade); - RrAppearanceFree(theme->a_focused_unpressed_shade); - RrAppearanceFree(theme->a_focused_pressed_shade); - RrAppearanceFree(theme->a_unfocused_unpressed_shade); - RrAppearanceFree(theme->a_unfocused_pressed_shade); - RrAppearanceFree(theme->a_disabled_focused_iconify); - RrAppearanceFree(theme->a_disabled_unfocused_iconify); - RrAppearanceFree(theme->a_hover_focused_iconify); - RrAppearanceFree(theme->a_hover_unfocused_iconify); - RrAppearanceFree(theme->a_focused_unpressed_iconify); - RrAppearanceFree(theme->a_focused_pressed_iconify); - RrAppearanceFree(theme->a_unfocused_unpressed_iconify); - RrAppearanceFree(theme->a_unfocused_pressed_iconify); RrAppearanceFree(theme->a_focused_grip); RrAppearanceFree(theme->a_unfocused_grip); RrAppearanceFree(theme->a_focused_title); diff --git a/openbox/client_menu.c b/openbox/client_menu.c index cf41ded7..ed62a323 100644 --- a/openbox/client_menu.c +++ b/openbox/client_menu.c @@ -276,7 +276,7 @@ static gboolean send_to_menu_update(ObMenuFrame *frame, gpointer data) if ((desk == DESKTOP_ALL && c->desktop != DESKTOP_ALL) || (c->desktop == DESKTOP_ALL && desk == screen_desktop)) { - e->data.normal.mask = ob_rr_theme->desk_mask; + e->data.normal.mask = ob_rr_theme->btn_desk->mask; set_icon_color(e); } else e->data.normal.mask = NULL; @@ -392,7 +392,7 @@ void client_menu_startup(void) menu_add_submenu(menu, CLIENT_LAYER, LAYER_MENU_NAME); e = menu_add_normal(menu, CLIENT_RESTORE, _("R_estore"), NULL, TRUE); - e->data.normal.mask = ob_rr_theme->max_toggled_mask; + e->data.normal.mask = ob_rr_theme->btn_max->toggled_mask; set_icon_color(e); menu_add_normal(menu, CLIENT_MOVE, _("_Move"), NULL, TRUE); diff --git a/openbox/prompt.c b/openbox/prompt.c index 77398c5f..ae7f38f0 100644 --- a/openbox/prompt.c +++ b/openbox/prompt.c @@ -59,10 +59,10 @@ void prompt_startup(gboolean reconfig) /* note: this is not a copy, don't free it */ prompt_a_bg = ob_rr_theme->osd_bg; - prompt_a_button = RrAppearanceCopy(ob_rr_theme->a_focused_unpressed_close); - prompt_a_focus = RrAppearanceCopy(ob_rr_theme->a_hover_focused_close); - prompt_a_press = RrAppearanceCopy(ob_rr_theme->a_focused_pressed_close); - prompt_a_pfocus = RrAppearanceCopy(ob_rr_theme->a_focused_pressed_close); + prompt_a_button = RrAppearanceCopy(ob_rr_theme->btn_close->a_focused_unpressed); + prompt_a_focus = RrAppearanceCopy(ob_rr_theme->btn_close->a_hover_focused); + prompt_a_press = RrAppearanceCopy(ob_rr_theme->btn_close->a_focused_pressed); + prompt_a_pfocus = RrAppearanceCopy(ob_rr_theme->btn_close->a_focused_pressed); c_button = prompt_a_button->texture[0].data.mask.color; c_focus = prompt_a_focus->texture[0].data.mask.color;