1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

"Do not show anymore" resets ui.success_msgbox, instead of toggling it.

Normally, the success msgbox is shown only if the ui.success_msgbox
option is set as 1, and clicking "Do not show anymore" would then
toggle the option to 0, and no more such msgboxes would appear.
However, if there already are two success msgboxes being displayed
(most likely in different terminals), then clicking "Do not show
anymore" in the first of them would reset the option to 0, but doing
the same in the second of them would toggle the option back to 1.

Rename toggle_success_msgbox to disable_success_msgbox, and make it
always reset the option to 0, regardless of the previous value.
This commit is contained in:
Kalle Olavi Niemitalo 2007-01-28 16:14:10 +02:00 committed by Kalle Olavi Niemitalo
parent 5b6dbcc879
commit 7185e926e6

View File

@ -32,9 +32,9 @@
static void
toggle_success_msgbox(void *dummy)
disable_success_msgbox(void *dummy)
{
get_opt_bool("ui.success_msgbox") = !get_opt_bool("ui.success_msgbox");
get_opt_bool("ui.success_msgbox") = 0;
option_changed(NULL, get_opt_rec(config_options, "ui.success_msgbox"));
}
@ -55,7 +55,7 @@ write_config_dialog(struct terminal *term, unsigned char *config_file,
config_file),
NULL, 2,
N_("~OK"), NULL, B_ENTER | B_ESC,
N_("~Do not show anymore"), toggle_success_msgbox, 0);
N_("~Do not show anymore"), disable_success_msgbox, 0);
return;
}