[Libreoffice-commits] core.git: configure.ac cui/uiconfig icon-themes/breeze officecfg/registry vcl/inc vcl/source vcl/unx

Jonathan Riddell jr at jriddell.org
Sat Nov 22 13:49:42 PST 2014


 configure.ac                                               |    8 ++--
 cui/uiconfig/ui/optviewpage.ui                             |    1 
 icon-themes/breeze/COPYING                                 |   20 ++++++++++
 icon-themes/breeze/cmd/lc_save.png                         |binary
 icon-themes/breeze/cmd/lc_saveas.png                       |binary
 icon-themes/breeze/cmd/sc_saveas.png                       |binary
 icon-themes/breeze/mapping                                 |    4 ++
 icon-themes/breeze/update-icons.py                         |   24 +++++++++++++
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   10 +++++
 vcl/inc/unx/desktops.hxx                                   |    3 +
 vcl/source/app/IconThemeSelector.cxx                       |    3 +
 vcl/unx/generic/desktopdetect/desktopdetector.cxx          |    4 +-
 vcl/unx/generic/plugadapt/salplug.cxx                      |    4 +-
 13 files changed, 72 insertions(+), 9 deletions(-)

New commits:
commit 9ddb055641271aa33fe9f470c739eab9d146a4c6
Author: Jonathan Riddell <jr at jriddell.org>
Date:   Sat Nov 22 20:36:09 2014 +0100

    Add Breeze icon theme for use with KDE Plasma 5
    
    Change-Id: I936d31300126e2ce000ea3a7cd70c8a2dec19502
    Reviewed-on: https://gerrit.libreoffice.org/13043
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/configure.ac b/configure.ac
index 8f29ed6..05b1972 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1474,7 +1474,7 @@ AC_ARG_WITH(galleries,
 AC_ARG_WITH(theme,
     AS_HELP_STRING([--with-theme="theme1 theme2..."],
         [Choose which themes to include. By default those themes with an '*' are included.
-         Possible choices: *crystal, *galaxy, *hicontrast, human, industrial, *oxygen, *sifr, *tango, *tango_testing.]),
+         Possible choices: *breeze, *crystal, *galaxy, *hicontrast, human, industrial, *oxygen, *sifr, *tango, *tango_testing.]),
 ,)
 
 AC_ARG_WITH(helppack-integration,
@@ -11372,7 +11372,7 @@ dnl ===================================================================
 AC_MSG_CHECKING([which themes to include])
 # if none given use default subset of available themes
 if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
-    with_theme="crystal galaxy hicontrast oxygen tango sifr"
+    with_theme="breeze crystal galaxy hicontrast oxygen tango sifr"
     test -z "$ENABLE_RELEASE_BUILD" && with_theme="$with_theme tango_testing"
 fi
 
@@ -11380,7 +11380,7 @@ WITH_THEMES=""
 if test "x$with_theme" != "xno"; then
     for theme in $with_theme; do
         case $theme in
-        crystal|galaxy|hicontrast|human|industrial|oxygen|sifr|tango|tango_testing) real_theme="$theme" ;;
+        breeze|crystal|galaxy|hicontrast|human|industrial|oxygen|sifr|tango|tango_testing) real_theme="$theme" ;;
         default) real_theme=galaxy ;;
         *) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
         esac
@@ -12638,7 +12638,7 @@ if test "$enable_mpl_subset" = "yes"; then
     fi
     for theme in $WITH_THEMES; do
         case $theme in
-        crystal|default|hicontrast|human|oxygen|sifr)
+        breeze|crystal|default|hicontrast|human|oxygen|sifr)
             AC_MSG_ERROR([need to disable icon themes from '$WITH_THEMES': $theme present, use --with-theme=tango]) ;;
         *) : ;;
         esac
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index f302b5c..9ae54b3 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -413,6 +413,7 @@
                               <item translatable="yes">Classic</item>
                               <item translatable="yes">Human</item>
                               <item translatable="yes">Sifr</item>
+                              <item translatable="yes">Breeze</item>
                               <item translatable="yes">Tango Testing</item>
                             </items>
                           </object>
