From 9c24e12061ea5ba09b18def2da75a6dc01c7ab17 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sat, 21 Jul 2007 19:30:55 +0000 Subject: vars_init() added --- src/vars.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/vars.c b/src/vars.c index 90892ea..4616dda 100755 --- a/src/vars.c +++ b/src/vars.c @@ -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 + #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(); +} -- cgit v1.2.3-70-g09d2