summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2006-12-10 14:52:50 +0000
committerFrederic Culot <calcurse@culot.org>2006-12-10 14:52:50 +0000
commit0f7b7d0ec7fdd6eae3ba092d7b679c702f6c234d (patch)
treeba8c802117c2279541d7052f4d27aa31d61e5da7 /src
parent650ac9dfe7d74187264d512a44f9aa3927e6b312 (diff)
downloadcalcurse-0f7b7d0ec7fdd6eae3ba092d7b679c702f6c234d.tar.gz
calcurse-0f7b7d0ec7fdd6eae3ba092d7b679c702f6c234d.zip
get_date() updated so that it does not modify the selected day inside calendar
Diffstat (limited to 'src')
-rwxr-xr-xsrc/calcurse.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index 063eaef..bc741fb 100755
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -1,4 +1,4 @@
-/* $calcurse: calcurse.c,v 1.28 2006/12/08 08:41:41 culot Exp $ */
+/* $calcurse: calcurse.c,v 1.29 2006/12/10 14:52:50 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -566,6 +566,11 @@ void init_vars(int colr)
// Attribute definitions for color and non-color terminals
custom_init_attr(colr);
+
+ // Start at the current date
+ sel_year = year;
+ sel_month = month;
+ sel_day = day;
}
/* Notify-bar init */
@@ -702,9 +707,6 @@ void get_date(void)
month = atoi(current_month);
day = atoi(current_day);
year = atoi(current_year);
- sel_year = year;
- sel_month = month;
- sel_day = day;
}
/* Create all the windows */