summaryrefslogtreecommitdiff
path: root/src/calendar.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2009-10-28 15:15:43 +0000
committerFrederic Culot <calcurse@culot.org>2009-10-28 15:15:43 +0000
commit758d5ff035d9c8d6eaa4cf17117d8c23675730a7 (patch)
tree9985d668f3f5492d6d2b71aa5927dd2cc73b590e /src/calendar.c
parentd678eb411a92b2cb6e26e1c9834d02c350800fbe (diff)
downloadcalcurse-758d5ff035d9c8d6eaa4cf17117d8c23675730a7.zip
Code to save the calendar default view in the configuration file.
Diffstat (limited to 'src/calendar.c')
-rwxr-xr-xsrc/calendar.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/calendar.c b/src/calendar.c
index 811d23c..84dd207 100755
--- a/src/calendar.c
+++ b/src/calendar.c
@@ -1,4 +1,4 @@
-/* $calcurse: calendar.c,v 1.29 2009/10/16 15:52:00 culot Exp $ */
+/* $calcurse: calendar.c,v 1.30 2009/10/28 15:15:43 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -101,6 +101,18 @@ calendar_view_prev (void)
calendar_view--;
}
+void
+calendar_set_view (int view)
+{
+ calendar_view = (view < 0 || view >= CAL_VIEWS) ? CAL_MONTH_VIEW : view;
+}
+
+int
+calendar_get_view (void)
+{
+ return (int)calendar_view;
+}
+
/* Thread needed to update current date in calendar. */
/* ARGSUSED0 */
static void *