diff options
author | Frederic Culot <calcurse@culot.org> | 2007-07-21 19:30:55 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2007-07-21 19:30:55 +0000 |
commit | 9c24e12061ea5ba09b18def2da75a6dc01c7ab17 (patch) | |
tree | 10a20513d0a77a335eadca0dd3170dfd444b9488 | |
parent | 7b9ad07e9f69c0659bb6c7a38b3c54c55673c437 (diff) | |
download | calcurse-9c24e12061ea5ba09b18def2da75a6dc01c7ab17.tar.gz calcurse-9c24e12061ea5ba09b18def2da75a6dc01c7ab17.zip |
vars_init() added
-rwxr-xr-x | src/vars.c | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $calcurse: vars.c,v 1.2 2006/09/15 15:38:14 culot Exp $ */ +/* $calcurse: vars.c,v 1.3 2007/07/21 19:30:55 culot Exp $ */ /* * Calcurse - text-based organizer @@ -24,7 +24,11 @@ * */ +#include <stdlib.h> + #include "i18n.h" +#include "calendar.h" +#include "custom.h" #include "vars.h" /* @@ -86,3 +90,32 @@ struct pad_s *apad; /* Variable to store notify-bar settings. */ struct nbar_s *nbar; + + +/* + * Variables init + */ +void +vars_init(conf_t *conf) +{ + /* Variables for user configuration */ + conf->confirm_quit = true; + conf->confirm_delete = true; + conf->auto_save = true; + conf->skip_system_dialogs = false; + conf->skip_progress_bar = false; + conf->layout = 1; + + calendar_set_first_day_of_week(MONDAY); + + /* Pad structure to scroll text inside the appointment panel */ + apad = (struct pad_s *) malloc(sizeof(struct pad_s)); + apad->length = 1; + apad->first_onscreen = 0; + + /* Attribute definitions for color and non-color terminals */ + custom_init_attr(); + + /* Start at the current date */ + calendar_init_slctd_day(); +} |