[Libreoffice-commits] core.git: cui/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 2 18:42:46 UTC 2018
cui/source/options/optgdlg.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 0b2d153f58c83fb289c96b348631e44e553b1a9a
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Nov 2 15:32:36 2018 +0000
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Fri Nov 2 19:42:17 2018 +0100
Sort list of icon styles by DisplayName
Change-Id: I9829341cb54e9a5964c9d018de89511a262069b7
Reviewed-on: https://gerrit.libreoffice.org/62784
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index d87f6dedc6ee..c6b01cd9754d 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -615,6 +615,11 @@ void CanvasSettings::EnabledHardwareAcceleration( bool _bEnabled ) const
// class OfaViewTabPage --------------------------------------------------
+static bool DisplayNameCompareLessThan(const vcl::IconThemeInfo& rInfo1, const vcl::IconThemeInfo& rInfo2)
+{
+ return rInfo1.GetDisplayName().compareTo(rInfo2.GetDisplayName()) < 0;
+}
+
OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "OptViewPage", "cui/ui/optviewpage.ui", &rSet)
, nSizeLB_InitialSelection(0)
@@ -671,6 +676,7 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_pIconStyleLB->Clear();
StyleSettings aStyleSettings = Application::GetSettings().GetStyleSettings();
mInstalledIconThemes = aStyleSettings.GetInstalledIconThemes();
+ std::sort(mInstalledIconThemes.begin(), mInstalledIconThemes.end(), DisplayNameCompareLessThan);
// Start with the automatically chosen icon theme
OUString autoThemeId = aStyleSettings.GetAutomaticallyChosenIconTheme();
More information about the Libreoffice-commits
mailing list