aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-content.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-12-23 03:32:28 +0800
committerMilan Crha <mcrha@redhat.com>2009-12-23 03:32:28 +0800
commit455353a19d881f650bfb72f985d9946f92c9ff7a (patch)
tree0cc8b9e1027301e03a69747a0cffe3babd8e13e5 /modules/calendar/e-cal-shell-content.c
parent1cbedea49d693f4028061edab4fd4fb3d500f382 (diff)
downloadgsoc2013-evolution-455353a19d881f650bfb72f985d9946f92c9ff7a.tar.gz
gsoc2013-evolution-455353a19d881f650bfb72f985d9946f92c9ff7a.tar.zst
gsoc2013-evolution-455353a19d881f650bfb72f985d9946f92c9ff7a.zip
Bug #605192 - New memo window has start date as None
Diffstat (limited to 'modules/calendar/e-cal-shell-content.c')
-rw-r--r--modules/calendar/e-cal-shell-content.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 3f56f01c61..c3112cf42c 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -311,6 +311,20 @@ cal_shell_content_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
+static time_t
+gc_get_default_time (ECalModel *model, gpointer user_data)
+{
+ GnomeCalendar *gcal = user_data;
+ time_t res = 0, end;
+
+ g_return_val_if_fail (model != NULL, 0);
+ g_return_val_if_fail (GNOME_IS_CALENDAR (user_data), 0);
+
+ gnome_calendar_get_current_time_range (gcal, &res, &end);
+
+ return res;
+}
+
static void
cal_shell_content_constructed (GObject *object)
{
@@ -492,6 +506,8 @@ cal_shell_content_constructed (GObject *object)
e_table_load_state (E_TABLE (widget), filename);
g_free (filename);
+ e_cal_model_set_default_time_func (e_memo_table_get_model (E_MEMO_TABLE (widget)), gc_get_default_time, calendar);
+
g_signal_connect_swapped (
widget, "open-component",
G_CALLBACK (e_cal_shell_view_memopad_open_memo),