diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-03 17:38:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-04 09:57:57 +0200 |
commit | f317a3de7473de5e6366ba4f2a4aa0ca25cdfdc1 (patch) | |
tree | 79e16f072138952a4b2c14f2e200b0d75cc5c182 | |
parent | e3df7e17d568e1efb5d2b94f95b4b52c441789cf (diff) |
Resolves: tdf#120175 normalize theme names to our naming scheme
So breeze-dark turns into breeze_dark
Change-Id: Id5d06f73a79f099048b31fd16f9f9611236af392
Reviewed-on: https://gerrit.libreoffice.org/61321
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | icon-themes/README | 1 | ||||
-rw-r--r-- | vcl/source/app/IconThemeSelector.cxx | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/icon-themes/README b/icon-themes/README index fc069f3a7598..e40683d40893 100644 --- a/icon-themes/README +++ b/icon-themes/README @@ -24,6 +24,7 @@ How to add a new image set: scp2 compilation crashes when using a dash '-'. It evidently splits the name into two strings. ^ It's probably not true anymore with filelists. + ^ if this gets changed, IconThemeSelector::SetPreferredIconTheme needs to change too - Add its name (new_set) to WITH_THEMES variable in configure.ac diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx index c9da2d6895c3..3665d1ace8dc 100644 --- a/vcl/source/app/IconThemeSelector.cxx +++ b/vcl/source/app/IconThemeSelector.cxx @@ -130,7 +130,9 @@ IconThemeSelector::SetUseHighContrastTheme(bool v) void IconThemeSelector::SetPreferredIconTheme(const OUString& theme, bool bDarkIconTheme) { - mPreferredIconTheme = theme; + // lower case theme name, and (tdf#120175) replace - with _ + // see icon-themes/README + mPreferredIconTheme = theme.toAsciiLowerCase().replace('-','_'); mPreferDarkIconTheme = bDarkIconTheme; } |