diff options
author | Kidd Wang <kiddwang@src.gnome.org> | 2004-04-27 16:57:13 +0800 |
---|---|---|
committer | Kidd Wang <kiddwang@src.gnome.org> | 2004-04-27 16:57:13 +0800 |
commit | 82e05d3fb1bc1e715ef17290375419239c88cb31 (patch) | |
tree | 7142c2c1fd4a523f91c888fb5ce5c5ba0d0f4d46 /calendar | |
parent | 60d23895f74a901e27a8118f9d97186d5e6a60c1 (diff) | |
download | gsoc2013-evolution-82e05d3fb1bc1e715ef17290375419239c88cb31.tar.gz gsoc2013-evolution-82e05d3fb1bc1e715ef17290375419239c88cb31.tar.zst gsoc2013-evolution-82e05d3fb1bc1e715ef17290375419239c88cb31.zip |
compare the start time and the due time only when both are not null.
* gui/e-cal-model-tasks.c: (ecmt_set_value_at): compare the start
time and the due time only when both are not null.
svn path=/trunk/; revision=25627
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | calendar/gui/e-cal-model-tasks.c | 18 |
2 files changed, 19 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index df30826223..7bb546ce3d 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2004-04-27 Kidd Wang <kidd.wang@sun.com> + + * gui/e-cal-model-tasks.c: (ecmt_set_value_at): compare the start + time and the due time only when both are not null. + 2004-04-26 Jeffrey Stedfast <fejj@ximian.com> * gui/migration.c (migrate_pilot_data): New function to migrate diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c index 9efa6d4b57..d217957413 100644 --- a/calendar/gui/e-cal-model-tasks.c +++ b/calendar/gui/e-cal-model-tasks.c @@ -733,10 +733,15 @@ ecmt_set_value_at (ETableModel *etm, int col, int row, const void *value) if (col < E_CAL_MODEL_FIELD_LAST) { if (col == E_CAL_MODEL_FIELD_DTSTART) { dv = (ECellDateEditValue *) value; - start_tt = dv->tt; + if (dv) + start_tt = dv->tt; + else + start_tt = icaltime_null_time(); due_tt = icalcomponent_get_due (comp_data->icalcomp); - if (icaltime_compare (start_tt, due_tt) > 0) { + if (!icaltime_is_null_time(start_tt) && + !icaltime_is_null_time(due_tt) && + icaltime_compare (start_tt, due_tt) > 0) { dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, @@ -762,9 +767,14 @@ ecmt_set_value_at (ETableModel *etm, int col, int row, const void *value) case E_CAL_MODEL_TASKS_FIELD_DUE : dv = (ECellDateEditValue *) value; start_tt = icalcomponent_get_dtstart (comp_data->icalcomp); - due_tt = dv->tt; + if (dv) + due_tt = dv->tt; + else + due_tt = icaltime_null_time(); - if (icaltime_compare (start_tt, due_tt) > 0) { + if (!icaltime_is_null_time(start_tt) && + !icaltime_is_null_time(due_tt) && + icaltime_compare (start_tt, due_tt) > 0) { dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, |