From bcdea3f01e0b614a0e366ee19c0ff6810e43b32d Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 23 Jun 2010 20:42:03 +0200 Subject: Bug #611165 - Use memo start date from a calendar view, if active --- modules/calendar/e-cal-shell-view-memopad.c | 3 ++- modules/calendar/e-memo-shell-backend.c | 6 ++++-- modules/calendar/e-memo-shell-view-actions.c | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/calendar/e-cal-shell-view-memopad.c b/modules/calendar/e-cal-shell-view-memopad.c index 61ef73d1a4..267f8145f6 100644 --- a/modules/calendar/e-cal-shell-view-memopad.c +++ b/modules/calendar/e-cal-shell-view-memopad.c @@ -80,8 +80,9 @@ action_calendar_memopad_new_cb (GtkAction *action, g_slist_free (list); client = comp_data->client; - editor = memo_editor_new (client, shell, COMP_EDITOR_NEW_ITEM); comp = cal_comp_memo_new_with_defaults (client); + cal_comp_update_time_by_active_window (comp, shell); + editor = memo_editor_new (client, shell, COMP_EDITOR_NEW_ITEM); comp_editor_edit_comp (editor, comp); gtk_window_present (GTK_WINDOW (editor)); diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c index a51a5fc98e..2a0c277fc5 100644 --- a/modules/calendar/e-memo-shell-backend.c +++ b/modules/calendar/e-memo-shell-backend.c @@ -210,8 +210,9 @@ memo_shell_backend_memo_new_cb (ECal *cal, flags |= COMP_EDITOR_NEW_ITEM; - editor = memo_editor_new (cal, shell, flags); comp = cal_comp_memo_new_with_defaults (cal); + cal_comp_update_time_by_active_window (comp, shell); + editor = memo_editor_new (cal, shell, flags); comp_editor_edit_comp (editor, comp); gtk_window_present (GTK_WINDOW (editor)); @@ -237,8 +238,9 @@ memo_shell_backend_memo_shared_new_cb (ECal *cal, flags |= COMP_EDITOR_IS_SHARED; flags |= COMP_EDITOR_USER_ORG; - editor = memo_editor_new (cal, shell, flags); comp = cal_comp_memo_new_with_defaults (cal); + cal_comp_update_time_by_active_window (comp, shell); + editor = memo_editor_new (cal, shell, flags); comp_editor_edit_comp (editor, comp); gtk_window_present (GTK_WINDOW (editor)); diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index 69bf9c5e8e..c915da2a24 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -362,8 +362,9 @@ action_memo_new_cb (GtkAction *action, g_return_if_fail (client != NULL); - editor = memo_editor_new (client, shell, COMP_EDITOR_NEW_ITEM); comp = cal_comp_memo_new_with_defaults (client); + cal_comp_update_time_by_active_window (comp, shell); + editor = memo_editor_new (client, shell, COMP_EDITOR_NEW_ITEM); comp_editor_edit_comp (editor, comp); gtk_window_present (GTK_WINDOW (editor)); -- cgit v1.2.3