diff options
author | Chenthill Palanisamy <pchenthill@novell.com> | 2010-04-16 19:37:40 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchenthill@novell.com> | 2010-04-16 19:43:31 +0800 |
commit | dac959d85813debca9762eaf4c4cf8cebc1090fe (patch) | |
tree | fae1c75f4c6bc91e3174392ef8b83d557522bbd1 /calendar/gui/e-cal-model.c | |
parent | e9b64e499fe4abaea723820dcb8b591cf38804a6 (diff) | |
download | gsoc2013-evolution-dac959d85813debca9762eaf4c4cf8cebc1090fe.tar.gz gsoc2013-evolution-dac959d85813debca9762eaf4c4cf8cebc1090fe.tar.zst gsoc2013-evolution-dac959d85813debca9762eaf4c4cf8cebc1090fe.zip |
Bug 596601 (bnc) - monitor system timezone changes in evolution
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r-- | calendar/gui/e-cal-model.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 5cf20941b8..cb1966fb17 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -141,6 +141,7 @@ enum { CAL_VIEW_PROGRESS, CAL_VIEW_DONE, STATUS_MESSAGE, + TIMEZONE_CHANGED, LAST_SIGNAL }; @@ -474,6 +475,16 @@ e_cal_model_class_init (ECalModelClass *class) e_marshal_VOID__STRING_DOUBLE, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_DOUBLE); + signals[TIMEZONE_CHANGED] = g_signal_new ( + "timezone-changed", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ECalModelClass, timezone_changed), + NULL, NULL, + e_marshal_VOID__POINTER_POINTER, + G_TYPE_NONE, 2, + G_TYPE_POINTER, + G_TYPE_POINTER); } static void @@ -1434,12 +1445,14 @@ void e_cal_model_set_timezone (ECalModel *model, icaltimezone *zone) { + icaltimezone *old_zone; g_return_if_fail (E_IS_CAL_MODEL (model)); if (model->priv->zone == zone) return; e_table_model_pre_change (E_TABLE_MODEL (model)); + old_zone = model->priv->zone; model->priv->zone = zone; /* the timezone affects the times shown for date fields, @@ -1447,6 +1460,8 @@ e_cal_model_set_timezone (ECalModel *model, e_table_model_changed (E_TABLE_MODEL (model)); g_object_notify (G_OBJECT (model), "timezone"); + g_signal_emit (G_OBJECT (model), signals[TIMEZONE_CHANGED], 0, + old_zone, zone); } void |