summaryrefslogtreecommitdiff
path: root/src/vars.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2007-12-30 16:27:58 +0000
committerFrederic Culot <calcurse@culot.org>2007-12-30 16:27:58 +0000
commit478b2762e61cee2aa2b073e37cfcdaf220692acf (patch)
treeda7092314c4ad526975642d2e82c22fcf50274c9 /src/vars.c
parent41e7eb0a83f9a6a921ddd54ed89740eaba595354 (diff)
downloadcalcurse-478b2762e61cee2aa2b073e37cfcdaf220692acf.zip
Ability to attach notes to todo items added
Diffstat (limited to 'src/vars.c')
-rwxr-xr-xsrc/vars.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/vars.c b/src/vars.c
index fbbb666..6dab20b 100755
--- a/src/vars.c
+++ b/src/vars.c
@@ -1,4 +1,4 @@
-/* $calcurse: vars.c,v 1.5 2007/10/21 13:40:13 culot Exp $ */
+/* $calcurse: vars.c,v 1.6 2007/12/30 16:27:59 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -76,6 +76,7 @@ char path_dir[] = "";
char path_todo[] = "";
char path_apts[] = "";
char path_conf[] = "";
+char path_notes[] = "";
/* Variable to handle pads. */
struct pad_s *apad;
@@ -90,12 +91,30 @@ struct nbar_s *nbar;
void
vars_init(conf_t *conf)
{
+ char *PATH_VI = "/usr/bin/vi";
+ char *PATH_LESS = "/usr/bin/less";
+ char *ed, *pg;
+
/* 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;
+
+ /* Default external editor and pager */
+ ed = getenv("VISUAL");
+ if (ed == NULL || ed[0] == '\0')
+ ed = getenv("EDITOR");
+ if (ed == NULL || ed[0] == '\0')
+ ed = PATH_VI;
+ conf->editor = ed;
+
+ pg = getenv("PAGER");
+ if (pg == NULL || pg[0] == '\0')
+ pg = PATH_LESS;
+ conf->pager = pg;
+
wins_set_layout(1);
calendar_set_first_day_of_week(MONDAY);