diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2004-04-05 19:17:43 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-04-05 19:17:43 +0800 |
commit | 4909b5ff6de4c14cc399aa9a94030fb0170e8a19 (patch) | |
tree | cff735b6f37f9708f08bd333ca310ce56537fb7b /calendar/gui/dialogs/task-details-page.c | |
parent | e2f581c52b016a6d62cbde62c3b69a149e813956 (diff) | |
download | gsoc2013-evolution-4909b5ff6de4c14cc399aa9a94030fb0170e8a19.tar gsoc2013-evolution-4909b5ff6de4c14cc399aa9a94030fb0170e8a19.tar.gz gsoc2013-evolution-4909b5ff6de4c14cc399aa9a94030fb0170e8a19.tar.bz2 gsoc2013-evolution-4909b5ff6de4c14cc399aa9a94030fb0170e8a19.tar.lz gsoc2013-evolution-4909b5ff6de4c14cc399aa9a94030fb0170e8a19.tar.xz gsoc2013-evolution-4909b5ff6de4c14cc399aa9a94030fb0170e8a19.tar.zst gsoc2013-evolution-4909b5ff6de4c14cc399aa9a94030fb0170e8a19.zip |
Fixes #56316
2004-04-05 Rodrigo Moya <rodrigo@ximian.com>
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
Diffstat (limited to 'calendar/gui/dialogs/task-details-page.c')
-rw-r--r-- | calendar/gui/dialogs/task-details-page.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 0d657fe59e..6c8dcbba32 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -95,6 +95,7 @@ static GtkWidget *task_details_page_get_widget (CompEditorPage *page); static void task_details_page_focus_main_widget (CompEditorPage *page); static gboolean task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp); static gboolean task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp); +static gboolean task_details_page_fill_timezones (CompEditorPage *page, GHashTable *timezones); static CompEditorPageClass *parent_class = NULL; @@ -128,6 +129,7 @@ task_details_page_class_init (TaskDetailsPageClass *class) editor_page_class->focus_main_widget = task_details_page_focus_main_widget; editor_page_class->fill_widgets = task_details_page_fill_widgets; editor_page_class->fill_component = task_details_page_fill_component; + editor_page_class->fill_timezones = task_details_page_fill_timezones; object_class->finalize = task_details_page_finalize; } @@ -436,6 +438,27 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp) return TRUE; } +/* fill_timezones handler for the event page */ +static gboolean +task_details_page_fill_timezones (CompEditorPage *page, GHashTable *timezones) +{ + TaskDetailsPage *tdpage; + TaskDetailsPagePrivate *priv; + icaltimezone *zone; + + tdpage = TASK_DETAILS_PAGE (page); + priv = tdpage->priv; + + /* add UTC timezone, which is the one used for the DATE-COMPLETED property */ + zone = icaltimezone_get_utc_timezone (); + if (zone) { + if (!g_hash_table_lookup (timezones, icaltimezone_get_tzid (zone))) + g_hash_table_insert (timezones, icaltimezone_get_tzid (zone), zone); + } + + return TRUE; +} + /* Gets the widgets from the XML file and returns if they are all available. */ |