All pastes #482666 Raw Edit

Miscellany

public cpp v1 · immutable
·published 2007-05-11 11:03 UTC
rendered paste body
--- main.cpp.orig       2007-05-11 12:03:06.000000000 +0100+++ main.cpp    2007-05-11 12:02:17.000000000 +0100@@ -451,15 +451,22 @@     // first of all find out, if this is a frontend only host...     bool frontendOnly = gContext->IsFrontendOnly(); +    // how do you want to quit today?+    int  exitMenuStyle = gContext->GetNumSetting("OverrideExitMenu", 0);+     QString title = QObject::tr("Do you really want to exit MythTV?");      DialogBox diag(gContext->GetMainWindow(), title);     diag.AddButton(QObject::tr("No"));-    diag.AddButton(QObject::tr("Yes, Exit now"));-    if (frontendOnly)+    if (exitMenuStyle < 3)+        diag.AddButton(QObject::tr("Yes, Exit now"));+    if ((exitMenuStyle == 0 && frontendOnly) || +        (exitMenuStyle > 1 && exitMenuStyle < 4))         diag.AddButton(QObject::tr("Yes, Exit and Shutdown"));      int result = diag.exec();+    if ((exitMenuStyle == 3) && (result == 2))+        result = 3;     switch (result)     {         case 1: return NO_EXIT;