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 /calendar/gui/dialogs/comp-editor.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 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 027146753c..8d840cbc99 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -2441,6 +2441,9 @@ comp_editor_set_summary (CompEditor *editor, g_return_if_fail (IS_COMP_EDITOR (editor)); + if (g_strcmp0 (editor->priv->summary, summary) == 0) + return; + g_free (editor->priv->summary); editor->priv->summary = g_strdup (summary); @@ -2485,6 +2488,9 @@ comp_editor_set_timezone (CompEditor *editor, { g_return_if_fail (IS_COMP_EDITOR (editor)); + if (editor->priv->zone == zone) + return; + editor->priv->zone = zone; g_object_notify (G_OBJECT (editor), "timezone"); @@ -2504,6 +2510,9 @@ comp_editor_set_use_24_hour_format (CompEditor *editor, { g_return_if_fail (IS_COMP_EDITOR (editor)); + if ((editor->priv->use_24_hour_format ? 1 : 0) == (use_24_hour_format ? 1 : 0)) + return; + editor->priv->use_24_hour_format = use_24_hour_format; g_object_notify (G_OBJECT (editor), "use-24-hour-format"); @@ -2523,6 +2532,9 @@ comp_editor_set_work_day_end_hour (CompEditor *editor, { g_return_if_fail (IS_COMP_EDITOR (editor)); + if (editor->priv->work_day_end_hour == work_day_end_hour) + return; + editor->priv->work_day_end_hour = work_day_end_hour; g_object_notify (G_OBJECT (editor), "work-day-end-hour"); @@ -2542,6 +2554,9 @@ comp_editor_set_work_day_end_minute (CompEditor *editor, { g_return_if_fail (IS_COMP_EDITOR (editor)); + if (editor->priv->work_day_end_minute == work_day_end_minute) + return; + editor->priv->work_day_end_minute = work_day_end_minute; g_object_notify (G_OBJECT (editor), "work-day-end-minute"); @@ -2561,6 +2576,9 @@ comp_editor_set_work_day_start_hour (CompEditor *editor, { g_return_if_fail (IS_COMP_EDITOR (editor)); + if (editor->priv->work_day_start_hour == work_day_start_hour) + return; + editor->priv->work_day_start_hour = work_day_start_hour; g_object_notify (G_OBJECT (editor), "work-day-start-hour"); @@ -2580,6 +2598,9 @@ comp_editor_set_work_day_start_minute (CompEditor *editor, { g_return_if_fail (IS_COMP_EDITOR (editor)); + if (editor->priv->work_day_start_minute == work_day_start_minute) + return; + editor->priv->work_day_start_minute = work_day_start_minute; g_object_notify (G_OBJECT (editor), "work-day-start-minute"); @@ -2601,6 +2622,9 @@ comp_editor_set_changed (CompEditor *editor, g_return_if_fail (IS_COMP_EDITOR (editor)); + if ((editor->priv->changed ? 1 : 0) == (changed ? 1 : 0)) + return; + editor->priv->changed = changed; action = comp_editor_get_action (editor, "save"); @@ -2655,6 +2679,9 @@ comp_editor_set_flags (CompEditor *editor, { g_return_if_fail (IS_COMP_EDITOR (editor)); + if (editor->priv->flags == flags) + return; + editor->priv->flags = flags; editor->priv->user_org = flags & COMP_EDITOR_USER_ORG; @@ -3001,6 +3028,9 @@ comp_editor_set_client (CompEditor *editor, g_return_if_fail (IS_COMP_EDITOR (editor)); g_return_if_fail (cal_client == NULL || E_IS_CAL_CLIENT (cal_client)); + if (editor->priv->cal_client == cal_client) + return; + if (cal_client != NULL) g_object_ref (cal_client); |