[evolution] I#1966 - EColorSchemeWatcher: Verify chosen dark variant theme name exists
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#1966 - EColorSchemeWatcher: Verify chosen dark variant theme name exists
- Date: Wed, 20 Jul 2022 16:02:17 +0000 (UTC)
commit 677d5ec7a3ec0d2583e1b048756d88ebdcba953d
Author: Milan Crha <mcrha redhat com>
Date: Wed Jul 20 18:01:46 2022 +0200
I#1966 - EColorSchemeWatcher: Verify chosen dark variant theme name exists
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1966
src/e-util/e-color-scheme-watcher.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/e-util/e-color-scheme-watcher.c b/src/e-util/e-color-scheme-watcher.c
index b5b5f54651..2f49577a8b 100644
--- a/src/e-util/e-color-scheme-watcher.c
+++ b/src/e-util/e-color-scheme-watcher.c
@@ -215,6 +215,13 @@ e_color_scheme_watcher_sync_theme (EColorSchemeWatcher *self)
if (self->color_scheme == E_COLOR_SCHEME_PREFER_DARK &&
e_color_scheme_watcher_check_theme_exists (theme_name, "dark")) {
new_theme_name = g_strconcat (theme_name, "-dark", NULL);
+ /* Verify whether the newly constructed name can be used; otherwise the theme
+ supports the dark variant with the original name. */
+ if (!e_color_scheme_watcher_check_theme_exists (new_theme_name, NULL)) {
+ g_free (new_theme_name);
+ new_theme_name = theme_name;
+ theme_name = NULL;
+ }
} else if (suffix_cut && e_color_scheme_watcher_check_theme_exists (theme_name,
NULL)) {
new_theme_name = theme_name;
theme_name = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]