From efd1e07755c7e6b2f3e66eed73fc4c932851d529 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 15 Dec 2016 09:46:42 +0100 Subject: Fix typo in theme name. --- source/theme.c | 19 +++++++++++++------ source/widgets/textbox.c | 4 ++-- themes/DarkBlue.theme | 6 +++--- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/source/theme.c b/source/theme.c index 3f11edf8..bce3c419 100644 --- a/source/theme.c +++ b/source/theme.c @@ -135,6 +135,15 @@ void rofi_theme_parse_file ( const char *file ) } while ( yyparse() ); } +static Widget *rofi_theme_find_single ( Widget *widget, const char *name) +{ + for ( unsigned int j = 0; j < widget->num_widgets;j++){ + if ( g_strcmp0(widget->widgets[j]->name, name ) == 0 ){ + return widget->widgets[j]; + } + } + return widget; +} static Widget *rofi_theme_find ( Widget *widget , const char *name ) { @@ -145,12 +154,10 @@ static Widget *rofi_theme_find ( Widget *widget , const char *name ) int found = TRUE; for ( unsigned int i = 0; found && names && names[i]; i++ ){ found = FALSE; - for ( unsigned int j = 0; j < widget ->num_widgets;j++){ - if ( g_strcmp0(widget->widgets[j]->name, names[i]) == 0 ){ - widget = widget->widgets[j]; - found = TRUE; - break; - } + Widget *f = rofi_theme_find_single ( widget, names[i]); + if ( f != widget ){ + widget = f; + found = TRUE; } } g_strfreev(names); diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index 7e78f579..8d4cdc37 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -145,8 +145,8 @@ textbox* textbox_create ( const char *name, TextboxFlags flags, short x, short y const char const *const theme_prop_names[][3] = { {"normal.normal", "selected.normal", "alternate.normal"}, - {"urgent.normal", "selected.urgent", "alternate.urgent"}, - {"active.normal", "selected.active", "alternate.active"}, + {"normal.urgent", "selected.urgent", "alternate.urgent"}, + {"normal.active", "selected.active", "alternate.active"}, }; void textbox_font ( textbox *tb, TextBoxFontType tbft ) diff --git a/themes/DarkBlue.theme b/themes/DarkBlue.theme index ca966f84..52bba7c9 100644 --- a/themes/DarkBlue.theme +++ b/themes/DarkBlue.theme @@ -3,11 +3,11 @@ ! User: qball ! ------------------------------------------------------------------------------ ! "Color scheme for normal row" Set from: File -rofi.color-normal: argb:0000000, #dbdfbc, argb:00000000, #dbdfbc, #02143f +rofi.color-normal: argb:00000000, #dbdfbc, argb:00000000, #dbdfbc, #02143f ! "Color scheme for urgent row" Set from: File -rofi.color-urgent: argb:0000000, #ff81ff, argb:00000000, #ff817f, #02143f +rofi.color-urgent: argb:00000000, #ff81ff, argb:00000000, #ff817f, #02143f ! "Color scheme for active row" Set from: File -rofi.color-active: argb:0000000, #8ac4ff, argb:00000000, #8ac4ff, #02143f +rofi.color-active: argb:00000000, #8ac4ff, argb:00000000, #8ac4ff, #02143f ! "Color scheme window" Set from: File rofi.color-window: argb:dd000021, #dbdfbc, #dbdfbc ! "Separator style (none, dash, solid)" Set from: XResources -- cgit v1.2.3