mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 18:16:22 +00:00
Dont allow unsaved form windows to be closed
This commit is contained in:
@@ -2490,6 +2490,17 @@ cmd_close(gchar **args, struct cmd_help_t help)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// check for unsaved form
|
||||
if (ui_win_has_unsaved_form(index)) {
|
||||
ProfWin *window = wins_get_current();
|
||||
if (wins_is_current(window)) {
|
||||
ui_current_print_line("You have unsaved changes, use /form submit or /form cancel");
|
||||
} else {
|
||||
cons_show("Cannot close form window with unsaved changes, use /form submit or /form cancel");
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// handle leaving rooms, or chat
|
||||
if (conn_status == JABBER_CONNECTED) {
|
||||
ui_close_connected_win(index);
|
||||
|
||||
Reference in New Issue
Block a user