1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-30 01:55:30 +00:00

Mark option changed in "File extensions -> Add".

Previously, file extensions added or modified via the menu did not get
saved to elinks.conf when config.saving_style was 3 (the default).
This patch makes the file-extension dialog box call option_changed,
which then sets OPT_TOUCHED, so that the option appears modified in
the option manager and will be saved.

[ Reported by Witek; original patch by me; adapted to 0.11 by Witek;
  commit message by me.  --KON ]
This commit is contained in:
Witold Filipczyk 2008-03-04 06:53:06 +00:00 committed by Kalle Olavi Niemitalo
parent bc640bf7d1
commit af66d330c9

View File

@ -81,6 +81,7 @@ static void
add_mime_extension(void *data)
{
struct extension *ext = data;
struct option *option;
struct string name;
if (!ext || !init_string(&name)) return;
@ -90,6 +91,8 @@ add_mime_extension(void *data)
really_del_ext(ext->ext_orig); /* ..or rename ;) */
safe_strncpy(get_opt_str(name.source), ext->ct, MAX_STR_LEN);
option = get_opt_rec(config_options, name.source);
option_changed(NULL, option, option);
done_string(&name);
}