mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
theme: Fix g_list_copy_deep() warning
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
1d556b56cc
commit
4224614115
1 changed files with 7 additions and 2 deletions
|
@ -50,6 +50,11 @@ static gboolean distance_compare ( RofiDistance d, RofiDistance e )
|
||||||
return d.type == e.type && d.distance == e.distance && d.style == e.style;
|
return d.type == e.type && d.distance == e.distance && 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 )
|
ThemeWidget *rofi_theme_find_or_create_name ( ThemeWidget *base, const char *name )
|
||||||
{
|
{
|
||||||
for ( unsigned int i = 0; i < base->num_widgets; i++ ) {
|
for ( unsigned int i = 0; i < base->num_widgets; i++ ) {
|
||||||
|
@ -86,7 +91,7 @@ Property* rofi_theme_property_copy ( Property *p )
|
||||||
retv->value.s = g_strdup ( p->value.s );
|
retv->value.s = g_strdup ( p->value.s );
|
||||||
break;
|
break;
|
||||||
case P_LIST:
|
case P_LIST:
|
||||||
retv->value.list = g_list_copy_deep ( p->value.list, (GCopyFunc) g_strdup, NULL );
|
retv->value.list = g_list_copy_deep ( p->value.list, rofi_g_list_strdup, NULL );
|
||||||
break;
|
break;
|
||||||
case P_LINK:
|
case P_LINK:
|
||||||
retv->value.link.name = g_strdup ( p->value.link.name );
|
retv->value.link.name = g_strdup ( p->value.link.name );
|
||||||
|
@ -725,7 +730,7 @@ GList *rofi_theme_get_list ( const widget *widget, const char * property, const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( p->type == P_LIST ) {
|
else if ( p->type == P_LIST ) {
|
||||||
return g_list_copy_deep ( p->value.list, (GCopyFunc) g_strdup, NULL );
|
return g_list_copy_deep ( p->value.list, rofi_g_list_strdup, NULL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
char **r = defaults ? g_strsplit ( defaults, ",", 0 ) : NULL;
|
char **r = defaults ? g_strsplit ( defaults, ",", 0 ) : NULL;
|
||||||
|
|
Loading…
Reference in a new issue