configure.ac                                  |    2 -
 vcl/qa/cppunit/app/test_IconThemeSelector.cxx |   25 ++++++---------------
 vcl/source/app/IconThemeSelector.cxx          |   30 +++++++-------------------
 3 files changed, 18 insertions(+), 39 deletions(-)

New commits:
commit 5b20226bb0e431afa4505373aaa0af2d28479528
Author: Heiko Tietze <tietze.he...@gmail.com>
Date:   Wed Jun 6 12:44:55 2018 +0200

    Revert "tdf#116916 - Icon themes missing on LibreOffice Vanilla from macOS 
appstore"
    
    This reverts commit 0550189c28cd759c41b8a048a3f667ae12560c5e.
    
    Change-Id: Id02b5bef9e82ed474a718d57ea3e2159855283b6
    Reviewed-on: https://gerrit.libreoffice.org/55369
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Heiko Tietze <tietze.he...@gmail.com>

diff --git a/configure.ac b/configure.ac
index 34f13e2e5f45..a3b9107477b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12520,7 +12520,7 @@ if test "$enable_mpl_subset" = "yes"; then
     fi
     for theme in $WITH_THEMES; do
         case $theme in
-        breeze|breeze_dark|sifr|sifr_dark|elementary|karasa_jaga) #blacklist 
of icon themes under GPL or LGPL
+        breeze|default|sifr)
             AC_MSG_ERROR([need to disable icon themes from '$WITH_THEMES': 
$theme present, use --with-theme=tango]) ;;
         *) : ;;
         esac
diff --git a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx 
b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
index 45359af06535..3b6c53d3278f 100644
--- a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
@@ -19,12 +19,11 @@
 
 class IconThemeSelectorTest : public CppUnit::TestFixture
 {
-#ifndef _WIN32 //default theme on Windows is Colibre independently from any 
desktop environment
     void
     BreezeIsReturnedForKde5Desktop();
 
     void
-    TangoIsReturnedForGnomeDesktop();
+    ElementaryIsReturnedForGnomeDesktop();
 
     void
     ThemeIsOverriddenByPreferredTheme();
@@ -52,15 +51,12 @@ class IconThemeSelectorTest : public CppUnit::TestFixture
 
     static std::vector<vcl::IconThemeInfo>
     GetFakeInstalledThemes();
-#endif
 
     // Adds code needed to register the test suite
-
     CPPUNIT_TEST_SUITE(IconThemeSelectorTest);
 
-#ifndef _WIN32
     CPPUNIT_TEST(BreezeIsReturnedForKde5Desktop);
-    CPPUNIT_TEST(TangoIsReturnedForGnomeDesktop);
+    CPPUNIT_TEST(ElementaryIsReturnedForGnomeDesktop);
     CPPUNIT_TEST(ThemeIsOverriddenByPreferredTheme);
     CPPUNIT_TEST(ThemeIsOverriddenByHighContrastMode);
     CPPUNIT_TEST(NotInstalledThemeDoesNotOverride);
@@ -69,25 +65,22 @@ class IconThemeSelectorTest : public CppUnit::TestFixture
     CPPUNIT_TEST(FallbackThemeIsReturnedForEmptyInput);
     CPPUNIT_TEST(DifferentPreferredThemesAreInequal);
     CPPUNIT_TEST(DifferentHighContrastModesAreInequal);
-#endif
 
     // End of test suite definition
 
     CPPUNIT_TEST_SUITE_END();
 };
 
-#ifndef _WIN32
-
 /*static*/ std::vector<vcl::IconThemeInfo>
 IconThemeSelectorTest::GetFakeInstalledThemes()
 {
     std::vector<vcl::IconThemeInfo> r;
     vcl::IconThemeInfo a;
-    a.mThemeId = "breeze";
+    a.mThemeId = "colibre";
     r.push_back(a);
-    a.mThemeId = "tango";
+    a.mThemeId = "breeze";
     r.push_back(a);
-    a.mThemeId = "colibre";
+    a.mThemeId = "elementary";
     r.push_back(a);
     a.mThemeId = "sifr";
     r.push_back(a);
@@ -104,12 +97,12 @@ IconThemeSelectorTest::BreezeIsReturnedForKde5Desktop()
 }
 
 void
