summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorrezso <rezso@rezso.net>2018-09-04 02:29:33 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-09-04 09:55:47 +0200
commit97836184c61075c4d25b85fff0e24874020632cd (patch)
treebaa635a7a2608041ed13330c1b3f08fa8579bd1d /vcl
parent6b669c9d9ee61c5c37c384c3a546467a048f5636 (diff)
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@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/desktops.hxx2
-rw-r--r--vcl/unx/generic/desktopdetect/desktopdetector.cxx82
-rw-r--r--vcl/unx/generic/plugadapt/salplug.cxx7
3 files changed, 2 insertions, 89 deletions
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())
{