void menu_frame_startup(gboolean reconfig) { gint i; a_sep = RrAppearanceCopy(ob_rr_theme->a_clear); RrAppearanceAddTextures(a_sep, ob_rr_theme->menu_sep_width); for (i = 0; i < ob_rr_theme->menu_sep_width; ++i) { a_sep->texture[i].type = RR_TEXTURE_LINE_ART; a_sep->texture[i].data.lineart.color = ob_rr_theme->menu_sep_color; } if (reconfig) return; client_add_destroy_notify(client_dest, NULL); menu_frame_map = g_hash_table_new(g_int_hash, g_int_equal); }
void prompt_startup(gboolean reconfig) { RrColor *c_button, *c_focus, *c_press, *c_pfocus; /* 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); c_button = prompt_a_button->texture[0].data.mask.color; c_focus = prompt_a_focus->texture[0].data.mask.color; c_press = prompt_a_press->texture[0].data.mask.color; c_pfocus = prompt_a_press->texture[0].data.mask.color; RrAppearanceRemoveTextures(prompt_a_button); RrAppearanceRemoveTextures(prompt_a_focus); RrAppearanceRemoveTextures(prompt_a_press); RrAppearanceRemoveTextures(prompt_a_pfocus); /* texture[0] is the text and texture[1-4] (for prompt_a_focus and prompt_a_pfocus) is lineart to show where keyboard focus is */ RrAppearanceAddTextures(prompt_a_button, 1); RrAppearanceAddTextures(prompt_a_focus, 5); RrAppearanceAddTextures(prompt_a_press, 1); RrAppearanceAddTextures(prompt_a_pfocus, 5); /* totally cheating here.. */ prompt_a_button->texture[0] = ob_rr_theme->osd_hilite_label->texture[0]; prompt_a_focus->texture[0] = ob_rr_theme->osd_hilite_label->texture[0]; prompt_a_press->texture[0] = ob_rr_theme->osd_hilite_label->texture[0]; prompt_a_pfocus->texture[0] = ob_rr_theme->osd_hilite_label->texture[0]; prompt_a_button->texture[0].data.text.justify = RR_JUSTIFY_CENTER; prompt_a_focus->texture[0].data.text.justify = RR_JUSTIFY_CENTER; prompt_a_press->texture[0].data.text.justify = RR_JUSTIFY_CENTER; prompt_a_pfocus->texture[0].data.text.justify = RR_JUSTIFY_CENTER; prompt_a_button->texture[0].data.text.color = c_button; prompt_a_focus->texture[0].data.text.color = c_focus; prompt_a_press->texture[0].data.text.color = c_press; prompt_a_pfocus->texture[0].data.text.color = c_pfocus; prompt_a_focus->texture[1].data.lineart.color = c_focus; prompt_a_focus->texture[2].data.lineart.color = c_focus; prompt_a_focus->texture[3].data.lineart.color = c_focus; prompt_a_focus->texture[4].data.lineart.color = c_focus; prompt_a_pfocus->texture[1].data.lineart.color = c_press; prompt_a_pfocus->texture[2].data.lineart.color = c_press; prompt_a_pfocus->texture[3].data.lineart.color = c_press; prompt_a_pfocus->texture[4].data.lineart.color = c_press; prompt_a_msg = RrAppearanceCopy(ob_rr_theme->osd_hilite_label); prompt_a_msg->texture[0].data.text.flow = TRUE; if (reconfig) { GList *it; for (it = prompt_list; it; it = g_list_next(it)) { ObPrompt *p = it->data; prompt_layout(p); render_all(p); } } }