From 4909b5ff6de4c14cc399aa9a94030fb0170e8a19 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Mon, 5 Apr 2004 11:17:43 +0000 Subject: Fixes #56316 2004-04-05 Rodrigo Moya Fixes #56316 * gui/dialogs/comp-editor-page.[ch]: added "fill_timezones" virtual method to CompEditorPage class. (comp_editor_page_fill_timezones): new function. (comp_editor_page_class_init): initialize new virtual method. * gui/dialogs/event-page.c (event_page_fill_timezones, event_page_class_init): * gui/dialogs/task-page.c (task_page_fill_timezones, task_page_class_init): * gui/dialogs/task-details-page.c (task_details_page_fill_timezones, task_details_page_class_init): implemented new virtual method for pages dealing with timezones. * gui/dialogs/comp-editor.c (save_comp): call the "fill_timezones" method on all pages, and call... (send_timezone): ...this function for each hash table item. svn path=/trunk/; revision=25314 --- calendar/gui/dialogs/comp-editor-page.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'calendar/gui/dialogs/comp-editor-page.c') diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c index 0869d67fb9..44e89a3b14 100644 --- a/calendar/gui/dialogs/comp-editor-page.c +++ b/calendar/gui/dialogs/comp-editor-page.c @@ -149,6 +149,7 @@ comp_editor_page_class_init (CompEditorPageClass *class) class->focus_main_widget = NULL; class->fill_widgets = NULL; class->fill_component = NULL; + class->fill_timezones = NULL; class->set_summary = NULL; class->set_dates = NULL; @@ -268,6 +269,28 @@ comp_editor_page_fill_component (CompEditorPage *page, ECalComponent *comp) return TRUE; } +/** + * comp_editor_page_fill_timezones: + * @page: An editor page. + * @timezones: Hash table to which timezones will be added. + * + * Fills the given hash table with all the timezones used by the dates in the + * specific editor page. + * + * Returns: TRUE if the timezones were added, FALSE otherwise. + */ +gboolean +comp_editor_page_fill_timezones (CompEditorPage *page, GHashTable *timezones) +{ + g_return_val_if_fail (IS_COMP_EDITOR_PAGE (page), FALSE); + g_return_val_if_fail (timezones != NULL, FALSE); + + if (CLASS (page)->fill_timezones != NULL) + return (* CLASS (page)->fill_timezones) (page, timezones); + + return TRUE; +} + /** * comp_editor_page_set_e_cal: * @page: An editor page -- cgit v1.2.3