Remove the configuraton variable conf.progress_bar
When loading/saving the configuration file the entry is silently ignored (which means it is removed by the first save). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
parent
4b192c0773
commit
c95dd0e685
@ -268,7 +268,6 @@ struct conf {
|
|||||||
enum win default_panel;
|
enum win default_panel;
|
||||||
unsigned compact_panels;
|
unsigned compact_panels;
|
||||||
unsigned system_dialogs;
|
unsigned system_dialogs;
|
||||||
unsigned progress_bar;
|
|
||||||
const char *editor;
|
const char *editor;
|
||||||
const char *pager;
|
const char *pager;
|
||||||
const char *mergetool;
|
const char *mergetool;
|
||||||
|
@ -112,7 +112,6 @@ static const struct confvar confmap[] = {
|
|||||||
{"general.confirmquit", CONFIG_HANDLER_BOOL(conf.confirm_quit)},
|
{"general.confirmquit", CONFIG_HANDLER_BOOL(conf.confirm_quit)},
|
||||||
{"general.firstdayofweek", config_parse_first_day_of_week, config_serialize_first_day_of_week, NULL},
|
{"general.firstdayofweek", config_parse_first_day_of_week, config_serialize_first_day_of_week, NULL},
|
||||||
{"general.periodicsave", CONFIG_HANDLER_UNSIGNED(conf.periodic_save)},
|
{"general.periodicsave", CONFIG_HANDLER_UNSIGNED(conf.periodic_save)},
|
||||||
{"general.progressbar", CONFIG_HANDLER_BOOL(conf.progress_bar)},
|
|
||||||
{"general.systemdialogs", CONFIG_HANDLER_BOOL(conf.system_dialogs)},
|
{"general.systemdialogs", CONFIG_HANDLER_BOOL(conf.system_dialogs)},
|
||||||
{"notification.command", CONFIG_HANDLER_STR(nbar.cmd)},
|
{"notification.command", CONFIG_HANDLER_STR(nbar.cmd)},
|
||||||
{"notification.notifyall", config_parse_notifyall, config_serialize_notifyall, NULL},
|
{"notification.notifyall", config_parse_notifyall, config_serialize_notifyall, NULL},
|
||||||
@ -601,6 +600,12 @@ config_file_walk(config_fn_walk_cb_t fn_cb,
|
|||||||
WARN_MSG(_("Pre-3.0.0 configuration file format detected, "
|
WARN_MSG(_("Pre-3.0.0 configuration file format detected, "
|
||||||
"please upgrade running `calcurse-upgrade`."));
|
"please upgrade running `calcurse-upgrade`."));
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Backwards compatibility for removed configuration options:
|
||||||
|
* ignored on load, omitted on save.
|
||||||
|
*/
|
||||||
|
if (strcmp(key, "general.progressbar") == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (value && (*value == '\0' || *value == '\n')) {
|
if (value && (*value == '\0' || *value == '\n')) {
|
||||||
/* Backward compatibility mode. */
|
/* Backward compatibility mode. */
|
||||||
|
12
src/custom.c
12
src/custom.c
@ -532,7 +532,6 @@ enum {
|
|||||||
CONFIRM_QUIT,
|
CONFIRM_QUIT,
|
||||||
CONFIRM_DELETE,
|
CONFIRM_DELETE,
|
||||||
SYSTEM_DIAGS,
|
SYSTEM_DIAGS,
|
||||||
PROGRESS_BAR,
|
|
||||||
FIRST_DAY_OF_WEEK,
|
FIRST_DAY_OF_WEEK,
|
||||||
OUTPUT_DATE_FMT,
|
OUTPUT_DATE_FMT,
|
||||||
INPUT_DATE_FMT,
|
INPUT_DATE_FMT,
|
||||||
@ -554,7 +553,6 @@ static void print_general_option(int i, WINDOW *win, int y, int hilt, void *cb_d
|
|||||||
"general.confirmquit = ",
|
"general.confirmquit = ",
|
||||||
"general.confirmdelete = ",
|
"general.confirmdelete = ",
|
||||||
"general.systemdialogs = ",
|
"general.systemdialogs = ",
|
||||||
"general.progressbar = ",
|
|
||||||
"general.firstdayofweek = ",
|
"general.firstdayofweek = ",
|
||||||
"format.outputdate = ",
|
"format.outputdate = ",
|
||||||
"format.inputdate = ",
|
"format.inputdate = ",
|
||||||
@ -629,13 +627,6 @@ static void print_general_option(int i, WINDOW *win, int y, int hilt, void *cb_d
|
|||||||
_("(if set to YES, messages about loaded "
|
_("(if set to YES, messages about loaded "
|
||||||
"and saved data will be displayed)"));
|
"and saved data will be displayed)"));
|
||||||
break;
|
break;
|
||||||
case PROGRESS_BAR:
|
|
||||||
print_bool_option_incolor(win, conf.progress_bar, y,
|
|
||||||
XPOS + strlen(opt[PROGRESS_BAR]));
|
|
||||||
mvwaddstr(win, y + 1, XPOS,
|
|
||||||
_("(if set to YES, progress bar will be displayed "
|
|
||||||
"when saving data)"));
|
|
||||||
break;
|
|
||||||
case FIRST_DAY_OF_WEEK:
|
case FIRST_DAY_OF_WEEK:
|
||||||
custom_apply_attr(win, ATTR_HIGHEST);
|
custom_apply_attr(win, ATTR_HIGHEST);
|
||||||
mvwaddstr(win, y, XPOS + strlen(opt[FIRST_DAY_OF_WEEK]),
|
mvwaddstr(win, y, XPOS + strlen(opt[FIRST_DAY_OF_WEEK]),
|
||||||
@ -761,9 +752,6 @@ static void general_option_edit(int i)
|
|||||||
case SYSTEM_DIAGS:
|
case SYSTEM_DIAGS:
|
||||||
conf.system_dialogs = !conf.system_dialogs;
|
conf.system_dialogs = !conf.system_dialogs;
|
||||||
break;
|
break;
|
||||||
case PROGRESS_BAR:
|
|
||||||
conf.progress_bar = !conf.progress_bar;
|
|
||||||
break;
|
|
||||||
case FIRST_DAY_OF_WEEK:
|
case FIRST_DAY_OF_WEEK:
|
||||||
ui_calendar_change_first_day_of_week();
|
ui_calendar_change_first_day_of_week();
|
||||||
break;
|
break;
|
||||||
|
@ -127,7 +127,6 @@ void vars_init(void)
|
|||||||
conf.default_panel = CAL;
|
conf.default_panel = CAL;
|
||||||
conf.compact_panels = 0;
|
conf.compact_panels = 0;
|
||||||
conf.system_dialogs = 1;
|
conf.system_dialogs = 1;
|
||||||
conf.progress_bar = 1;
|
|
||||||
strncpy(conf.output_datefmt, "%D", 3);
|
strncpy(conf.output_datefmt, "%D", 3);
|
||||||
conf.input_datefmt = 1;
|
conf.input_datefmt = 1;
|
||||||
conf.heading_pos = RIGHT;
|
conf.heading_pos = RIGHT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user