From 81d9dc49395fd67b87876499ee45174d732cc85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 14 Mar 2014 17:03:27 +0100 Subject: Use TDE hardware library to control shutdown options in Kickoff menu This resolves Bug 1931 --- kicker/kicker/ui/k_new_mnu.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'kicker') 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 ) { -- cgit v1.2.3