From 19a2d37df38d8ec19cdf32d21ddadcc535767bff Mon Sep 17 00:00:00 2001 From: Quentin Glidic Date: Sun, 11 Jun 2017 18:39:26 +0200 Subject: gitmodules: Update libnkutils Signed-off-by: Quentin Glidic --- source/dialogs/drun.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'source/dialogs') diff --git a/source/dialogs/drun.c b/source/dialogs/drun.c index a9d6bd5c..df2381c0 100644 --- a/source/dialogs/drun.c +++ b/source/dialogs/drun.c @@ -459,14 +459,10 @@ static gpointer drun_icon_fetch ( gpointer data ) // this should be fine running in another thread. DRunModePrivateData *pd = (DRunModePrivateData *) data; DRunModeEntry *dr; - gsize i = 0; - const gchar *themes[4]; - if ( config.drun_icon_theme != NULL ) { - themes[i++] = config.drun_icon_theme; - } - themes[i++] = "Adwaita"; - themes[i++] = "gnome"; - themes[i] = NULL; + const gchar *themes[2] = { + config.drun_icon_theme, + NULL + }; while ( ( dr = g_async_queue_pop ( pd->icon_fetch_queue ) ) != &( pd->quit_entry ) ) { if ( dr->icon_name == NULL ) { @@ -509,10 +505,15 @@ static gpointer drun_icon_fetch ( gpointer data ) static int drun_mode_init ( Mode *sw ) { if ( mode_get_private_data ( sw ) == NULL ) { + static const gchar * const drun_icon_fallback_themes[] = { + "Adwaita", + "gnome", + NULL + }; DRunModePrivateData *pd = g_malloc0 ( sizeof ( *pd ) ); pd->disabled_entries = g_hash_table_new_full ( g_str_hash, g_str_equal, g_free, NULL ); mode_set_private_data ( sw, (void *) pd ); - pd->xdg_context = nk_xdg_theme_context_new (); + pd->xdg_context = nk_xdg_theme_context_new ( drun_icon_fallback_themes, NULL ); get_apps ( pd ); pd->icon_fetch_queue = g_async_queue_new ( ); } -- cgit v1.2.3