Fixed bug in XTA driver.

Fixed string-loading issue.
Fixes for handling file dialog, filters, etc.
Changed the return value of dlg_file so we can use its RO flag.
Removed the additional _WP statusbar menu items (no longer needed with new RO handling.)
This commit is contained in:
waltje
2018-05-11 21:31:30 -04:00
parent ef2772b629
commit d393e95f8f
12 changed files with 114 additions and 95 deletions

View File

@@ -11,7 +11,7 @@
* This code is called by the UI frontend modules, and, also,
* depends on those same modules for lower-level functions.
*
* Version: @(#)ui_main.c 1.0.14 2018/05/09
* Version: @(#)ui_main.c 1.0.15 2018/05/11
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -497,17 +497,18 @@ ui_menu_command(int idm)
/* FIXME: need to fix these.. */
case IDM_LOAD: /* TOOLS menu */
plat_pause(1);
if (! dlg_file(get_string(IDS_2160), NULL, temp, 0) &&
(ui_msgbox(MBX_QUESTION, (wchar_t *)IDS_2051) == 0)) {
i = dlg_file(get_string(IDS_2160), NULL, temp, DLG_FILE_LOAD);
if (i && (ui_msgbox(MBX_QUESTION, (wchar_t *)IDS_2051) == 0)) {
pc_reload(temp);
ui_menu_reset_all();
config_ro = !!(i & DLG_FILE_RO);
}
plat_pause(0);
break;
case IDM_SAVE: /* TOOLS menu */
plat_pause(1);
if (! dlg_file(get_string(IDS_2160), NULL, temp, 1)) {
if (dlg_file(get_string(IDS_2160), NULL, temp, DLG_FILE_SAVE)) {
config_write(temp);
}
plat_pause(0);