diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2003-10-28 23:20:18 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-10-28 23:20:18 +0800 |
commit | 56914dafa403eac2259b787a0dce7a70fcd65e6a (patch) | |
tree | c9ea000f547363df0ae5b60169bad439411fc055 /calendar | |
parent | 179cdf36868b8702b3bc7a78201f6d70142a6a6d (diff) | |
download | gsoc2013-evolution-56914dafa403eac2259b787a0dce7a70fcd65e6a.tar gsoc2013-evolution-56914dafa403eac2259b787a0dce7a70fcd65e6a.tar.gz gsoc2013-evolution-56914dafa403eac2259b787a0dce7a70fcd65e6a.tar.bz2 gsoc2013-evolution-56914dafa403eac2259b787a0dce7a70fcd65e6a.tar.lz gsoc2013-evolution-56914dafa403eac2259b787a0dce7a70fcd65e6a.tar.xz gsoc2013-evolution-56914dafa403eac2259b787a0dce7a70fcd65e6a.tar.zst gsoc2013-evolution-56914dafa403eac2259b787a0dce7a70fcd65e6a.zip |
no need to keep the timezone here, it is already stored in the model.
2003-10-28 Rodrigo Moya <rodrigo@ximian.com>
* gui/e-cal-view.c: no need to keep the timezone here, it is
already stored in the model.
(e_cal_view_get_timezone): call e_cal_model_get_timezone().
(e_cal_view_set_timezone): call e_cal_model_set_timezone().
(e_cal_view_new_appointment_for): use the model's timezone.
svn path=/trunk/; revision=23103
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 8 | ||||
-rw-r--r-- | calendar/gui/e-cal-view.c | 19 | ||||
-rw-r--r-- | calendar/gui/e-calendar-view.c | 19 |
3 files changed, 24 insertions, 22 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 4a1c47b993..dc031d1bca 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2003-10-28 Rodrigo Moya <rodrigo@ximian.com> + + * gui/e-cal-view.c: no need to keep the timezone here, it is + already stored in the model. + (e_cal_view_get_timezone): call e_cal_model_get_timezone(). + (e_cal_view_set_timezone): call e_cal_model_set_timezone(). + (e_cal_view_new_appointment_for): use the model's timezone. + 2003-10-27 Dan Winship <danw@ximian.com> * pcs/cal-backend.c (cal_backend_notify_object_created, diff --git a/calendar/gui/e-cal-view.c b/calendar/gui/e-cal-view.c index a77ad4bb42..60cbda3e57 100644 --- a/calendar/gui/e-cal-view.c +++ b/calendar/gui/e-cal-view.c @@ -70,9 +70,6 @@ struct _ECalViewPrivate { /* The popup menu */ EPopupMenu *view_menu; - /* The timezone. */ - icaltimezone *zone; - /* The default category */ char *default_category; }; @@ -551,7 +548,7 @@ icaltimezone * e_cal_view_get_timezone (ECalView *cal_view) { g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL); - return cal_view->priv->zone; + return e_cal_model_get_timezone (cal_view->priv->model); } void @@ -561,13 +558,13 @@ e_cal_view_set_timezone (ECalView *cal_view, icaltimezone *zone) g_return_if_fail (E_IS_CAL_VIEW (cal_view)); - if (zone == cal_view->priv->zone) + old_zone = e_cal_model_get_timezone (cal_view->priv->model); + if (old_zone == zone) return; - old_zone = cal_view->priv->zone; - cal_view->priv->zone = zone; + e_cal_model_set_timezone (cal_view->priv->model, zone); g_signal_emit (G_OBJECT (cal_view), e_cal_view_signals[TIMEZONE_CHANGED], 0, - old_zone, cal_view->priv->zone); + old_zone, zone); } const char * @@ -1417,21 +1414,21 @@ e_cal_view_new_appointment_for (ECalView *cal_view, if (all_day) dt.tzid = NULL; else - dt.tzid = icaltimezone_get_tzid (priv->zone); + dt.tzid = icaltimezone_get_tzid (e_cal_model_get_timezone (cal_view->priv->model)); icalcomp = e_cal_model_create_component_with_defaults (priv->model); comp = cal_component_new (); cal_component_set_icalcomponent (comp, icalcomp); /* DTSTART, DTEND */ - itt = icaltime_from_timet_with_zone (dtstart, FALSE, priv->zone); + itt = icaltime_from_timet_with_zone (dtstart, FALSE, e_cal_model_get_timezone (cal_view->priv->model)); if (all_day) { itt.hour = itt.minute = itt.second = 0; itt.is_date = TRUE; } cal_component_set_dtstart (comp, &dt); - itt = icaltime_from_timet_with_zone (dtend, FALSE, priv->zone); + itt = icaltime_from_timet_with_zone (dtend, FALSE, e_cal_model_get_timezone (cal_view->priv->model)); if (all_day) { /* We round it up to the end of the day, unless it is already set to midnight */ diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index a77ad4bb42..60cbda3e57 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -70,9 +70,6 @@ struct _ECalViewPrivate { /* The popup menu */ EPopupMenu *view_menu; - /* The timezone. */ - icaltimezone *zone; - /* The default category */ char *default_category; }; @@ -551,7 +548,7 @@ icaltimezone * e_cal_view_get_timezone (ECalView *cal_view) { g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL); - return cal_view->priv->zone; + return e_cal_model_get_timezone (cal_view->priv->model); } void @@ -561,13 +558,13 @@ e_cal_view_set_timezone (ECalView *cal_view, icaltimezone *zone) g_return_if_fail (E_IS_CAL_VIEW (cal_view)); - if (zone == cal_view->priv->zone) + old_zone = e_cal_model_get_timezone (cal_view->priv->model); + if (old_zone == zone) return; - old_zone = cal_view->priv->zone; - cal_view->priv->zone = zone; + e_cal_model_set_timezone (cal_view->priv->model, zone); g_signal_emit (G_OBJECT (cal_view), e_cal_view_signals[TIMEZONE_CHANGED], 0, - old_zone, cal_view->priv->zone); + old_zone, zone); } const char * @@ -1417,21 +1414,21 @@ e_cal_view_new_appointment_for (ECalView *cal_view, if (all_day) dt.tzid = NULL; else - dt.tzid = icaltimezone_get_tzid (priv->zone); + dt.tzid = icaltimezone_get_tzid (e_cal_model_get_timezone (cal_view->priv->model)); icalcomp = e_cal_model_create_component_with_defaults (priv->model); comp = cal_component_new (); cal_component_set_icalcomponent (comp, icalcomp); /* DTSTART, DTEND */ - itt = icaltime_from_timet_with_zone (dtstart, FALSE, priv->zone); + itt = icaltime_from_timet_with_zone (dtstart, FALSE, e_cal_model_get_timezone (cal_view->priv->model)); if (all_day) { itt.hour = itt.minute = itt.second = 0; itt.is_date = TRUE; } cal_component_set_dtstart (comp, &dt); - itt = icaltime_from_timet_with_zone (dtend, FALSE, priv->zone); + itt = icaltime_from_timet_with_zone (dtend, FALSE, e_cal_model_get_timezone (cal_view->priv->model)); if (all_day) { /* We round it up to the end of the day, unless it is already set to midnight */ |