diff --git a/icon-themes/breeze/COPYING b/icon-themes/breeze/COPYING
new file mode 100644
index 0000000..dc1efd1
--- /dev/null
+++ b/icon-themes/breeze/COPYING
@@ -0,0 +1,20 @@
+Breeze icon theme from KDE to fit in with the Plasma 5 desktop.
+
+Breeze Icon Theme has been developed by The KDE Visual Design Group.
+https://forum.kde.org/viewforum.php?f=285
+
+Copyright 2014 Uri Herrera <kaisergreymon99 at gmail.com> and other contributors
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of 
+the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
diff --git a/icon-themes/breeze/cmd/lc_save.png b/icon-themes/breeze/cmd/lc_save.png
new file mode 100644
index 0000000..abe36fe
Binary files /dev/null and b/icon-themes/breeze/cmd/lc_save.png differ
diff --git a/icon-themes/breeze/cmd/lc_saveas.png b/icon-themes/breeze/cmd/lc_saveas.png
new file mode 100644
index 0000000..0377fe3
Binary files /dev/null and b/icon-themes/breeze/cmd/lc_saveas.png differ
diff --git a/icon-themes/breeze/cmd/sc_saveas.png b/icon-themes/breeze/cmd/sc_saveas.png
new file mode 100644
index 0000000..e927b38
Binary files /dev/null and b/icon-themes/breeze/cmd/sc_saveas.png differ
diff --git a/icon-themes/breeze/mapping b/icon-themes/breeze/mapping
new file mode 100644
index 0000000..7f31845
--- /dev/null
+++ b/icon-themes/breeze/mapping
@@ -0,0 +1,4 @@
+actions/toolbar/document-save.svg cmd/lc_save.png 26
+actions/toolbar/document-save.svg cmd/sc_save.png 16
+actions/toolbar/document-save-as.svg cmd/lc_saveas.png 26
+actions/toolbar/document-save-as.svg cmd/sc_saveas.png 16
diff --git a/icon-themes/breeze/update-icons.py b/icon-themes/breeze/update-icons.py
new file mode 100755
index 0000000..81014d2
--- /dev/null
+++ b/icon-themes/breeze/update-icons.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python3
+# Copyright 2014 Jonathan Riddell <jr at jriddell.org>
+# May be copied under the MPLv2
+# Map breeze freedesktop named icons to libreoffice icon names
+
+import os
+import subprocess
+
+if os.path.isdir("plasma-next-icons"):
+    os.chdir("plasma-next-icons")
+    subprocess.check_call(["git", "pull", "-r"])
+    os.chdir("..")
+else:
+    subprocess.check_call(["git", "clone", "https://github.com/NitruxSA/plasma-next-icons.git"])
+
+mapping = {}
+
+mappingFile = open('mapping', 'r')
+for line in mappingFile:
+    freeDesktopFile = "plasma-next-icons/" + line.rsplit(" ")[0]
+    libreOfficeFile = line.rsplit(" ")[1].rstrip()
+    size = line.rsplit(" ")[2].rstrip()
+    print(freeDesktopFile + " → " + libreOfficeFile + " @ " + size+"x"+size)
+    subprocess.check_call(["ksvgtopng", size, size, freeDesktopFile, libreOfficeFile])
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index fec8d25..e4ada07 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5637,6 +5637,16 @@
               <desc>Sifr - an adaptation of the Gnome symbolic theme</desc>
             </info>
           </enumeration>
+          <enumeration oor:value="breeze">
+            <info>
+              <desc>Breeze - the icon theme from KDE Plasma</desc>
+            </info>
+          </enumeration>
+          <enumeration oor:value="oxygen">
+            <info>
+              <desc>Oxygen - the icon theme from KDE 4</desc>
+            </info>
+          </enumeration>
         </constraints>
         <value>auto</value>
       </prop>
diff --git a/vcl/inc/unx/desktops.hxx b/vcl/inc/unx/desktops.hxx
index 5bc768d..babb168 100644
--- a/vcl/inc/unx/desktops.hxx
+++ b/vcl/inc/unx/desktops.hxx
@@ -29,7 +29,8 @@ enum DesktopType {
     DESKTOP_MATE,
     DESKTOP_TDE,
     DESKTOP_KDE,
-    DESKTOP_KDE4
+    DESKTOP_KDE4,
+    DESKTOP_KDE5
 }; // keep in sync with desktop_strings[] in salplug.cxx
 
 #endif // INCLUDED_VCL_INC_UNX_DESKTOPS_HXX
diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx
index c256a09..b9beee3 100644
--- a/vcl/source/app/IconThemeSelector.cxx
+++ b/vcl/source/app/IconThemeSelector.cxx
@@ -63,6 +63,9 @@ IconThemeSelector::GetIconThemeForDesktopEnvironment(const OUString& desktopEnvi
     else if ( desktopEnvironment.equalsIgnoreAsciiCase("kde4") ) {
         r = "oxygen";
     }
+    else if ( desktopEnvironment.equalsIgnoreAsciiCase("kde5") ) {
+        r = "breeze";
+    }
     else if ( desktopEnvironment.equalsIgnoreAsciiCase("MacOSX") ) {
         r = "sifr";
     }
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index e1f253d..067e729 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -303,7 +303,7 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
         if ( aOver.equalsIgnoreAsciiCase( "tde" ) )
             return DESKTOP_TDE;
         if ( aOver.equalsIgnoreAsciiCase( "kde5" ) )
-            return DESKTOP_KDE4;
+            return DESKTOP_KDE5;
         if ( aOver.equalsIgnoreAsciiCase( "kde4" ) )
             return DESKTOP_KDE4;
         if ( aOver.equalsIgnoreAsciiCase( "gnome" ) )
@@ -391,7 +391,7 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
     // these guys can be slower, with X property fetches,
     // round-trips etc. and so are done later.
     else if ( is_kde5_desktop( pDisplay ) )
-        ret = DESKTOP_KDE4;
+        ret = DESKTOP_KDE5;
     else if ( is_kde4_desktop( pDisplay ) )
         ret = DESKTOP_KDE4;
     else if ( is_gnome_desktop( pDisplay ) )
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index 40a9683..2049b73 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -194,7 +194,7 @@ static SalInstance* autodetect_plugin()
         pList = pKDEFallbackList;
         nListEntry = 1;
     }
-    else if( desktop == DESKTOP_KDE4 )
+    else if( desktop == DESKTOP_KDE4 || desktop == DESKTOP_KDE5 )
         pList = pKDEFallbackList;
 
     SalInstance* pInst = NULL;
@@ -288,7 +288,7 @@ const OUString& SalGetDesktopEnvironment()
     static const char * const desktop_strings[] = {
         "none", "unknown", "GNOME", "UNITY",
         "XFCE", "MATE", "TDE",
-        "KDE", "KDE4" };
+        "KDE", "KDE4", "KDE5" };
     static OUString aRet;
     if( aRet.isEmpty())
     {


More information about the Libreoffice-commits mailing list