aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-time-item.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-06-05 22:59:29 +0800
committerMilan Crha <mcrha@redhat.com>2014-06-05 22:59:29 +0800
commit6e9e7b067618a22795db3d9a97f60705b8046353 (patch)
treed5049d2833f0b75de95030452fafed13a06a44e3 /calendar/gui/e-day-view-time-item.c
parent2e71c861438a25ceac5811d9d3aa528691e71410 (diff)
downloadgsoc2013-evolution-6e9e7b067618a22795db3d9a97f60705b8046353.tar
gsoc2013-evolution-6e9e7b067618a22795db3d9a97f60705b8046353.tar.gz
gsoc2013-evolution-6e9e7b067618a22795db3d9a97f60705b8046353.tar.bz2
gsoc2013-evolution-6e9e7b067618a22795db3d9a97f60705b8046353.tar.lz
gsoc2013-evolution-6e9e7b067618a22795db3d9a97f60705b8046353.tar.xz
gsoc2013-evolution-6e9e7b067618a22795db3d9a97f60705b8046353.tar.zst
gsoc2013-evolution-6e9e7b067618a22795db3d9a97f60705b8046353.zip
Ignore false GSettings key change notifications
Similar to GObject::notify, the GSettings::changed can be emitted even if a key didn't change. It's up to the user (aka evolution) to test for real changes, thus let's do it. It may have certain performance positive impact too.
Diffstat (limited to 'calendar/gui/e-day-view-time-item.c')
-rw-r--r--calendar/gui/e-day-view-time-item.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index f85b09eebd..b30951bb5b 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -727,16 +727,21 @@ edvti_second_zone_changed_cb (GSettings *settings,
{
EDayViewTimeItem *time_item = user_data;
EDayView *day_view;
+ icaltimezone *second_zone;
gchar *location;
g_return_if_fail (user_data != NULL);
g_return_if_fail (E_IS_DAY_VIEW_TIME_ITEM (time_item));
location = calendar_config_get_day_second_zone ();
- time_item->priv->second_zone =
- location ? icaltimezone_get_builtin_timezone (location) : NULL;
+ second_zone = location ? icaltimezone_get_builtin_timezone (location) : NULL;
g_free (location);
+ if (second_zone == time_item->priv->second_zone)
+ return;
+
+ time_item->priv->second_zone = second_zone;
+
day_view = e_day_view_time_item_get_day_view (time_item);
gtk_widget_set_size_request (
day_view->time_canvas,