1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00: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.

[ From commit 7185e926e6 in ELinks
  0.12.GIT.  This I think does not deserve a NEWS entry.  --KON ]
This commit is contained in:
Kalle Olavi Niemitalo 2007-01-28 16:14:10 +02:00 committed by Kalle Olavi Niemitalo
parent 74799c60b2
commit 7e8020a36f

View File

@ -32,10 +32,10 @@
static void
toggle_success_msgbox(void *dummy)
disable_success_msgbox(void *dummy)
{
/* TODO: option_changed() */
get_opt_bool("ui.success_msgbox") = !get_opt_bool("ui.success_msgbox");
get_opt_bool("ui.success_msgbox") = 0;
get_opt_rec(config_options, "ui.success_msgbox")->flags |= OPT_TOUCHED;
}
@ -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;
}