diff options
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/desktopdetect/desktopdetector.cxx | 82 | ||||
-rw-r--r-- | vcl/unx/generic/plugadapt/salplug.cxx | 7 |
2 files changed, 2 insertions, 87 deletions
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()) { |