diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-07-31 18:17:20 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-07-31 18:17:20 +0800 |
commit | 3f74605b7a7db922972a7fbfee179888daafa061 (patch) | |
tree | 9fb943ef9e2f8d915365ad9bc504c5a960b302d8 /calendar/gui/dialogs | |
parent | 322b2c1d303d41d1914dfa8f1eb3d682be76690f (diff) | |
download | gsoc2013-evolution-3f74605b7a7db922972a7fbfee179888daafa061.tar.gz gsoc2013-evolution-3f74605b7a7db922972a7fbfee179888daafa061.tar.zst gsoc2013-evolution-3f74605b7a7db922972a7fbfee179888daafa061.zip |
Fixes #335276.
svn path=/trunk/; revision=32450
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 15 | ||||
-rw-r--r-- | calendar/gui/dialogs/schedule-page.c | 24 | ||||
-rw-r--r-- | calendar/gui/dialogs/schedule-page.h | 2 |
3 files changed, 36 insertions, 5 deletions
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index b1756b6d31..389834180f 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -650,6 +650,7 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) EventEditorPrivate *priv; ECalComponentOrganizer organizer; gboolean delegate; + ECalComponentDateTime dtstart, dtend; ECal *client; GSList *attendees = NULL; @@ -658,7 +659,17 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) priv->updating = TRUE; delegate = (comp_editor_get_flags (COMP_EDITOR (editor)) & COMP_EDITOR_DELEGATE); - + + if (priv->sched_page) { + e_cal_component_get_dtstart (comp, &dtstart); + e_cal_component_get_dtend (comp, &dtend); + + schedule_page_set_meeting_time (priv->sched_page, dtstart.value, dtend.value); + + e_cal_component_free_datetime (&dtstart); + e_cal_component_free_datetime (&dtend); + } + if (COMP_EDITOR_CLASS (event_editor_parent_class)->edit_comp) COMP_EDITOR_CLASS (event_editor_parent_class)->edit_comp (editor, comp); @@ -667,7 +678,7 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) /* Get meeting related stuff */ e_cal_component_get_organizer (comp, &organizer); e_cal_component_get_attendee_list (comp, &attendees); - + /* Set up the attendees */ if (attendees != NULL) { GSList *l; diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index 4eaa235278..7a8afc6cfa 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -256,8 +256,6 @@ update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalCompone } } - e_meeting_time_selector_set_all_day (priv->sel, all_day); - e_date_edit_set_date (E_DATE_EDIT (priv->sel->start_date_edit), start_tt.year, start_tt.month, start_tt.day); e_date_edit_set_time_of_day (E_DATE_EDIT (priv->sel->start_date_edit), @@ -386,6 +384,28 @@ init_widgets (SchedulePage *spage) } +void +schedule_page_set_meeting_time (SchedulePage *spage, icaltimetype *start_tt, icaltimetype *end_tt) +{ + SchedulePagePrivate *priv; + gboolean all_day; + + priv = spage->priv; + + all_day = (start_tt->is_date && end_tt->is_date) ? TRUE : FALSE; + + if (all_day) { + if (icaltime_compare_date_only (*end_tt, *start_tt) > 0) { + icaltime_adjust (end_tt, -1, 0, 0, 0); + } + } + + e_meeting_time_selector_set_meeting_time (priv->sel, start_tt->year, start_tt->month, start_tt->day, + start_tt->hour, start_tt->minute, end_tt->year, end_tt->month, end_tt->day, end_tt->hour, + end_tt->minute); + e_meeting_time_selector_set_all_day (priv->sel, all_day); + +} /** * schedule_page_construct: diff --git a/calendar/gui/dialogs/schedule-page.h b/calendar/gui/dialogs/schedule-page.h index a5150d638f..8f0496c8b4 100644 --- a/calendar/gui/dialogs/schedule-page.h +++ b/calendar/gui/dialogs/schedule-page.h @@ -53,7 +53,7 @@ GtkType schedule_page_get_type (void); SchedulePage *schedule_page_construct (SchedulePage *mpage, EMeetingStore *ems); SchedulePage *schedule_page_new (EMeetingStore *ems); void schedule_page_set_name_selector (SchedulePage *spage, ENameSelector *name_selector); - +void schedule_page_set_meeting_time (SchedulePage *spage, icaltimetype *start_tt, icaltimetype *end_tt); G_END_DECLS |