-IconThemeSelectorTest::TangoIsReturnedForGnomeDesktop()
+IconThemeSelectorTest::ElementaryIsReturnedForGnomeDesktop()
 {
     std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
     vcl::IconThemeSelector s;
     OUString r = s.SelectIconThemeForDesktopEnvironment(themes, "gnome");
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("'tango' theme is returned for gnome 
desktop", OUString("tango"), r);
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("'elementary' theme is returned for gnome 
desktop", OUString("elementary"), r);
 }
 
 void
@@ -120,7 +113,7 @@ IconThemeSelectorTest::ThemeIsOverriddenByPreferredTheme()
     s.SetPreferredIconTheme(preferred, false);
     std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
     OUString selected = s.SelectIconThemeForDesktopEnvironment(themes, 
"gnome");
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("'tango' theme is overridden by breeze", 
preferred, selected);
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("'elementary' theme is overridden by breeze", 
preferred, selected);
 }
 
 void
@@ -197,8 +190,6 @@ IconThemeSelectorTest::DifferentPreferredThemesAreInequal()
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Different preferred themes are detected as 
inequal", false, equal);
 }
 
-#endif
-
 // Put the test suite in the registry
 CPPUNIT_TEST_SUITE_REGISTRATION(IconThemeSelectorTest);
 
diff --git a/vcl/source/app/IconThemeSelector.cxx 
b/vcl/source/app/IconThemeSelector.cxx
index 175fead1cc09..20b64f4da6ac 100644
--- a/vcl/source/app/IconThemeSelector.cxx
+++ b/vcl/source/app/IconThemeSelector.cxx
@@ -11,13 +11,12 @@
 
 #include <vcl/IconThemeScanner.hxx>
 #include <vcl/IconThemeInfo.hxx>
-#include <config_mpl.h>
 
 #include <algorithm>
 
 namespace vcl {
 
-/*static*/ const OUStringLiteral 
IconThemeSelector::FALLBACK_ICON_THEME_ID("tango");
+/*static*/ const OUStringLiteral 
IconThemeSelector::FALLBACK_ICON_THEME_ID("colibre");
 
 namespace {
 
@@ -52,31 +51,20 @@ IconThemeSelector::IconThemeSelector()
 IconThemeSelector::GetIconThemeForDesktopEnvironment(const OUString& 
desktopEnvironment)
 {
     OUString r;
-#ifdef _WIN32
-    r = "colibre";
-    (void)desktopEnvironment;
-#else
     if ( desktopEnvironment.equalsIgnoreAsciiCase("kde4") ||
-         desktopEnvironment.equalsIgnoreAsciiCase("kde5") ) {
+         desktopEnvironment.equalsIgnoreAsciiCase("kde5") ||
+         desktopEnvironment.equalsIgnoreAsciiCase("macosx") ) {
         r = "breeze";
-    } else
-    if ( desktopEnvironment.equalsIgnoreAsciiCase("macosx") ) {
-#if MPL_HAVE_SUBSET
-        r = "tango";
-#else
-        r = "breeze";
-#endif
-    } else
+    }
+    else
     if ( desktopEnvironment.equalsIgnoreAsciiCase("gnome") ||
          desktopEnvironment.equalsIgnoreAsciiCase("mate") ||
          desktopEnvironment.equalsIgnoreAsciiCase("unity") ) {
-        r = "tango";
-    } else
-    {
-        r = FALLBACK_ICON_THEME_ID;
+        r = "elementary";
+    }
+    else {
+        r = FALLBACK_ICON_THEME_ID; //effective also on Windows
     }
-#endif
-
     return r;
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to