aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2006-07-31 18:17:20 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2006-07-31 18:17:20 +0800
commit3f74605b7a7db922972a7fbfee179888daafa061 (patch)
tree9fb943ef9e2f8d915365ad9bc504c5a960b302d8 /calendar
parent322b2c1d303d41d1914dfa8f1eb3d682be76690f (diff)
downloadgsoc2013-evolution-3f74605b7a7db922972a7fbfee179888daafa061.tar
gsoc2013-evolution-3f74605b7a7db922972a7fbfee179888daafa061.tar.gz
gsoc2013-evolution-3f74605b7a7db922972a7fbfee179888daafa061.tar.bz2
gsoc2013-evolution-3f74605b7a7db922972a7fbfee179888daafa061.tar.lz
gsoc2013-evolution-3f74605b7a7db922972a7fbfee179888daafa061.tar.xz
gsoc2013-evolution-3f74605b7a7db922972a7fbfee179888daafa061.tar.zst
gsoc2013-evolution-3f74605b7a7db922972a7fbfee179888daafa061.zip
Fixes #335276.
svn path=/trunk/; revision=32450
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/dialogs/event-editor.c15
-rw-r--r--calendar/gui/dialogs/schedule-page.c24
-rw-r--r--calendar/gui/dialogs/schedule-page.h2
4 files changed, 45 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 656abd73e5..e894c375a3 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,14 @@
2006-07-31 Chenthill Palanisamy <pchenthill@novell.com>
+ Fixes #335276
+ * gui/dialogs/event-editor.c: (event_editor_edit_comp):
+ Set the meeting time in the time selector.
+ * gui/dialogs/schedule-page.c: (schedule_page_set_meeting_time):
+ * gui/dialogs/schedule-page.h: Added a function to set the meeting
+ time in the time selector.
+
+2006-07-31 Chenthill Palanisamy <pchenthill@novell.com>
+
Fixes #344927
* gui/dialogs/event-page.c:
(event_page_fill_widgets): Set the classification.
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