Update the Settings save confirmation dialog

This commit is contained in:
David Hrdlička
2020-11-20 15:39:33 +01:00
parent 98b57e9a4b
commit ca11d7b776
5 changed files with 15 additions and 4 deletions

View File

@@ -1038,6 +1038,9 @@ BEGIN
IDS_2138 "Don't reset"
IDS_2139 "MO images (*.IM?;*.MDI)\0*.IM?;*.MDI\0All files (*.*)\0*.*\0"
IDS_2140 "CD-ROM images (*.ISO;*.CUE)\0*.ISO;*.CUE\0All files (*.*)\0*.*\0"
IDS_2141 "Save"
IDS_2142 "Don't save"
IDS_2143 "This will hard reset the virtual machine."
END
STRINGTABLE DISCARDABLE

View File

@@ -100,13 +100,14 @@ ui_msgbox_ex(int flags, void *header, void *message, void *btn1, void *btn2, voi
case MBX_QUESTION: /* question */
case MBX_QUESTION_YN:
case MBX_QUESTION_OK:
if (!btn1) /* replace default "OK" button with "Yes" button */
tdconfig.dwCommonButtons = TDCBF_YES_BUTTON;
tdconfig.dwCommonButtons = (flags & MBX_QUESTION_OK) ? TDCBF_OK_BUTTON : TDCBF_YES_BUTTON;
if (btn2) /* "No" button */
tdbuttons[tdconfig.cButtons++] = tdb_no;
else
tdconfig.dwCommonButtons |= TDCBF_NO_BUTTON;
tdconfig.dwCommonButtons |= (flags & MBX_QUESTION_OK) ? TDCBF_CANCEL_BUTTON : TDCBF_NO_BUTTON;
if (flags & MBX_QUESTION) {
if (btn3) /* "Cancel" button */

View File

@@ -531,7 +531,10 @@ settings_msgbox_reset(int button)
h = hwndMain;
hwndMain = hwndParentDialog;
i = ui_msgbox_ex(MBX_QUESTION | MBX_LINKS, (wchar_t *) (button ? IDS_2051 : IDS_2123), NULL, (wchar_t *) IDS_2121, (wchar_t *) IDS_2122, NULL);
if (button)
i = ui_msgbox_ex(MBX_QUESTION_OK | MBX_WARNING, (wchar_t *) IDS_2051, (wchar_t *) IDS_2142, (wchar_t *) IDS_2140, NULL, NULL);
else
i = ui_msgbox_ex(MBX_QUESTION | MBX_LINKS, (wchar_t *) IDS_2123, NULL, (wchar_t *) IDS_2121, (wchar_t *) IDS_2122, NULL);
hwndMain = h;