diff --git a/mythtv/libs/libmythui/myththemedmenu.cpp b/mythtv/libs/libmythui/myththemedmenu.cpp
index ed2e54c..77aaf73 100644
a
|
b
|
void MythThemedMenu::ShowMenu() |
308 | 308 | return; |
309 | 309 | |
310 | 310 | int override_menu = GetMythDB()->GetNumSetting("OverrideExitMenu"); |
| 311 | int MythShutdownLock = GetMythDB()->GetNumSetting("MythShutdownLock"); |
| 312 | int idleTimeoutSecs = GetMythDB()->GetNumSetting("idleTimeoutSecs"); |
311 | 313 | QString label = tr("System Menu"); |
312 | 314 | MythScreenStack* mainStack = GetMythMainWindow()->GetMainStack(); |
313 | 315 | m_menuPopup = new MythDialogBox(label, mainStack, "menuPopup"); |
… |
… |
void MythThemedMenu::ShowMenu() |
325 | 327 | if (override_menu != 7) |
326 | 328 | m_menuPopup->AddButton(tr("Exit application"), QVariant("exit")); |
327 | 329 | |
| 330 | // don't offer to enable/disable auto shutdown if auto shutdown is disabled |
| 331 | if (idleTimeoutSecs != 0) |
| 332 | { |
| 333 | if (MythShutdownLock == 0) |
| 334 | { |
| 335 | m_menuPopup->AddButton(tr("Disable Auto Shutdown"), |
| 336 | QVariant("lockShutdown")); |
| 337 | } |
| 338 | else |
| 339 | { |
| 340 | m_menuPopup->AddButton(tr("Enable Auto Shutdown"), |
| 341 | QVariant("unlockShutdown")); |
| 342 | } |
| 343 | } |
| 344 | |
328 | 345 | switch (override_menu) |
329 | 346 | { |
330 | 347 | case 2: |
… |
… |
void MythThemedMenu::customEvent(QEvent *event) |
416 | 433 | QString arg("exiting_app"); |
417 | 434 | m_state->m_callback(m_state->m_callbackdata, arg); |
418 | 435 | } |
| 436 | else if (action == "lockShutdown") |
| 437 | { |
| 438 | GetMythDB()->SaveSettingOnHost("MythShutdownLock", "1", NULL); |
| 439 | } |
| 440 | else if (action == "unlockShutdown") |
| 441 | { |
| 442 | GetMythDB()->SaveSettingOnHost("MythShutdownLock", "0", NULL); |
| 443 | } |
419 | 444 | } |
420 | 445 | else if (resultid == "password") |
421 | 446 | { |