diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-06-23 18:13:57 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-06-23 18:13:57 +0200 |
commit | c47b8cd562cc66881efe257b5ebc3109e07097a9 (patch) | |
tree | c1ff82bd35bbed1cf64142dbdbe321b5201c4cdd /src | |
parent | 0247e33ac2dfcf141577b36a875f01192d8199b7 (diff) |
properly fall back to the freedesktop theme if the configured theme doesn't exist
Diffstat (limited to 'src')
-rw-r--r-- | src/sound-theme-spec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sound-theme-spec.c b/src/sound-theme-spec.c index 31a9cd5..02b8de2 100644 --- a/src/sound-theme-spec.c +++ b/src/sound-theme-spec.c @@ -636,8 +636,12 @@ static int find_sound_for_theme(ca_sound_file **f, ca_theme_data **t, const char ca_return_val_if_fail(locale, CA_ERROR_INVALID); ca_return_val_if_fail(profile, CA_ERROR_INVALID); - /* First, try in the theme itself */ - if ((ret = load_theme_data(t, theme)) == CA_SUCCESS) + /* First, try in the theme itself, and if that fails the fallback theme */ + if ((ret = load_theme_data(t, theme)) == CA_ERROR_NOTFOUND) + if (!streq(theme, FALLBACK_THEME)) + ret = load_theme_data(t, FALLBACK_THEME); + + if (ret == CA_SUCCESS) if ((ret = find_sound_for_locale(f, *t, name, locale, profile)) != CA_ERROR_NOTFOUND) return ret; |