#199 #215 Cleanup: "Confirm Reset" to "Confirm reboot"

This commit is contained in:
michaelangel007 2014-07-27 14:31:00 -07:00
parent 9140d5bca0
commit 50ed260710
8 changed files with 22 additions and 19 deletions

View File

@ -31,7 +31,7 @@ Changes:
(current memory address low byte)
-memclear 7 Initialize memory to page address
(current memory address high byte)
. [Feature #199] Added option to skip reset confirmation for reset to configuration.
. [Feature #199] Added the option to skip the reboot confirmation in the configuration.
. [Feature #201] Added display of current Track/Sector for the floppy drives.
- In 2x window mode the status is displayed below the drive LEDs.
- In full screen mode the status is displayed above the drive LEDS. The track/sector

View File

@ -90,7 +90,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "&Model:",IDC_STATIC,5,7,40,8
COMBOBOX IDC_COMPUTER,45,5,95,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "&Confirm Reset",IDC_CHECK_CONFIRM_RESET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,8,62,10
CONTROL "&Confirm reboot",IDC_CHECK_CONFIRM_REBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,148,8,62,10
GROUPBOX "Video",IDC_STATIC,5,22,200,43
LTEXT "Mo&de:",IDC_STATIC,12,33,33,8
COMBOBOX IDC_VIDEOTYPE,45,30,95,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP

View File

@ -46,7 +46,7 @@
#define IDR_MENU_DISK_POPUP 143
#define IDR_MENU_DISK_CFG_POPUP 144
#define IDD_ABOUT 145
#define IDC_CHECK_CONFIRM_RESET 146
#define IDC_CHECK_CONFIRM_REBOOT 146
#define IDC_KEYB_BUFFER_ENABLE 1005
#define IDC_SAVESTATE 1006
#define IDC_SAVESTATE_ON_EXIT 1007

View File

@ -595,8 +595,8 @@ void LoadConfiguration(void)
if (REGLOAD(TEXT(REGVALUE_WINDOW_SCALE), &dwTmp))
SetViewportScale(dwTmp);
if (REGLOAD(TEXT(REGVALUE_CONFIRM_RESET), &dwTmp))
g_bConfirmReset = dwTmp;
if (REGLOAD(TEXT(REGVALUE_CONFIRM_REBOOT), &dwTmp))
g_bConfirmReboot = dwTmp;
}
//===========================================================================

View File

@ -73,8 +73,8 @@ enum AppMode_e
// Configuration
#define REG_CONFIG "Configuration"
#define REGVALUE_APPLE2_TYPE "Apple2 Type"
#define REGVALUE_OLD_APPLE2_TYPE "Computer Emulation" // Deprecated
#define REGVALUE_CONFIRM_RESET "Confirm Reset" // Added at 1.24.1 PageConfig
#define REGVALUE_OLD_APPLE2_TYPE "Computer Emulation" // Deprecated
#define REGVALUE_CONFIRM_REBOOT "Confirm Reboot" // Added at 1.24.1 PageConfig
#define REGVALUE_SPKR_VOLUME "Speaker Volume"
#define REGVALUE_MB_VOLUME "Mockingboard Volume"
#define REGVALUE_SAVESTATE_FILENAME "Save State Filename"

View File

@ -88,8 +88,8 @@ BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
VideoChooseColor();
break;
case IDC_CHECK_CONFIRM_RESET:
g_bConfirmReset = IsDlgButtonChecked(hWnd, IDC_CHECK_CONFIRM_RESET) ? 1 : 0;
case IDC_CHECK_CONFIRM_REBOOT:
g_bConfirmReboot = IsDlgButtonChecked(hWnd, IDC_CHECK_CONFIRM_REBOOT) ? 1 : 0;
case IDC_CHECK_HALF_SCAN_LINES:
g_uHalfScanLines = IsDlgButtonChecked(hWnd, IDC_CHECK_HALF_SCAN_LINES) ? 1 : 0;
@ -143,7 +143,7 @@ BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
m_PropertySheetHelper.FillComboBox(hWnd, IDC_COMPUTER, m_ComputerChoices, nCurrentChoice);
}
CheckDlgButton(hWnd, IDC_CHECK_CONFIRM_RESET, g_bConfirmReset ? BST_CHECKED : BST_UNCHECKED );
CheckDlgButton(hWnd, IDC_CHECK_CONFIRM_REBOOT, g_bConfirmReboot ? BST_CHECKED : BST_UNCHECKED );
m_PropertySheetHelper.FillComboBox(hWnd,IDC_VIDEOTYPE,g_aVideoChoices,g_eVideoType);
CheckDlgButton(hWnd, IDC_CHECK_HALF_SCAN_LINES, g_uHalfScanLines ? BST_CHECKED : BST_UNCHECKED);
@ -212,7 +212,7 @@ void CPageConfig::DlgOK(HWND hWnd)
}
}
REGSAVE(TEXT(REGVALUE_CONFIRM_RESET), g_bConfirmReset);
REGSAVE(TEXT(REGVALUE_CONFIRM_REBOOT), g_bConfirmReboot);
const DWORD newserialport = (DWORD) SendDlgItemMessage(hWnd, IDC_SERIALPORT, CB_GETCURSEL, 0, 0);
sg_SSC.CommSetSerialPort(hWnd, newserialport);

View File

@ -109,10 +109,10 @@ static HRGN clipregion = (HRGN)0;
static HDC g_hFrameDC = (HDC)0;
static RECT framerect = {0,0,0,0};
HWND g_hFrameWindow = (HWND)0;
BOOL g_bIsFullScreen = 0;
BOOL g_bConfirmReset = 1; // saved PageConfig REGSAVE
BOOL g_bMultiMon = 0; // OFF = load window position & clamp initial frame to screen, ON = use window position as is
HWND g_hFrameWindow = (HWND)0;
BOOL g_bIsFullScreen = 0;
BOOL g_bConfirmReboot = 1; // saved PageConfig REGSAVE
BOOL g_bMultiMon = 0; // OFF = load window position & clamp initial frame to screen, ON = use window position as is
static BOOL helpquit = 0;
static BOOL g_bPaintingWindow = 0;
@ -1682,15 +1682,18 @@ static void ScreenWindowResize(const bool bCtrlKey)
static bool ConfirmReboot(bool bFromButtonUI)
{
if (!bFromButtonUI || !g_bConfirmReset)
if (!bFromButtonUI || !g_bConfirmReboot)
return true;
int res = MessageBox(g_hFrameWindow,
"Are you sure you want to reboot?\n"
"(All data will be lost!)\n"
"\n"
"You can skip this dialog from displaying by unchecking:\n"
" [ ] Confirm reset\n"
"You can skip this dialog from displaying\n"
"in the future by unchecking:\n"
"\n"
" [ ] Confirm reboot\n"
"\n"
"in the Configuration dialog.\n"
, "Reboot", MB_ICONWARNING|MB_YESNO);
return res == IDYES;

View File

@ -23,7 +23,7 @@
// Win32
extern HWND g_hFrameWindow;
extern BOOL g_bIsFullScreen;
extern BOOL g_bConfirmReset; // saved PageConfig REGSAVE
extern BOOL g_bConfirmReboot; // saved PageConfig REGSAVE
extern BOOL g_bMultiMon;
// Emulator