diff options
author | Slávek Banko <[email protected]> | 2014-10-18 14:19:37 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2014-10-18 14:29:21 +0200 |
commit | 107220694fe3387df4051dcd94ae6c9995cb45f6 (patch) | |
tree | 4301e933aa91df778cdc97153f4e1bd4ba4e3114 /ksmserver | |
parent | 69da674b30d246f4df152501b9312518cd900372 (diff) | |
download | tdebase-107220694fe3387df4051dcd94ae6c9995cb45f6.tar.gz tdebase-107220694fe3387df4051dcd94ae6c9995cb45f6.zip |
Allow contitional build with tdehwlib
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'ksmserver')
-rw-r--r-- | ksmserver/server.cpp | 4 | ||||
-rw-r--r-- | ksmserver/server.h | 4 | ||||
-rw-r--r-- | ksmserver/shutdown.cpp | 4 | ||||
-rw-r--r-- | ksmserver/shutdowndlg.cpp | 6 |
4 files changed, 16 insertions, 2 deletions
diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp index 257d5f20c..c9a037397 100644 --- a/ksmserver/server.cpp +++ b/ksmserver/server.cpp @@ -598,7 +598,9 @@ KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManag clientInteracting = 0; xonCommand = config->readEntry( "xonCommand", "xon" ); +#ifdef __TDE_HAVE_TDEHWLIB hwDevices = TDEGlobal::hardwareDevices(); +#endif connect( &knotifyTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( knotifyTimeout())); connect( &startupSuspendTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( startupSuspendTimeout())); @@ -720,6 +722,7 @@ void KSMServer::cleanUp() DM().shutdown( shutdownType, shutdownMode, bootOption ); } else { +#ifdef __TDE_HAVE_TDEHWLIB TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); if (rootDevice) { if (shutdownType == TDEApplication::ShutdownTypeHalt) { @@ -729,6 +732,7 @@ void KSMServer::cleanUp() rootDevice->setPowerState(TDESystemPowerState::Reboot); } } +#endif } } diff --git a/ksmserver/server.h b/ksmserver/server.h index f5e0d37c6..bc677752c 100644 --- a/ksmserver/server.h +++ b/ksmserver/server.h @@ -23,7 +23,9 @@ Copyright (C) 2000 Matthias Ettrich <[email protected]> #include <tqtimer.h> #include <dcopobject.h> +#ifdef __TDE_HAVE_TDEHWLIB #include <tdehardwaredevices.h> +#endif #include "server2.h" @@ -251,7 +253,9 @@ private: WindowMap legacyWindows; +#ifdef __TDE_HAVE_TDEHWLIB TDEHardwareDevices* hwDevices; +#endif int initialClientCount; int phase2ClientCount; int protectionTimerCounter; diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index d7eaafb0e..a40bffc3b 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -152,6 +152,7 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd, bool &mayrb, mayrb = true; } else { +#ifdef __TDE_HAVE_TDEHWLIB TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); if (rootDevice) { if (rootDevice->canPowerOff()) { @@ -161,6 +162,7 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd, bool &mayrb, mayrb = true; } } +#endif } } if (!maysd) { @@ -239,6 +241,7 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm, // If this is not done the desktop of the locked session will be shown after suspend/hibernate until the lock fully engages! kapp->dcopClient()->call("kdesktop", "KScreensaverIface", "lock()", TQCString(""), replyType, replyData); } +#ifdef __TDE_HAVE_TDEHWLIB TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); if (rootDevice) { if (selection == 1) { // Suspend @@ -251,6 +254,7 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm, rootDevice->setPowerState(TDESystemPowerState::Freeze); } } +#endif } } diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp index 6b3b02428..d4881ad85 100644 --- a/ksmserver/shutdowndlg.cpp +++ b/ksmserver/shutdowndlg.cpp @@ -33,7 +33,9 @@ Copyright (C) 2000 Matthias Ettrich <[email protected]> #include <tdelocale.h> #include <tdeconfig.h> #include <tdeapplication.h> +#ifdef __TDE_HAVE_TDEHWLIB #include <tdehardwaredevices.h> +#endif #include <kdebug.h> #include <kpushbutton.h> #include <kstdguiitem.h> @@ -805,7 +807,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, bool canSuspend = false; bool canHibernate = false; -#ifdef COMPILE_HALBACKEND +#if defined(COMPILE_HALBACKEND) // Query HAL for suspend/resume support m_halCtx = libhal_ctx_new(); @@ -860,7 +862,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, canHibernate = true; } } -#else // COMPILE_HALBACKEND +#elif defined(__TDE_HAVE_TDEHWLIB) // COMPILE_HALBACKEND TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice(); if (rootDevice) { canFreeze = rootDevice->canFreeze(); |