From 6c781b05a1f45976155e2274fc9be97496ff2361 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 17 Dec 2017 20:43:03 +0100 Subject: [PATCH] CSettingsManager: add cancel buttons to backup/save config messages User should have this possibility because 'yes' and 'no' are coming with defined effects. --- src/gui/settings_manager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/settings_manager.cpp b/src/gui/settings_manager.cpp index 0da1b5f40..a9544fdd8 100644 --- a/src/gui/settings_manager.cpp +++ b/src/gui/settings_manager.cpp @@ -94,7 +94,9 @@ int CSettingsManager::exec(CMenuTarget* parent, const std::string &actionKey) char msgtxt[1024]; snprintf(msgtxt, sizeof(msgtxt), g_Locale->getText(LOCALE_SETTINGS_BACKUP_DIR), g_settings.backup_dir.c_str()); - int result = ShowMsg(LOCALE_EXTRA_SAVECONFIG, msgtxt, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo); + int result = ShowMsg(LOCALE_EXTRA_SAVECONFIG, msgtxt, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo | CMsgBox::mbCancel); + if (result == CMsgBox::mbrCancel) + return res; if (result == CMsgBox::mbrNo) { fileBrowser.Dir_Mode = true; @@ -121,7 +123,9 @@ int CSettingsManager::exec(CMenuTarget* parent, const std::string &actionKey) char msgtxt[1024]; snprintf(msgtxt, sizeof(msgtxt), g_Locale->getText(LOCALE_SETTINGS_BACKUP_DIR), g_settings.backup_dir.c_str()); - int result = ShowMsg(LOCALE_SETTINGS_BACKUP, msgtxt, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo); + int result = ShowMsg(LOCALE_SETTINGS_BACKUP, msgtxt, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo | CMsgBox::mbCancel); + if (result == CMsgBox::mbrCancel) + return res; if (result == CMsgBox::mbrNo) { fileBrowser.Dir_Mode = true;