summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@blame.services>2022-01-25 00:11:41 +0100
committerDave Davenport <qball@blame.services>2022-01-25 00:11:41 +0100
commit92cb2b2915e6737109a2d0b7bd7218691402bc30 (patch)
treea86c269a0a36b62f25ca196770a65e5111958584
parentd163a21b47b7d4ee13f0fdd7eafad14aba8506c1 (diff)
Cleanups based on feedback.mergelistarray
-rw-r--r--lexer/theme-parser.y16
-rw-r--r--source/theme.c5
-rw-r--r--source/view.c1
3 files changed, 8 insertions, 14 deletions
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 <ival> t_property_highlight_styles
%type <ival> t_property_highlight_style
%type <ival> t_property_line_style
-%type <list> t_property_element_set
-%type <list> t_property_element_set_optional
+%type <list> t_property_element_list
+%type <list> t_property_element_list_optional
%type <ival> t_property_orientation
%type <ival> t_property_cursor
%type <ival> 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);