[Scummvm-git-logs] scummvm master -> c027d3789d8abd4a5aa9ce024b4b4b3c8ab8d37c
criezy
criezy at scummvm.org
Wed Dec 2 22:39:29 UTC 2020
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4ee02f869c GUI: Add GUI option to always return to the Launcher instead of quitting
fbd2173f3a GUI: Clarify that leaving a game will lead to loss of unsaved data
80de351bd9 GUI: Reword 'exit' and 'return to launcher' confirmation messages
6da9994da9 GUI: Change button label on 'return to launcher' confirmation
6325e751f2 GUI: Only show 'confirm_exit' dialog when running an engine
c027d3789d GUI: Cleanup confirm_exit code
Commit: 4ee02f869c94ba79c9a69823405a08e3ee4aad4d
https://github.com/scummvm/scummvm/commit/4ee02f869c94ba79c9a69823405a08e3ee4aad4d
Author: Lothar Serra Mari (mail at serra.me)
Date: 2020-12-02T22:39:22Z
Commit Message:
GUI: Add GUI option to always return to the Launcher instead of quitting
ScummVM
Changed paths:
backends/events/default/default-events.cpp
base/commandLine.cpp
engines/dialogs.cpp
gui/ThemeEngine.h
gui/options.cpp
gui/options.h
gui/themes/default.inc
gui/themes/residualvm.zip
gui/themes/residualvm/THEMERC
gui/themes/residualvm/residualvm_layout.stx
gui/themes/residualvm/residualvm_layout_lowres.stx
gui/themes/scummclassic.zip
gui/themes/scummclassic/THEMERC
gui/themes/scummclassic/classic_layout.stx
gui/themes/scummclassic/classic_layout_lowres.stx
gui/themes/scummmodern.zip
gui/themes/scummmodern/THEMERC
gui/themes/scummmodern/scummmodern_layout.stx
gui/themes/scummmodern/scummmodern_layout_lowres.stx
gui/themes/scummremastered.zip
gui/themes/scummremastered/THEMERC
gui/themes/scummremastered/remastered_layout.stx
gui/themes/scummremastered/remastered_layout_lowres.stx
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index db9f357a0d..f5eb400646 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -95,8 +95,9 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
event = _eventQueue.pop();
bool forwardEvent = true;
- // If the backend has the kFeatureNoQuit, replace Quit event with Return to Launcher
- if (event.type == Common::EVENT_QUIT && g_system->hasFeature(OSystem::kFeatureNoQuit))
+ // If the backend has the kFeatureNoQuit or the "Return to Launcher at Exit" option is enabled,
+ // replace "Quit" event with "Return to Launcher"
+ if (event.type == Common::EVENT_QUIT && (g_system->hasFeature(OSystem::kFeatureNoQuit) || (ConfMan.getBool("gui_return_to_launcher_at_exit") && g_engine)))
event.type = Common::EVENT_RETURN_TO_LAUNCHER;
switch (event.type) {
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 16143232de..479d3a5071 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -312,6 +312,7 @@ void registerDefaults() {
ConfMan.registerDefault("gui_browser_show_hidden", false);
ConfMan.registerDefault("gui_browser_native", true);
+ ConfMan.registerDefault("gui_return_to_launcher_at_exit", false);
// Specify threshold for scanning directories in the launcher
// If number of game entries in scummvm.ini exceeds the specified
// number, then skip scanning. -1 = scan always
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index f332f673ef..5ca972397d 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -95,7 +95,7 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", _c("~R~eturn to Launcher", "lowres"), Common::U32String(), kLauncherCmd);
_returnToLauncherButton->setEnabled(_engine->hasFeature(Engine::kSupportsReturnToLauncher));
- if (!g_system->hasFeature(OSystem::kFeatureNoQuit))
+ if (!g_system->hasFeature(OSystem::kFeatureNoQuit) && !(ConfMan.getBool("gui_return_to_launcher_at_exit")))
new GUI::ButtonWidget(this, "GlobalMenu.Quit", _("~Q~uit"), Common::U32String(), kQuitCmd);
_aboutDialog = new GUI::AboutDialog();
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 4d534eead1..0267fd016f 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -38,7 +38,7 @@
#include "graphics/pixelformat.h"
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.40"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.41"
class OSystem;
diff --git a/gui/options.cpp b/gui/options.cpp
index f9ba3e5dea..e3b08cb722 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1705,6 +1705,7 @@ GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher)
_guiLanguagePopUp = nullptr;
_guiLanguageUseGameLanguageCheckbox = nullptr;
_useSystemDialogsCheckbox = nullptr;
+ _guiReturnToLauncherAtExit = nullptr;
#ifdef USE_UPDATES
_updatesPopUpDesc = nullptr;
_updatesPopUp = nullptr;
@@ -2095,13 +2096,28 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
_autosavePeriodPopUp->appendEntry(_(savePeriodLabels[i]), savePeriodValues[i]);
}
+ if (!g_system->hasFeature(OSystem::kFeatureNoQuit)) {
+ _guiReturnToLauncherAtExit = new CheckboxWidget(boss, prefix + "ReturnToLauncherAtExit",
+ _("Always return to the launcher when leaving a game"),
+ _("Always return to the launcher when leaving a game instead of closing ScummVM.")
+ );
+
+ _guiReturnToLauncherAtExit->setState(ConfMan.getBool("gui_return_to_launcher_at_exit", _domain));
+ }
+
+ _guiConfirmExit = new CheckboxWidget(boss, prefix + "ConfirmExit",
+ _("Ask for confirmation on exit"),
+ _("Ask for permission when closing ScummVM or leaving a game.")
+ );
+
+ _guiConfirmExit->setState(ConfMan.getBool("confirm_exit", _domain));
+
#ifdef GUI_ENABLE_KEYSDIALOG
new ButtonWidget(boss, prefix + "KeysButton", _("Keys"), Common::U32String(), kChooseKeyMappingCmd);
#endif
// TODO: joystick setting
-
#ifdef USE_TRANSLATION
_guiLanguagePopUpDesc = new StaticTextWidget(boss, prefix + "GuiLanguagePopupDesc", _("GUI language:"), _("Language of ScummVM GUI"));
_guiLanguagePopUp = new PopUpWidget(boss, prefix + "GuiLanguagePopup");
@@ -2402,6 +2418,14 @@ void GlobalOptionsDialog::apply() {
ConfMan.setBool("gui_browser_native", _useSystemDialogsCheckbox->getState(), _domain);
}
+ if (_guiReturnToLauncherAtExit) {
+ ConfMan.setBool("gui_return_to_launcher_at_exit", _guiReturnToLauncherAtExit->getState(), _domain);
+ }
+
+ if (_guiConfirmExit) {
+ ConfMan.setBool("confirm_exit", _guiConfirmExit->getState(), _domain);
+ }
+
GUI::ThemeEngine::GraphicsMode gfxMode = (GUI::ThemeEngine::GraphicsMode)_rendererPopUp->getSelectedTag();
Common::String oldGfxConfig = ConfMan.get("gui_renderer");
Common::String newGfxConfig = GUI::ThemeEngine::findModeConfigName(gfxMode);
diff --git a/gui/options.h b/gui/options.h
index 00ba6d8bf9..4743e2288d 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -307,6 +307,8 @@ protected:
PopUpWidget *_guiLanguagePopUp;
CheckboxWidget *_guiLanguageUseGameLanguageCheckbox;
CheckboxWidget *_useSystemDialogsCheckbox;
+ CheckboxWidget *_guiReturnToLauncherAtExit;
+ CheckboxWidget *_guiConfirmExit;
#ifdef USE_UPDATES
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index d1b05045d8..69763d466c 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -2001,6 +2001,16 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"</layout>"
"<layout type='horizontal' padding='0,0,0,0' spacing='10' align='center'>"
+"<widget name='ReturnToLauncherAtExit' "
+"type='Checkbox' "
+"/>"
+"</layout>"
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' align='center'>"
+"<widget name='ConfirmExit' "
+"type='Checkbox' "
+"/>"
+"</layout>"
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' align='center'>"
"<widget name='UpdatesPopupDesc' "
"type='OptionsLabel' "
"/>"
@@ -3873,6 +3883,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"</layout>"
"<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
+"<widget name='ReturnToLauncherAtExit' "
+"type='Checkbox' "
+"/>"
+"</layout>"
+"<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
"<widget name='UpdatesPopupDesc' "
"width='80' "
"height='Globals.Line.Height' "
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index d59ffad383..05edbd3a37 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/residualvm/THEMERC b/gui/themes/residualvm/THEMERC
index 8e12c8b7bf..14c28baf9a 100644
--- a/gui/themes/residualvm/THEMERC
+++ b/gui/themes/residualvm/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.40:ResidualVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.41:ResidualVM Modern Theme:No Author]
diff --git a/gui/themes/residualvm/residualvm_layout.stx b/gui/themes/residualvm/residualvm_layout.stx
index cdc6d771c5..ebd4781b72 100644
--- a/gui/themes/residualvm/residualvm_layout.stx
+++ b/gui/themes/residualvm/residualvm_layout.stx
@@ -652,6 +652,16 @@
type = 'Checkbox'
/>
</layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'ConfirmExit'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'ReturnToLauncherAtExit'
+ type = 'Checkbox'
+ />
+ </layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
<widget name = 'UpdatesPopupDesc'
type = 'OptionsLabel'
diff --git a/gui/themes/residualvm/residualvm_layout_lowres.stx b/gui/themes/residualvm/residualvm_layout_lowres.stx
index 0c04117d8d..1d6f1f729c 100644
--- a/gui/themes/residualvm/residualvm_layout_lowres.stx
+++ b/gui/themes/residualvm/residualvm_layout_lowres.stx
@@ -636,6 +636,16 @@
type = 'Checkbox'
/>
</layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
+ <widget name = 'ReturnToLauncherAtExit'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
+ <widget name = 'ConfirmExit'
+ type = 'Checkbox'
+ />
+ </layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'UpdatesPopupDesc'
width = '80'
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 150f71a67b..afbc7d3462 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC
index de6ecce8cf..e94521352a 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.40:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.8.41:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 49ac94da62..2e22cd3fd6 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -636,6 +636,16 @@
type = 'Checkbox'
/>
</layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'ReturnToLauncherAtExit'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'ConfirmExit'
+ type = 'Checkbox'
+ />
+ </layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
<widget name = 'UpdatesPopupDesc'
type = 'OptionsLabel'
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 33c3cd626a..8286494ce2 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -638,6 +638,16 @@
type = 'Checkbox'
/>
</layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
+ <widget name = 'ReturnToLauncherAtExit'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
+ <widget name = 'ConfirmExit'
+ type = 'Checkbox'
+ />
+ </layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'UpdatesPopupDesc'
width = '80'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index b9a79e63d6..bd06d24ce0 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC
index 79c0df9bd2..46b2ab48a0 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.40:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.41:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index cdc6d771c5..5c288174d7 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -652,6 +652,16 @@
type = 'Checkbox'
/>
</layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'ReturnToLauncherAtExit'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'ConfirmExit'
+ type = 'Checkbox'
+ />
+ </layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
<widget name = 'UpdatesPopupDesc'
type = 'OptionsLabel'
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 0c04117d8d..1d6f1f729c 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -636,6 +636,16 @@
type = 'Checkbox'
/>
</layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
+ <widget name = 'ReturnToLauncherAtExit'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
+ <widget name = 'ConfirmExit'
+ type = 'Checkbox'
+ />
+ </layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'UpdatesPopupDesc'
width = '80'
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 05f47ee762..feb69686b3 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
diff --git a/gui/themes/scummremastered/THEMERC b/gui/themes/scummremastered/THEMERC
index acfc527542..f678d26119 100644
--- a/gui/themes/scummremastered/THEMERC
+++ b/gui/themes/scummremastered/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.40:ScummVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.8.41:ScummVM Modern Theme Remastered:No Author]
diff --git a/gui/themes/scummremastered/remastered_layout.stx b/gui/themes/scummremastered/remastered_layout.stx
index cdc6d771c5..5c288174d7 100644
--- a/gui/themes/scummremastered/remastered_layout.stx
+++ b/gui/themes/scummremastered/remastered_layout.stx
@@ -652,6 +652,16 @@
type = 'Checkbox'
/>
</layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'ReturnToLauncherAtExit'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'ConfirmExit'
+ type = 'Checkbox'
+ />
+ </layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
<widget name = 'UpdatesPopupDesc'
type = 'OptionsLabel'
diff --git a/gui/themes/scummremastered/remastered_layout_lowres.stx b/gui/themes/scummremastered/remastered_layout_lowres.stx
index 0c04117d8d..1d6f1f729c 100644
--- a/gui/themes/scummremastered/remastered_layout_lowres.stx
+++ b/gui/themes/scummremastered/remastered_layout_lowres.stx
@@ -636,6 +636,16 @@
type = 'Checkbox'
/>
</layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
+ <widget name = 'ReturnToLauncherAtExit'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
+ <widget name = 'ConfirmExit'
+ type = 'Checkbox'
+ />
+ </layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
<widget name = 'UpdatesPopupDesc'
width = '80'
Commit: fbd2173f3a9c2c3ae43916c4147bface86b4324b
https://github.com/scummvm/scummvm/commit/fbd2173f3a9c2c3ae43916c4147bface86b4324b
Author: Lothar Serra Mari (mail at serra.me)
Date: 2020-12-02T22:39:22Z
Commit Message:
GUI: Clarify that leaving a game will lead to loss of unsaved data
Changed paths:
backends/events/default/default-events.cpp
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index f5eb400646..52cbcffaa4 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -174,7 +174,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
PauseToken pt;
if (g_engine)
pt = g_engine->pauseEngine();
- GUI::MessageDialog alert(_("Do you really want to return to the Launcher?"), _("Launcher"), _("Cancel"));
+ GUI::MessageDialog alert(_("Do you really want to return to the Launcher?\nAny unsaved in-game progress will be lost."), _("Launcher"), _("Cancel"));
forwardEvent = _shouldReturnToLauncher = (alert.runModal() == GUI::kMessageOK);
} else
_shouldReturnToLauncher = true;
@@ -197,7 +197,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
PauseToken pt;
if (g_engine)
pt = g_engine->pauseEngine();
- GUI::MessageDialog alert(_("Do you really want to quit?"), _("Quit"), _("Cancel"));
+ GUI::MessageDialog alert(_("Do you really want to quit?\nAny unsaved in-game progress will be lost."), _("Quit"), _("Cancel"));
forwardEvent = _shouldQuit = (alert.runModal() == GUI::kMessageOK);
}
_confirmExitDialogActive = false;
Commit: 80de351bd9bc83251d0dbf969b011a35c4760da5
https://github.com/scummvm/scummvm/commit/80de351bd9bc83251d0dbf969b011a35c4760da5
Author: Lothar Serra Mari (mail at serra.me)
Date: 2020-12-02T22:39:22Z
Commit Message:
GUI: Reword 'exit' and 'return to launcher' confirmation messages
Changed paths:
backends/events/default/default-events.cpp
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 52cbcffaa4..a2fa9c82ec 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -174,7 +174,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
PauseToken pt;
if (g_engine)
pt = g_engine->pauseEngine();
- GUI::MessageDialog alert(_("Do you really want to return to the Launcher?\nAny unsaved in-game progress will be lost."), _("Launcher"), _("Cancel"));
+ GUI::MessageDialog alert(_("Do you really want to return to the Launcher?\nAny unsaved progress will be lost."), _("Launcher"), _("Cancel"));
forwardEvent = _shouldReturnToLauncher = (alert.runModal() == GUI::kMessageOK);
} else
_shouldReturnToLauncher = true;
@@ -197,7 +197,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
PauseToken pt;
if (g_engine)
pt = g_engine->pauseEngine();
- GUI::MessageDialog alert(_("Do you really want to quit?\nAny unsaved in-game progress will be lost."), _("Quit"), _("Cancel"));
+ GUI::MessageDialog alert(_("Do you really want to quit?\nAny unsaved progress will be lost."), _("Quit"), _("Cancel"));
forwardEvent = _shouldQuit = (alert.runModal() == GUI::kMessageOK);
}
_confirmExitDialogActive = false;
Commit: 6da9994da98038811f0f4ee146bde7e02d0cff17
https://github.com/scummvm/scummvm/commit/6da9994da98038811f0f4ee146bde7e02d0cff17
Author: Lothar Serra Mari (mail at serra.me)
Date: 2020-12-02T22:39:22Z
Commit Message:
GUI: Change button label on 'return to launcher' confirmation
Changed paths:
backends/events/default/default-events.cpp
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index a2fa9c82ec..4dba86cf46 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -174,7 +174,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
PauseToken pt;
if (g_engine)
pt = g_engine->pauseEngine();
- GUI::MessageDialog alert(_("Do you really want to return to the Launcher?\nAny unsaved progress will be lost."), _("Launcher"), _("Cancel"));
+ GUI::MessageDialog alert(_("Do you really want to return to the Launcher?\nAny unsaved progress will be lost."), _("Yes"), _("Cancel"));
forwardEvent = _shouldReturnToLauncher = (alert.runModal() == GUI::kMessageOK);
} else
_shouldReturnToLauncher = true;
Commit: 6325e751f233bf0c90654b3c1d9c9c051f5142da
https://github.com/scummvm/scummvm/commit/6325e751f233bf0c90654b3c1d9c9c051f5142da
Author: Lothar Serra Mari (mail at serra.me)
Date: 2020-12-02T22:39:22Z
Commit Message:
GUI: Only show 'confirm_exit' dialog when running an engine
Changed paths:
backends/events/default/default-events.cpp
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 4dba86cf46..dee612baf1 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -195,10 +195,13 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
{
PauseToken pt;
- if (g_engine)
+ if (g_engine) {
pt = g_engine->pauseEngine();
- GUI::MessageDialog alert(_("Do you really want to quit?\nAny unsaved progress will be lost."), _("Quit"), _("Cancel"));
- forwardEvent = _shouldQuit = (alert.runModal() == GUI::kMessageOK);
+ GUI::MessageDialog alert(_("Do you really want to quit?\nAny unsaved progress will be lost."), _("Quit"), _("Cancel"));
+ forwardEvent = _shouldQuit = (alert.runModal() == GUI::kMessageOK);
+ } else {
+ _shouldQuit = true;
+ }
}
_confirmExitDialogActive = false;
} else {
Commit: c027d3789d8abd4a5aa9ce024b4b4b3c8ab8d37c
https://github.com/scummvm/scummvm/commit/c027d3789d8abd4a5aa9ce024b4b4b3c8ab8d37c
Author: Lothar Serra Mari (mail at serra.me)
Date: 2020-12-02T22:39:22Z
Commit Message:
GUI: Cleanup confirm_exit code
Changed paths:
backends/events/default/default-events.cpp
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index dee612baf1..7c5fd5f61d 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -186,7 +186,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
break;
case Common::EVENT_QUIT:
- if (ConfMan.getBool("confirm_exit")) {
+ if (g_engine && ConfMan.getBool("confirm_exit")) {
if (_confirmExitDialogActive) {
forwardEvent = false;
break;
@@ -195,13 +195,9 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
{
PauseToken pt;
- if (g_engine) {
- pt = g_engine->pauseEngine();
- GUI::MessageDialog alert(_("Do you really want to quit?\nAny unsaved progress will be lost."), _("Quit"), _("Cancel"));
- forwardEvent = _shouldQuit = (alert.runModal() == GUI::kMessageOK);
- } else {
- _shouldQuit = true;
- }
+ pt = g_engine->pauseEngine();
+ GUI::MessageDialog alert(_("Do you really want to quit?\nAny unsaved progress will be lost."), _("Quit"), _("Cancel"));
+ forwardEvent = _shouldQuit = (alert.runModal() == GUI::kMessageOK);
}
_confirmExitDialogActive = false;
} else {
More information about the Scummvm-git-logs
mailing list