diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-08 02:02:57 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-08 02:02:57 +0000 |
commit | 5a63d5945b2f886322c3ed6f5561822bcb1ed6fa (patch) | |
tree | 6de1044646a3920cef778dadd48cfaefee34b2c6 /ksmserver/shutdowndlg.cpp | |
parent | 21fc43f2d4b21845480549053f92293fe1f41ce3 (diff) | |
download | tdebase-5a63d5945b2f886322c3ed6f5561822bcb1ed6fa.tar.gz tdebase-5a63d5945b2f886322c3ed6f5561822bcb1ed6fa.zip |
Allow kdebase to build with HAL disabled
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1252060 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksmserver/shutdowndlg.cpp')
-rw-r--r-- | ksmserver/shutdowndlg.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp index 8a7693528..3deffdb71 100644 --- a/ksmserver/shutdowndlg.cpp +++ b/ksmserver/shutdowndlg.cpp @@ -5,8 +5,6 @@ Copyright (C) 2010 Timothy Pearson <kb9vqf@pearsoncomputing.net> Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org> ******************************************************************/ -#include <config.h> - #include "shutdowndlg.h" #include <tqapplication.h> #include <tqlayout.h> @@ -708,8 +706,9 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, } - +#ifdef COMPILE_HALBACKEND m_halCtx = NULL; +#endif if (maysd) { @@ -723,6 +722,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, bool canSuspend = false; bool canHibernate = false; +#ifdef COMPILE_HALBACKEND // Query HAL for suspend/resume support m_halCtx = libhal_ctx_new(); @@ -777,7 +777,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, canHibernate = true; } } - +#endif if(doUbuntuLogout) { @@ -976,6 +976,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, KSMShutdownDlg::~KSMShutdownDlg() { +#ifdef COMPILE_HALBACKEND if (m_halCtx) { DBusError error; @@ -983,6 +984,7 @@ KSMShutdownDlg::~KSMShutdownDlg() libhal_ctx_shutdown(m_halCtx, &error); libhal_ctx_free(m_halCtx); } +#endif } @@ -1019,6 +1021,7 @@ void KSMShutdownDlg::slotHalt() void KSMShutdownDlg::slotSuspend() { +#ifdef COMPILE_HALBACKEND if (m_lockOnResume) { DCOPRef("kdesktop", "KScreensaverIface").send("lock"); } @@ -1040,10 +1043,12 @@ void KSMShutdownDlg::slotSuspend() } reject(); // continue on resume +#endif } void KSMShutdownDlg::slotHibernate() { +#ifdef COMPILE_HALBACKEND if (m_lockOnResume) { DCOPRef("kdesktop", "KScreensaverIface").send("lock"); } @@ -1062,6 +1067,7 @@ void KSMShutdownDlg::slotHibernate() } reject(); // continue on resume +#endif } bool KSMShutdownDlg::confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, TQString& bootOption ) |