summaryrefslogtreecommitdiffstats
path: root/source/dialogs
diff options
context:
space:
mode:
authorQuentin Glidic <sardemff7+git@sardemff7.net>2017-06-11 18:39:26 +0200
committerQuentin Glidic <sardemff7+git@sardemff7.net>2017-06-11 18:39:26 +0200
commit19a2d37df38d8ec19cdf32d21ddadcc535767bff (patch)
tree16e27b7f7e031c44a5448b6032204936eb66deee /source/dialogs
parent067544120f950039557a04f1ba06ec6870bd1088 (diff)
gitmodules: Update libnkutils
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'source/dialogs')
-rw-r--r--source/dialogs/drun.c19
1 files changed, 10 insertions, 9 deletions
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 ( );
}