1
0
Fork 0
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:
Quentin Glidic 2019-04-19 10:10:07 +02:00
parent 1d556b56cc
commit 4224614115
No known key found for this signature in database
GPG key ID: AC203F96E2C34BB7

View file

@ -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;
}
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++ ) {
@ -86,7 +91,7 @@ Property* rofi_theme_property_copy ( Property *p )
retv->value.s = g_strdup ( p->value.s );
break;
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;
case P_LINK:
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 ) {
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;