diff options
author | Milan Crha <mcrha@redhat.com> | 2012-06-18 21:34:33 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-06-18 21:35:44 +0800 |
commit | 6c05b09be16ac8eceb17653c3c26c0c6f963ef10 (patch) | |
tree | 5bb22771cf05419f851373ee43b1ad39a0dcfeaa /modules/calendar | |
parent | e045e6f12324e1063a87488ac298fd23affea581 (diff) | |
download | gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.gz gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.bz2 gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.lz gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.xz gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.zst gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.zip |
Do not call g_object_notify() when property didn't change
Diffstat (limited to 'modules/calendar')
-rw-r--r-- | modules/calendar/e-calendar-preferences.c | 2 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-content.c | 6 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-content.c | 6 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view.c | 3 |
4 files changed, 16 insertions, 1 deletions
diff --git a/modules/calendar/e-calendar-preferences.c b/modules/calendar/e-calendar-preferences.c index 8c5c2796c4..a1655fa324 100644 --- a/modules/calendar/e-calendar-preferences.c +++ b/modules/calendar/e-calendar-preferences.c @@ -522,7 +522,7 @@ calendar_preferences_construct (ECalendarPreferences *prefs, g_signal_connect ( shell_settings, "notify::cal-use-system-timezone", G_CALLBACK (update_system_tz_widgets), prefs); - g_object_notify (G_OBJECT (shell_settings), "cal-use-system-timezone"); + update_system_tz_widgets (shell_settings, NULL, prefs); widget = e_builder_get_widget (prefs->builder, "timezone"); g_object_bind_property ( diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index ca1c1d8f5d..ab9f3180be 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -314,6 +314,9 @@ static void memo_shell_content_set_orientation (EMemoShellContent *memo_shell_content, GtkOrientation orientation) { + if (memo_shell_content->priv->orientation == orientation) + return; + memo_shell_content->priv->orientation = orientation; g_object_notify (G_OBJECT (memo_shell_content), "orientation"); @@ -742,6 +745,9 @@ e_memo_shell_content_set_preview_visible (EMemoShellContent *memo_shell_content, { g_return_if_fail (E_IS_MEMO_SHELL_CONTENT (memo_shell_content)); + if ((memo_shell_content->priv->preview_visible ? 1 : 0) == (preview_visible ? 1 : 0)) + return; + memo_shell_content->priv->preview_visible = preview_visible; if (preview_visible && memo_shell_content->priv->preview_pane) { diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 2be1153775..3fe5f68f51 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -314,6 +314,9 @@ static void task_shell_content_set_orientation (ETaskShellContent *task_shell_content, GtkOrientation orientation) { + if (task_shell_content->priv->orientation == orientation) + return; + task_shell_content->priv->orientation = orientation; g_object_notify (G_OBJECT (task_shell_content), "orientation"); @@ -767,6 +770,9 @@ e_task_shell_content_set_preview_visible (ETaskShellContent *task_shell_content, { g_return_if_fail (E_IS_TASK_SHELL_CONTENT (task_shell_content)); + if ((task_shell_content->priv->preview_visible ? 1 : 0) == (preview_visible ? 1 : 0)) + return; + task_shell_content->priv->preview_visible = preview_visible; if (preview_visible && task_shell_content->priv->preview_pane) { diff --git a/modules/calendar/e-task-shell-view.c b/modules/calendar/e-task-shell-view.c index f7028f87d3..4a466b7be7 100644 --- a/modules/calendar/e-task-shell-view.c +++ b/modules/calendar/e-task-shell-view.c @@ -526,6 +526,9 @@ e_task_shell_view_set_confirm_purge (ETaskShellView *task_shell_view, { g_return_if_fail (E_IS_TASK_SHELL_VIEW (task_shell_view)); + if ((task_shell_view->priv->confirm_purge ? 1 : 0) == (confirm_purge ? 1 : 0)) + return; + task_shell_view->priv->confirm_purge = confirm_purge; g_object_notify (G_OBJECT (task_shell_view), "confirm-purge"); |