summaryrefslogtreecommitdiffstats
path: root/kicker/kicker/ui/k_new_mnu.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-03-14 17:03:27 +0100
committerSlávek Banko <slavek.banko@axis.cz>2014-03-14 17:03:27 +0100
commit81d9dc49395fd67b87876499ee45174d732cc85a (patch)
tree6bec6e023a1203d0f18c54c65bff0fc6b03f789f /kicker/kicker/ui/k_new_mnu.cpp
parent6cfb2ba0ca1968ee182ce7b5def42536e1ef24b3 (diff)
downloadtdebase-81d9dc49395fd67b87876499ee45174d732cc85a.tar.gz
tdebase-81d9dc49395fd67b87876499ee45174d732cc85a.zip
Use TDE hardware library to control shutdown options in Kickoff menu
This resolves Bug 1931
Diffstat (limited to 'kicker/kicker/ui/k_new_mnu.cpp')
-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 )
{