diff --git a/lexer/theme-parser.y b/lexer/theme-parser.y index 6754cd9d..c33aeee9 100644 --- a/lexer/theme-parser.y +++ b/lexer/theme-parser.y @@ -304,8 +304,8 @@ static ThemeColor hwb_to_rgb ( double h, double w, double b ) %type t_property_highlight_styles %type t_property_highlight_style %type t_property_line_style -%type t_property_element_set -%type t_property_element_set_optional +%type t_property_element_list +%type t_property_element_list_optional %type t_property_orientation %type t_property_cursor %type t_name_prefix_optional @@ -577,7 +577,7 @@ t_property_element $$ = rofi_theme_property_create ( P_COLOR ); $$->value.color = $1; } -| T_LIST_OPEN t_property_element_set_optional T_LIST_CLOSE { +| T_LIST_OPEN t_property_element_list_optional T_LIST_CLOSE { $$ = rofi_theme_property_create ( P_LIST ); $$->value.list = $2; } @@ -647,24 +647,24 @@ t_color_list /** List of elements */ -t_property_element_set_optional +t_property_element_list_optional : %empty { $$ = NULL; } -| t_property_element_set { $$ = $1; } +| t_property_element_list { $$ = $1; } ; -t_property_element_set +t_property_element_list : t_property_element { $$ = g_list_append ( NULL, $1); } | T_ELEMENT { Property *p = rofi_theme_property_create ( P_STRING ); p->value.s = $1; $$ = g_list_append ( NULL, p); } -| t_property_element_set T_COMMA T_ELEMENT { +| t_property_element_list T_COMMA T_ELEMENT { Property *p = rofi_theme_property_create ( P_STRING ); p->value.s = $3; $$ = g_list_append ( $1, p); } -| t_property_element_set T_COMMA t_property_element { +| t_property_element_list T_COMMA t_property_element { $$ = g_list_append ( $1, $3 ); } ; diff --git a/source/theme.c b/source/theme.c index 03bbb46d..906445ef 100644 --- a/source/theme.c +++ b/source/theme.c @@ -70,11 +70,6 @@ static gboolean distance_compare(RofiDistance d, RofiDistance e) { d.style == e.style; } -static gpointer rofi_g_list_strdup(gconstpointer data, - G_GNUC_UNUSED gpointer user_data) { - return g_strdup(data); -} - ThemeWidget *rofi_theme_find_or_create_name(ThemeWidget *base, const char *name) { for (unsigned int i = 0; i < base->num_widgets; i++) { diff --git a/source/view.c b/source/view.c index eacc4943..b251e587 100644 --- a/source/view.c +++ b/source/view.c @@ -2026,7 +2026,6 @@ RofiViewState *rofi_view_create(Mode *sw, const char *input, if (list == NULL) { rofi_view_add_widget(state, WIDGET(state->main_window), "mainbox"); } else { - // rofi_theme_get_list(WIDGET(state->main_window), "children", "mainbox"); for (const GList *iter = list; iter != NULL; iter = g_list_next(iter)) { rofi_view_add_widget(state, WIDGET(state->main_window), (const char *)iter->data);