From 7961048944d446f523a9ed12c811d7c2e8a47e97 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 30 Apr 2009 20:51:39 +0200 Subject: Bug #273818 - Allow scrolling Month View by a week only Edit->Preferences->Calendar and Tasks, tab Display, option Scroll Month View by a week. --- calendar/gui/calendar-config.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'calendar/gui/calendar-config.c') diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 65864ea272..8af8230efd 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -587,6 +587,35 @@ calendar_config_add_notification_time_divisions (GConfClientNotifyFunc func, gpo return id; } +/* Scroll in a month view by a week, not by a month */ +gboolean +calendar_config_get_month_scroll_by_week (void) +{ + calendar_config_init (); + + return gconf_client_get_bool (config, CALENDAR_CONFIG_MONTH_SCROLL_BY_WEEK, NULL); +} + +void +calendar_config_set_month_scroll_by_week (gboolean value) +{ + calendar_config_init (); + + gconf_client_set_bool (config, CALENDAR_CONFIG_MONTH_SCROLL_BY_WEEK, value, NULL); +} + +guint +calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc func, gpointer data) +{ + guint id; + + calendar_config_init (); + + id = gconf_client_notify_add (config, CALENDAR_CONFIG_MONTH_SCROLL_BY_WEEK, func, data, NULL, NULL); + + return id; +} + /* Whether we show the Marcus Bains Line (current time), and in what colors. */ void calendar_config_get_marcus_bains (gboolean *show_line, const char **dayview_color, const char **timebar_color) -- cgit