[Libreoffice-commits] core.git: vcl/inc vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 4 07:56:10 UTC 2018


 vcl/inc/unx/desktops.hxx                          |    2 
 vcl/unx/generic/desktopdetect/desktopdetector.cxx |   82 ----------------------
 vcl/unx/generic/plugadapt/salplug.cxx             |    7 -
 3 files changed, 2 insertions(+), 89 deletions(-)

New commits:
commit 97836184c61075c4d25b85fff0e24874020632cd
Author:     rezso <rezso at rezso.net>
AuthorDate: Tue Sep 4 02:29:33 2018 +0200
Commit:     Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Tue Sep 4 09:55:47 2018 +0200

    remove unsupported TDE and KDE3 desktops from desktopdetect and salplug
    
    Change-Id: I7b8468c3c451e67f30cacc80196ca7f46c2a000c
    Reviewed-on: https://gerrit.libreoffice.org/59959
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/vcl/inc/unx/desktops.hxx b/vcl/inc/unx/desktops.hxx
index 89d6459ef955..1b8a7f5f7662 100644
--- a/vcl/inc/unx/desktops.hxx
+++ b/vcl/inc/unx/desktops.hxx
@@ -31,8 +31,6 @@ enum SAL_DLLPUBLIC_RTTI DesktopType {
     DESKTOP_UNITY,
     DESKTOP_XFCE,
     DESKTOP_MATE,
-    DESKTOP_TDE,
-    DESKTOP_KDE3,
     DESKTOP_KDE4,
     DESKTOP_KDE5
 }; // keep in sync with desktop_strings[] in salplug.cxx
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index 02ac9be09c3d..e39348c460e6 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -136,47 +136,6 @@ extern "C"
     typedef int(* XErrorHandler)(Display*,XErrorEvent*);
 }
 
-static int TDEVersion( Display* pDisplay )
-{
-    int nRet = 0;
-
-    Atom nFullSession = XInternAtom( pDisplay, "TDE_FULL_SESSION", True );
-    Atom nTDEVersion  = XInternAtom( pDisplay, "TDE_SESSION_VERSION", True );
-
-    if( nFullSession )
-    {
-        if( !nTDEVersion )
-            return 14;
-
-        Atom                aRealType   = None;
-        int                 nFormat     = 8;
-        unsigned long       nItems      = 0;
-        unsigned long       nBytesLeft  = 0;
-        unsigned char*  pProperty   = nullptr;
-        XGetWindowProperty( pDisplay,
-                            DefaultRootWindow( pDisplay ),
-                            nTDEVersion,
-                            0, 1,
-                            False,
-                            AnyPropertyType,
-                            &aRealType,
-                            &nFormat,
-                            &nItems,
-                            &nBytesLeft,
-                            &pProperty );
-        if( !WasXError() && nItems != 0 && pProperty )
-        {
-            nRet = *reinterpret_cast< sal_Int32* >( pProperty );
-        }
-        if( pProperty )
-        {
-            XFree( pProperty );
-            pProperty = nullptr;
-        }
-    }
-    return nRet;
-}
-
 static int KDEVersion( Display* pDisplay )
 {
     int nRet = 0;
@@ -218,39 +177,6 @@ static int KDEVersion( Display* pDisplay )
     return nRet;
 }
 
-static bool is_tde_desktop( Display* pDisplay )
-{
-    if ( nullptr != getenv( "TDE_FULL_SESSION" ) )
-    {
-        return true; // TDE
-    }
-
-    if ( TDEVersion( pDisplay ) >= 14 )
-        return true;
-
-    return false;
-}
-
-static bool is_kde3_desktop( Display* pDisplay )
-{
-    static const char * pFullVersion = getenv( "KDE_FULL_SESSION" );
-    if ( pFullVersion )
-    {
-        static const char * pSessionVersion = getenv( "KDE_SESSION_VERSION" );
-        if ( !pSessionVersion || pSessionVersion[0] == '0' )
-        {
-            return true; // does not exist => KDE3
-        }
-
-        if ( strcmp(pSessionVersion, "3" ) == 0 )
-        {
-            return true;
-        }
-    }
-
-    return KDEVersion( pDisplay ) == 3;
-}
-
 static bool is_kde4_desktop( Display* pDisplay )
 {
     static const char * pFullVersion = getenv( "KDE_FULL_SESSION" );
@@ -288,8 +214,6 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
     {
         OString aOver( pOverride );
 
-        if ( aOver.equalsIgnoreAsciiCase( "tde" ) )
-            return DESKTOP_TDE;
         if ( aOver.equalsIgnoreAsciiCase( "kde5" ) )
             return DESKTOP_KDE5;
         if ( aOver.equalsIgnoreAsciiCase( "kde4" ) )
@@ -304,8 +228,6 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
             return DESKTOP_XFCE;
         if ( aOver.equalsIgnoreAsciiCase( "mate" ) )
             return DESKTOP_MATE;
-        if ( aOver.equalsIgnoreAsciiCase( "kde" ) )
-            return DESKTOP_KDE3;
         if ( aOver.equalsIgnoreAsciiCase( "none" ) )
             return DESKTOP_UNKNOWN;
     }
@@ -389,10 +311,6 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
             ret = DESKTOP_KDE4;
         else if ( is_gnome_desktop( pDisplay ) )
             ret = DESKTOP_GNOME;
-        else if ( is_kde3_desktop( pDisplay ) )
-            ret = DESKTOP_KDE3;
-        else if ( is_tde_desktop( pDisplay ) )
-            ret = DESKTOP_TDE;
         else
             ret = DESKTOP_UNKNOWN;
 
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index cadfb34842ae..bce722b6ed6c 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -197,8 +197,6 @@ static SalInstance* autodetect_plugin()
     else if ( desktop == DESKTOP_GNOME ||
               desktop == DESKTOP_UNITY ||
               desktop == DESKTOP_XFCE  ||
-              desktop == DESKTOP_KDE3 ||
-              desktop == DESKTOP_TDE ||
               desktop == DESKTOP_MATE )
         pList = pStandardFallbackList;
     else if( desktop == DESKTOP_KDE4 || desktop == DESKTOP_KDE5 )
@@ -238,7 +236,7 @@ SalInstance *CreateSalInstance()
 
     // fallback, try everything
     static const char* const pPlugin[] = {
-        "gtk3", "gtk", "kde5", "kde4", "kde", "tde", "gen" };
+        "gtk3", "gtk", "kde5", "kde4", "gen" };
 
     for ( int i = 0; !pInst && i != SAL_N_ELEMENTS(pPlugin); ++i )
         pInst = tryInstance( OUString::createFromAscii( pPlugin[ i ] ) );
@@ -297,8 +295,7 @@ const OUString& SalGetDesktopEnvironment()
     // Order to match desktops.hxx' DesktopType
     static const char * const desktop_strings[] = {
         "none", "unknown", "GNOME", "UNITY",
-        "XFCE", "MATE", "TDE",
-        "KDE", "KDE4", "KDE5" };
+        "XFCE", "MATE", "KDE4", "KDE5" };
     static OUString aRet;
     if( aRet.isEmpty())
     {


More information about the Libreoffice-commits mailing list