aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-06-05 01:46:25 +0800
committerMilan Crha <mcrha@redhat.com>2014-06-05 01:46:25 +0800
commit2f3fbdd6c6ff42a6c71ebe1d1d78108affe59d0f (patch)
treefd60a103158c3cfdbbce197feca07d7fea008a3d /modules/calendar
parent668745ff49d8f312c7d419a691cdab3e128ded06 (diff)
downloadgsoc2013-evolution-2f3fbdd6c6ff42a6c71ebe1d1d78108affe59d0f.tar
gsoc2013-evolution-2f3fbdd6c6ff42a6c71ebe1d1d78108affe59d0f.tar.gz
gsoc2013-evolution-2f3fbdd6c6ff42a6c71ebe1d1d78108affe59d0f.tar.bz2
gsoc2013-evolution-2f3fbdd6c6ff42a6c71ebe1d1d78108affe59d0f.tar.lz
gsoc2013-evolution-2f3fbdd6c6ff42a6c71ebe1d1d78108affe59d0f.tar.xz
gsoc2013-evolution-2f3fbdd6c6ff42a6c71ebe1d1d78108affe59d0f.tar.zst
gsoc2013-evolution-2f3fbdd6c6ff42a6c71ebe1d1d78108affe59d0f.zip
Ignore false GObject property change notifications
This is related to bug 698275, which did not cover all cases. The problem here is that the dconf can in certain situation claim that everything changed (path "/" changed), which GSettingsBinding propagates to a GObject property unconditionally and GObject's property setter (g_object_set_property()) also notifies about the property change unconditionally, despite the real descendant property setter properly checks for the value change. After all these false notifications a callback on "notify" signal is called and possibly an expensive operation is run. Checking whether the value really changed helps in performance, for which were added new e-util functions: e_signal_connect_notify() e_signal_connect_notify_after() e_signal_connect_notify_swapped() e_signal_connect_notify_object() which have the same prototype as their GLib counterparts, but they allow only "notify::..." signals and they test whether the value really changed before they call the registered callback.
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-cal-shell-content.c8
-rw-r--r--modules/calendar/e-cal-shell-view-private.c2
-rw-r--r--modules/calendar/e-memo-shell-content.c2
-rw-r--r--modules/calendar/e-memo-shell-view-private.c2
-rw-r--r--modules/calendar/e-task-shell-content.c2
-rw-r--r--modules/calendar/e-task-shell-view-private.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 8029cc8f0a..5d1066edf1 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -407,7 +407,7 @@ cal_shell_content_constructed (GObject *object)
for (ii = 0; ii < GNOME_CAL_LAST_VIEW; ii++) {
calendar_view = gnome_calendar_get_calendar_view (calendar, ii);
- g_signal_connect (
+ e_signal_connect_notify (
calendar_view, "notify::is-editing",
G_CALLBACK (cal_shell_content_is_editing_changed_cb), shell_view);
@@ -465,7 +465,7 @@ cal_shell_content_constructed (GObject *object)
G_CALLBACK (e_cal_shell_view_taskpad_open_task),
shell_view);
- g_signal_connect (
+ e_signal_connect_notify (
widget, "notify::is-editing",
G_CALLBACK (cal_shell_content_is_editing_changed_cb), shell_view);
@@ -511,7 +511,7 @@ cal_shell_content_constructed (GObject *object)
G_CALLBACK (e_cal_shell_view_memopad_open_memo),
shell_view);
- g_signal_connect (
+ e_signal_connect_notify (
widget, "notify::is-editing",
G_CALLBACK (cal_shell_content_is_editing_changed_cb), shell_view);
@@ -527,7 +527,7 @@ cal_shell_content_constructed (GObject *object)
e_shell_view_set_view_instance (shell_view, view_instance);
g_object_unref (view_instance);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
shell_view, "notify::view-id",
G_CALLBACK (cal_shell_content_notify_view_id_cb),
object);
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index bd3b943274..04c6c7a11f 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -431,7 +431,7 @@ cal_shell_view_notify_view_id_cb (EShellView *shell_view)
void
e_cal_shell_view_private_init (ECalShellView *cal_shell_view)
{
- g_signal_connect (
+ e_signal_connect_notify (
cal_shell_view, "notify::view-id",
G_CALLBACK (cal_shell_view_notify_view_id_cb), NULL);
}
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index 95be0dc7db..4b0c4b577f 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -533,7 +533,7 @@ memo_shell_content_constructed (GObject *object)
G_CALLBACK (memo_shell_content_selection_change_cb),
object);
- g_signal_connect (
+ e_signal_connect_notify (
priv->memo_table, "notify::is-editing",
G_CALLBACK (memo_shell_content_is_editing_changed_cb), shell_view);
diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c
index a389c6686f..8a92ef5201 100644
--- a/modules/calendar/e-memo-shell-view-private.c
+++ b/modules/calendar/e-memo-shell-view-private.c
@@ -143,7 +143,7 @@ memo_shell_view_notify_view_id_cb (EShellView *shell_view)
void
e_memo_shell_view_private_init (EMemoShellView *memo_shell_view)
{
- g_signal_connect (
+ e_signal_connect_notify (
memo_shell_view, "notify::view-id",
G_CALLBACK (memo_shell_view_notify_view_id_cb), NULL);
}
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index a7c2981849..aa31281433 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -530,7 +530,7 @@ task_shell_content_constructed (GObject *object)
G_CALLBACK (task_shell_content_selection_change_cb),
object);
- g_signal_connect (
+ e_signal_connect_notify (
priv->task_table, "notify::is-editing",
G_CALLBACK (task_shell_content_is_editing_changed_cb), shell_view);
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index 6e2a8dac3c..863fd0136e 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -210,7 +210,7 @@ task_shell_view_notify_view_id_cb (EShellView *shell_view)
void
e_task_shell_view_private_init (ETaskShellView *task_shell_view)
{
- g_signal_connect (
+ e_signal_connect_notify (
task_shell_view, "notify::view-id",
G_CALLBACK (task_shell_view_notify_view_id_cb), NULL);
}