diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-11-02 23:49:38 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-11-05 02:19:50 +0800 |
commit | 1f17dab6b0d9c5413dea38dcc95e7a7bb5b4bd9b (patch) | |
tree | b8d9f8b56ce226ac15e7cc5efe0e36ad084f41af /calendar/gui/dialogs/task-details-page.c | |
parent | 0ab70ad33c4e22a176e89bb8a935aed8c7848e51 (diff) | |
download | gsoc2013-evolution-1f17dab6b0d9c5413dea38dcc95e7a7bb5b4bd9b.tar.gz gsoc2013-evolution-1f17dab6b0d9c5413dea38dcc95e7a7bb5b4bd9b.tar.zst gsoc2013-evolution-1f17dab6b0d9c5413dea38dcc95e7a7bb5b4bd9b.zip |
Move calendar preferences to the calendar module.
Continue replacing the use of calendar-config functions with GObject
property bindings to EShellSettings properties.
Diffstat (limited to 'calendar/gui/dialogs/task-details-page.c')
-rw-r--r-- | calendar/gui/dialogs/task-details-page.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index ec63458d81..43f38a20a5 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -33,7 +33,6 @@ #include <glib/gi18n.h> #include <misc/e-dateedit.h> #include <misc/e-url-entry.h> -#include "../calendar-config.h" #include "../e-timezone-entry.h" #include "comp-editor-util.h" #include "task-details-page.h" @@ -227,12 +226,15 @@ task_details_page_fill_widgets (CompEditorPage *page, gint *priority_value, *percent = NULL; TaskEditorPriority priority; icalproperty_status status; + CompEditor *editor; const gchar *url; struct icaltimetype *completed = NULL; tdpage = TASK_DETAILS_PAGE (page); priv = tdpage->priv; + editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tdpage)); + /* Clean the screen */ clear_widgets (tdpage); @@ -274,7 +276,7 @@ task_details_page_fill_widgets (CompEditorPage *page, /* Completed is in UTC, but that would confuse the user, so we convert it to local time. */ utc_zone = icaltimezone_get_utc_timezone (); - zone = calendar_config_get_icaltimezone (); + zone = comp_editor_get_timezone (editor); icaltimezone_convert_time (completed, utc_zone, zone); @@ -316,14 +318,18 @@ task_details_page_fill_component (CompEditorPage *page, struct icaltimetype icalcomplete, icaltoday; icalproperty_status status; TaskEditorPriority priority; + CompEditor *editor; gint priority_value, percent; gchar *url; gboolean date_set; - icaltimezone *zone = calendar_config_get_icaltimezone (); + icaltimezone *zone; tdpage = TASK_DETAILS_PAGE (page); priv = tdpage->priv; + editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tdpage)); + zone = comp_editor_get_timezone (editor); + /* Percent Complete. */ percent = gtk_spin_button_get_value_as_int ( GTK_SPIN_BUTTON (priv->percent_complete)); @@ -661,14 +667,19 @@ init_widgets (TaskDetailsPage *tdpage) { TaskDetailsPagePrivate *priv; GtkAdjustment *adjustment; + CompEditor *editor; priv = tdpage->priv; + editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tdpage)); + /* Make sure the EDateEdit widgets use our timezones to get the current time. */ - e_date_edit_set_get_time_callback (E_DATE_EDIT (priv->completed_date), - (EDateEditGetTimeCallback) comp_editor_get_current_time, - tdpage, NULL); + e_date_edit_set_get_time_callback ( + E_DATE_EDIT (priv->completed_date), + (EDateEditGetTimeCallback) comp_editor_get_current_time, + g_object_ref (editor), + (GDestroyNotify) g_object_unref); /* These are created by hand, so hook the mnemonics manually */ gtk_label_set_mnemonic_widget ( |