[evolution] Bug #605192 - New memo window has start date as None



commit 455353a19d881f650bfb72f985d9946f92c9ff7a
Author: Milan Crha <mcrha redhat com>
Date:   Tue Dec 22 20:32:28 2009 +0100

    Bug #605192 - New memo window has start date as None

 modules/calendar/e-cal-shell-content.c |   16 ++++++++++++++++
 widgets/misc/e-dateedit.c              |    2 +-
 2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 3f56f01..c3112cf 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),
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 268931a..03af596 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -434,7 +434,7 @@ date_edit_class_init (EDateEditClass *class)
 			"set-none",
 			"Sets None as selected date",
 			NULL,
-			TRUE,
+			FALSE,
 			G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
 
 	signals[CHANGED] = g_signal_new (



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]