1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

option_changed: Merge the 2nd and 3rd parameter.

All callers were passing the same value for both.
This commit is contained in:
Kalle Olavi Niemitalo 2007-01-27 19:52:49 +02:00 committed by Kalle Olavi Niemitalo
parent 7bfd9703d9
commit 2e5488ba3d
5 changed files with 7 additions and 10 deletions

View File

@ -275,9 +275,7 @@ check_valid_option(struct dialog_data *dlg_data, struct widget_data *widget_data
if (chinon) {
if (option_types[option->type].set &&
option_types[option->type].set(option, chinon)) {
struct option *current = option;
option_changed(ses, current, option);
option_changed(ses, option);
commandline = 0;
mem_free(chinon);

View File

@ -956,7 +956,7 @@ toggle_option(struct session *ses, struct option *option)
assert(option->max);
option->value.number = (number <= option->max) ? number : option->min;
option_changed(ses, option, option);
option_changed(ses, option);
}
static int
@ -1011,11 +1011,11 @@ call_change_hooks(struct session *ses, struct option *current, struct option *op
}
void
option_changed(struct session *ses, struct option *current, struct option *option)
option_changed(struct session *ses, struct option *option)
{
option->flags |= OPT_TOUCHED;
/* Notify everyone out there! */
call_change_hooks(ses, current, option);
call_change_hooks(ses, option, option);
}
int

View File

@ -180,8 +180,7 @@ void call_change_hooks(struct session *ses, struct option *current,
/* Do proper bookkeeping after an option has changed - call this every time
* you change an option value. */
void option_changed(struct session *ses, struct option *current,
struct option *option);
void option_changed(struct session *ses, struct option *option);
extern int commit_option_values(struct option_resolver *resolvers,
struct option *root,

View File

@ -775,7 +775,7 @@ setup_first_session(struct session *ses, struct uri *uri)
if (!get_opt_bool("config.saving_style_w")) {
struct option *opt = get_opt_rec(config_options, "config.saving_style_w");
opt->value.number = 1;
option_changed(ses, opt, opt);
option_changed(ses, opt);
if (get_opt_int("config.saving_style") != 3) {
info_box(term, 0,
N_("Warning"), ALIGN_CENTER,

View File

@ -1400,7 +1400,7 @@ text_typeahead_handler(struct input_line *line, int action_id)
opt->value.number = (opt->value.number + 1)
% (opt->max + 1);
option_changed(ses, opt, opt);
option_changed(ses, opt);
}
/* Fall thru */