aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/event-page.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2004-03-04 23:49:36 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-03-04 23:49:36 +0800
commit40a30cb188b91b331adb9da07820e684f2ae8a12 (patch)
treef913bb36939c3cd6def5e1cb8593a57e61d92d01 /calendar/gui/dialogs/event-page.c
parent8848b03cbf555ec3a67eaad42fa20b6f225312f7 (diff)
downloadgsoc2013-evolution-40a30cb188b91b331adb9da07820e684f2ae8a12.tar
gsoc2013-evolution-40a30cb188b91b331adb9da07820e684f2ae8a12.tar.gz
gsoc2013-evolution-40a30cb188b91b331adb9da07820e684f2ae8a12.tar.bz2
gsoc2013-evolution-40a30cb188b91b331adb9da07820e684f2ae8a12.tar.lz
gsoc2013-evolution-40a30cb188b91b331adb9da07820e684f2ae8a12.tar.xz
gsoc2013-evolution-40a30cb188b91b331adb9da07820e684f2ae8a12.tar.zst
gsoc2013-evolution-40a30cb188b91b331adb9da07820e684f2ae8a12.zip
always add the page.
2004-03-04 Rodrigo Moya <rodrigo@ximian.com> * gui/dialogs/comp-editor.c (comp_editor_append_page): always add the page. * gui/dialogs/event-page.c (event_page_fill_widgets): continue filling up all other fields even if there are missing ones, and return the validation result. svn path=/trunk/; revision=24965
Diffstat (limited to 'calendar/gui/dialogs/event-page.c')
-rw-r--r--calendar/gui/dialogs/event-page.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 129acd1a2a..c56e477fe2 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -421,6 +421,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
const char *categories;
ESource *source;
GSList *l;
+ gboolean validated = TRUE;
g_return_val_if_fail (page->client != NULL, FALSE);
@@ -452,18 +453,15 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* Start and end times */
e_cal_component_get_dtstart (comp, &start_date);
- if (!start_date.value) {
- comp_editor_page_display_validation_error (page, _("Event with no start time"), priv->start_time);
- return FALSE;
- }
-
e_cal_component_get_dtend (comp, &end_date);
- if (!end_date.value) {
- comp_editor_page_display_validation_error (page, _("Event with no end time"), priv->end_time);
- return FALSE;
- }
-
- update_time (epage, &start_date, &end_date);
+ if (!start_date.value) {
+ comp_editor_page_display_validation_error (page, _("Event with no start date"), priv->start_time);
+ validated = FALSE;
+ } else if (!end_date.value) {
+ comp_editor_page_display_validation_error (page, _("Event with no end date"), priv->end_time);
+ validated = FALSE;
+ } else
+ update_time (epage, &start_date, &end_date);
e_cal_component_free_datetime (&start_date);
e_cal_component_free_datetime (&end_date);
@@ -530,7 +528,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
priv->updating = FALSE;
- return TRUE;
+ return validated;
}
/* fill_component handler for the event page */