Save modified Macros

Added test to save modified macros before opening a new file
pull/2/head
David Freese 2008-12-20 13:51:40 -06:00
rodzic 75b3a5afe4
commit 37022f7d34
1 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -519,7 +519,19 @@ void startup_modem(modem *m)
} }
void cb_mnuOpenMacro(Fl_Menu_*, void*) { void cb_mnuOpenMacro(Fl_Menu_*, void*) {
if (macros.changed) {
switch (fl_choice(_("Save changed macros?"), _("Cancel"), _("Save"), _("Don't save"))) {
case 0:
return;
case 1:
macros.saveMacroFile();
// fall through
case 2:
break;
}
}
macros.openMacroFile(); macros.openMacroFile();
macros.changed = false;
restoreFocus(); restoreFocus();
} }