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 /shell/e-shell-window.c | |
parent | e045e6f12324e1063a87488ac298fd23affea581 (diff) | |
download | gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.gz gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.zst gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.zip |
Do not call g_object_notify() when property didn't change
Diffstat (limited to 'shell/e-shell-window.c')
-rw-r--r-- | shell/e-shell-window.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index abc3d085fd..ede1400fcb 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -1386,6 +1386,9 @@ e_shell_window_set_safe_mode (EShellWindow *shell_window, { g_return_if_fail (E_IS_SHELL_WINDOW (shell_window)); + if ((shell_window->priv->safe_mode ? 1 : 0) == (safe_mode ? 1 : 0)) + return; + shell_window->priv->safe_mode = safe_mode; g_object_notify (G_OBJECT (shell_window), "safe-mode"); @@ -1449,6 +1452,9 @@ e_shell_window_set_sidebar_visible (EShellWindow *shell_window, { g_return_if_fail (E_IS_SHELL_WINDOW (shell_window)); + if ((shell_window->priv->sidebar_visible ? 1 : 0) == (sidebar_visible ? 1 : 0)) + return; + shell_window->priv->sidebar_visible = sidebar_visible; g_object_notify (G_OBJECT (shell_window), "sidebar-visible"); @@ -1483,6 +1489,9 @@ e_shell_window_set_switcher_visible (EShellWindow *shell_window, { g_return_if_fail (E_IS_SHELL_WINDOW (shell_window)); + if ((shell_window->priv->switcher_visible ? 1 : 0) == (switcher_visible ? 1 : 0)) + return; + shell_window->priv->switcher_visible = switcher_visible; g_object_notify (G_OBJECT (shell_window), "switcher-visible"); @@ -1517,6 +1526,9 @@ e_shell_window_set_taskbar_visible (EShellWindow *shell_window, { g_return_if_fail (E_IS_SHELL_WINDOW (shell_window)); + if ((shell_window->priv->taskbar_visible ? 1 : 0) == (taskbar_visible ? 1 : 0)) + return; + shell_window->priv->taskbar_visible = taskbar_visible; g_object_notify (G_OBJECT (shell_window), "taskbar-visible"); @@ -1551,6 +1563,9 @@ e_shell_window_set_toolbar_visible (EShellWindow *shell_window, { g_return_if_fail (E_IS_SHELL_WINDOW (shell_window)); + if ((shell_window->priv->toolbar_visible ? 1 : 0) == (toolbar_visible ? 1 : 0)) + return; + shell_window->priv->toolbar_visible = toolbar_visible; g_object_notify (G_OBJECT (shell_window), "toolbar-visible"); |