diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-06-07 12:38:52 +0200 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-06-07 12:41:09 +0200 |
commit | 3067f67fd19280df4c4c3db24698ba406d0d5181 (patch) | |
tree | f0490bf0fa3f3ae7df42aab835894bffef8ceffd | |
parent | 07076d154a02a76e866cb00e14c8ec1837494451 (diff) |
drun: Use Adwaita and gnome as fallback themes
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-rw-r--r-- | config/config.c | 4 | ||||
-rw-r--r-- | source/dialogs/drun.c | 11 | ||||
m--------- | subprojects/libnkutils | 0 |
3 files changed, 12 insertions, 3 deletions
diff --git a/config/config.c b/config/config.c index 840ade56..aa938cb9 100644 --- a/config/config.c +++ b/config/config.c @@ -60,8 +60,8 @@ Settings config = { .run_shell_command = "{terminal} -e {cmd}", /** Command executed on accep-entry-custom for window modus */ .window_command = "xkill -id {window}", - /** Sane default for an icon theme */ - .drun_icon_theme = "gnome", + /** No default icon theme, we search Adwaita and gnome as fallback */ + .drun_icon_theme = NULL, /** * Location of the window. * Enumeration indicating location or gravity of window. diff --git a/source/dialogs/drun.c b/source/dialogs/drun.c index 707bfdc3..f255126b 100644 --- a/source/dialogs/drun.c +++ b/source/dialogs/drun.c @@ -459,11 +459,20 @@ 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; + while ( ( dr = g_async_queue_pop ( pd->icon_fetch_queue ) ) != &( pd->quit_entry ) ) { if ( dr->icon_name == NULL ) { continue; } - gchar *icon_path = nk_xdg_theme_get_icon ( pd->xdg_context, config.drun_icon_theme, "Applications", dr->icon_name, 32, 1, TRUE ); + gchar *icon_path = nk_xdg_theme_get_icon ( pd->xdg_context, themes, "Applications", dr->icon_name, 32, 1, TRUE ); if ( icon_path == NULL ) { g_debug ( "Failed to get Icon %s(%d): n/a", dr->icon_name, dr->icon_size ); continue; diff --git a/subprojects/libnkutils b/subprojects/libnkutils -Subproject 53314c0ab58d1a677d61017a413fd1d83b05ce3 +Subproject e66c49bb944d1c77f23e7da5277b863a5fca8d2 |