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-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-page.c')
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 9b0efc6967..828b4bf4dc 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -93,6 +93,7 @@ static GtkWidget *task_page_get_widget (CompEditorPage *page); static void task_page_focus_main_widget (CompEditorPage *page); static gboolean task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp); static gboolean task_page_fill_component (CompEditorPage *page, ECalComponent *comp); +static gboolean task_page_fill_timezones (CompEditorPage *page, GHashTable *timezones); static void task_page_set_summary (CompEditorPage *page, const char *summary); static void task_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates); @@ -128,6 +129,7 @@ task_page_class_init (TaskPageClass *class) editor_page_class->focus_main_widget = task_page_focus_main_widget; editor_page_class->fill_widgets = task_page_fill_widgets; editor_page_class->fill_component = task_page_fill_component; + editor_page_class->fill_timezones = task_page_fill_timezones; editor_page_class->set_summary = task_page_set_summary; editor_page_class->set_dates = task_page_set_dates; @@ -568,6 +570,34 @@ task_page_fill_component (CompEditorPage *page, ECalComponent *comp) return TRUE; } +/* fill_timezones handler for the event page */ +static gboolean +task_page_fill_timezones (CompEditorPage *page, GHashTable *timezones) +{ + TaskPage *tpage; + TaskPagePrivate *priv; + icaltimezone *zone; + + tpage = TASK_PAGE (page); + priv = tpage->priv; + + /* add due date timezone */ + zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->due_timezone)); + if (zone) { + if (!g_hash_table_lookup (timezones, icaltimezone_get_tzid (zone))) + g_hash_table_insert (timezones, icaltimezone_get_tzid (zone), zone); + } + + /* add start date timezone */ + zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_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; +} + /* set_summary handler for the task page */ static void task_page_set_summary (CompEditorPage *page, const char *summary) |