summaryrefslogtreecommitdiffstats
path: root/kicker
diff options
context:
space:
mode:
Diffstat (limited to 'kicker')
-rw-r--r--kicker/kicker/ui/k_new_mnu.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/kicker/kicker/ui/k_new_mnu.cpp b/kicker/kicker/ui/k_new_mnu.cpp
index 52b131781..1aa68a9aa 100644
--- a/kicker/kicker/ui/k_new_mnu.cpp
+++ b/kicker/kicker/ui/k_new_mnu.cpp
@@ -1359,8 +1359,15 @@ void KMenu::insertStaticExitItems()
}
bool maysd = false;
+#ifdef COMPILE_HALBACKEND
if (ksmserver.readBoolEntry( "offerShutdown", true ) && DM().canShutdown())
maysd = true;
+#else
+ TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
+ if( rootDevice ) {
+ maysd = rootDevice->canPowerOff();
+ }
+#endif
if ( maysd )
{