diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-05-25 11:39:42 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-25 11:48:07 +0200 |
commit | 5397a8ad5306a670355824f703da702f7401524a (patch) | |
tree | 34ef6f113895cd45ba29bba4d1a3bd0d96584ee7 | |
parent | 02fe9b00f9e779d69189dc011c82dce32c0446fc (diff) |
tdf#90127: Read icon theme from the config when called too early.
Change-Id: I9999150cafde6b103cf1a80232113b7a3d11cfdb
-rw-r--r-- | vcl/source/app/settings.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index ff49e02df2a0..0f1a4b7aeb29 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -3026,6 +3026,19 @@ StyleSettings::SetIconTheme(const OUString& theme) OUString StyleSettings::DetermineIconTheme() const { + if (mxData->mIconTheme.isEmpty()) + { + // read from the configuration, or fallback to what the desktop wants + uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext()); + if (xContext.is()) + { + mxData->mIconTheme = officecfg::Office::Common::Misc::SymbolStyle::get(xContext); + + if (mxData->mIconTheme.isEmpty() || mxData->mIconTheme == "auto") + mxData->mIconTheme = GetAutomaticallyChosenIconTheme(); + } + } + OUString r = mxData->mIconThemeSelector->SelectIconTheme( mxData->mIconThemeScanner->GetFoundIconThemes(), mxData->mIconTheme |