Use TDE hardware library to control shutdown options in Kickoff menu

This resolves Bug 1931
pull/2/head
Slávek Banko 10 years ago
parent 6cfb2ba0ca
commit 81d9dc4939

@ -1359,8 +1359,15 @@ void KMenu::insertStaticExitItems()
} }
bool maysd = false; bool maysd = false;
#ifdef COMPILE_HALBACKEND
if (ksmserver.readBoolEntry( "offerShutdown", true ) && DM().canShutdown()) if (ksmserver.readBoolEntry( "offerShutdown", true ) && DM().canShutdown())
maysd = true; maysd = true;
#else
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if( rootDevice ) {
maysd = rootDevice->canPowerOff();
}
#endif
if ( maysd ) if ( maysd )
{ {

Loading…
Cancel
Save