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 | |
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
78 files changed, 625 insertions, 22 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index fe61ccaa9e..4bb92a351d 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -1687,6 +1687,9 @@ e_contact_list_editor_set_client (EContactListEditor *editor, g_return_if_fail (E_IS_CONTACT_LIST_EDITOR (editor)); g_return_if_fail (E_IS_BOOK_CLIENT (book_client)); + if (book_client == editor->priv->book_client) + return; + if (editor->priv->book_client != NULL) g_object_unref (editor->priv->book_client); editor->priv->book_client = g_object_ref (book_client); @@ -1888,6 +1891,9 @@ e_contact_list_editor_set_is_new_list (EContactListEditor *editor, g_return_if_fail (E_IS_CONTACT_LIST_EDITOR (editor)); + if ((editor->priv->is_new_list ? 1 : 0) == (is_new_list ? 1 : 0)) + return; + editor->priv->is_new_list = is_new_list; contact_list_editor_update (editor); @@ -1908,6 +1914,9 @@ e_contact_list_editor_set_editable (EContactListEditor *editor, { g_return_if_fail (E_IS_CONTACT_LIST_EDITOR (editor)); + if ((editor->priv->editable ? 1 : 0) == (editable ? 1 : 0)) + return; + editor->priv->editable = editable; contact_list_editor_update (editor); diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index 3cc02dff54..a842ff40e0 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -889,6 +889,9 @@ e_addressbook_model_set_client (EAddressbookModel *model, g_return_if_fail (E_IS_ADDRESSBOOK_MODEL (model)); g_return_if_fail (E_IS_BOOK_CLIENT (book_client)); + if (model->priv->book_client == book_client) + return; + if (model->priv->book_client != NULL) { if (model->priv->book_client == book_client) return; diff --git a/addressbook/gui/widgets/e-addressbook-selector.c b/addressbook/gui/widgets/e-addressbook-selector.c index 80595ef59b..513da877bc 100644 --- a/addressbook/gui/widgets/e-addressbook-selector.c +++ b/addressbook/gui/widgets/e-addressbook-selector.c @@ -420,6 +420,9 @@ e_addressbook_selector_set_current_view (EAddressbookSelector *selector, if (current_view != NULL) g_return_if_fail (E_IS_ADDRESSBOOK_VIEW (current_view)); + if (selector->priv->current_view == current_view) + return; + if (selector->priv->current_view != NULL) { g_object_unref (selector->priv->current_view); selector->priv->current_view = NULL; diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 28fd5b02be..f877821593 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -577,6 +577,9 @@ eab_contact_display_set_contact (EABContactDisplay *display, { g_return_if_fail (EAB_IS_CONTACT_DISPLAY (display)); + if (display->priv->contact == contact) + return; + if (contact != NULL) g_object_ref (contact); diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c index 2f4e942bf1..e24bca5c1e 100644 --- a/calendar/gui/dialogs/comp-editor-page.c +++ b/calendar/gui/dialogs/comp-editor-page.c @@ -224,6 +224,9 @@ comp_editor_page_set_updating (CompEditorPage *page, { g_return_if_fail (IS_COMP_EDITOR_PAGE (page)); + if ((page->priv->updating ? 1 : 0) == (updating ? 1 : 0)) + return; + page->priv->updating = updating; g_object_notify (G_OBJECT (page), "updating"); 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); diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c index 565f629b2c..54f95004cc 100644 --- a/calendar/gui/e-cal-model-tasks.c +++ b/calendar/gui/e-cal-model-tasks.c @@ -1269,6 +1269,9 @@ e_cal_model_tasks_set_color_due_today (ECalModelTasks *model, g_return_if_fail (E_IS_CAL_MODEL_TASKS (model)); g_return_if_fail (color_due_today != NULL); + if (g_strcmp0 (model->priv->color_due_today, color_due_today) == 0) + return; + g_free (model->priv->color_due_today); model->priv->color_due_today = g_strdup (color_due_today); @@ -1312,6 +1315,9 @@ e_cal_model_tasks_set_color_overdue (ECalModelTasks *model, g_return_if_fail (E_IS_CAL_MODEL_TASKS (model)); g_return_if_fail (color_overdue != NULL); + if (g_strcmp0 (model->priv->color_overdue, color_overdue) == 0) + return; + g_free (model->priv->color_overdue); model->priv->color_overdue = g_strdup (color_overdue); diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 2aaefc363d..90c411cee6 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -1762,6 +1762,9 @@ e_cal_model_set_confirm_delete (ECalModel *model, { g_return_if_fail (E_IS_CAL_MODEL (model)); + if ((model->priv->confirm_delete ? 1 : 0) == (confirm_delete ? 1 : 0)) + return; + model->priv->confirm_delete = confirm_delete; g_object_notify (G_OBJECT (model), "confirm-delete"); @@ -1855,6 +1858,9 @@ e_cal_model_set_compress_weekend (ECalModel *model, { g_return_if_fail (E_IS_CAL_MODEL (model)); + if ((model->priv->compress_weekend ? 1 : 0) == (compress_weekend ? 1 : 0)) + return; + model->priv->compress_weekend = compress_weekend; g_object_notify (G_OBJECT (model), "compress-weekend"); @@ -1884,6 +1890,9 @@ e_cal_model_set_default_reminder_interval (ECalModel *model, { g_return_if_fail (E_IS_CAL_MODEL (model)); + if (model->priv->default_reminder_interval == default_reminder_interval) + return; + model->priv->default_reminder_interval = default_reminder_interval; g_object_notify (G_OBJECT (model), "default-reminder-interval"); @@ -1903,6 +1912,9 @@ e_cal_model_set_default_reminder_units (ECalModel *model, { g_return_if_fail (E_IS_CAL_MODEL (model)); + if (model->priv->default_reminder_units == default_reminder_units) + return; + model->priv->default_reminder_units = default_reminder_units; g_object_notify (G_OBJECT (model), "default-reminder-units"); @@ -1948,6 +1960,9 @@ e_cal_model_set_use_default_reminder (ECalModel *model, { g_return_if_fail (E_IS_CAL_MODEL (model)); + if ((model->priv->use_default_reminder ? 1 : 0) == (use_default_reminder ? 1 : 0)) + return; + model->priv->use_default_reminder = use_default_reminder; g_object_notify (G_OBJECT (model), "use-default-reminder"); @@ -1991,6 +2006,9 @@ e_cal_model_set_work_day_end_hour (ECalModel *model, { g_return_if_fail (E_IS_CAL_MODEL (model)); + if (model->priv->work_day_end_hour == work_day_end_hour) + return; + model->priv->work_day_end_hour = work_day_end_hour; g_object_notify (G_OBJECT (model), "work-day-end-hour"); @@ -2010,6 +2028,9 @@ e_cal_model_set_work_day_end_minute (ECalModel *model, { g_return_if_fail (E_IS_CAL_MODEL (model)); + if (model->priv->work_day_end_minute == work_day_end_minute) + return; + model->priv->work_day_end_minute = work_day_end_minute; g_object_notify (G_OBJECT (model), "work-day-end-minute"); @@ -2029,6 +2050,9 @@ e_cal_model_set_work_day_start_hour (ECalModel *model, { g_return_if_fail (E_IS_CAL_MODEL (model)); + if (model->priv->work_day_start_hour == work_day_start_hour) + return; + model->priv->work_day_start_hour = work_day_start_hour; g_object_notify (G_OBJECT (model), "work-day-start-hour"); @@ -2048,6 +2072,9 @@ e_cal_model_set_work_day_start_minute (ECalModel *model, { g_return_if_fail (E_IS_CAL_MODEL (model)); + if (model->priv->work_day_start_minute == work_day_start_minute) + return; + model->priv->work_day_start_minute = work_day_start_minute; g_object_notify (G_OBJECT (model), "work-day-start-minute"); @@ -2092,6 +2119,9 @@ e_cal_model_set_default_client (ECalModel *model, priv = model->priv; + if (priv->default_client == client) + return; + if (priv->default_client) { client_data = find_client_data (model, priv->default_client); if (!client_data) { diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 7bab36838f..fb82854de3 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -1251,6 +1251,9 @@ e_calendar_view_set_time_divisions (ECalendarView *cal_view, { g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view)); + if (cal_view->priv->time_divisions == time_divisions) + return; + cal_view->priv->time_divisions = time_divisions; g_object_notify (G_OBJECT (cal_view), "time-divisions"); diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c index 034d715d9b..d6c2a32ca2 100644 --- a/calendar/gui/e-cell-date-edit-text.c +++ b/calendar/gui/e-cell-date-edit-text.c @@ -312,6 +312,9 @@ e_cell_date_edit_text_set_timezone (ECellDateEditText *ecd, { g_return_if_fail (E_IS_CELL_DATE_EDIT_TEXT (ecd)); + if (ecd->priv->timezone == timezone) + return; + ecd->priv->timezone = timezone; g_object_notify (G_OBJECT (ecd), "timezone"); @@ -331,6 +334,9 @@ e_cell_date_edit_text_set_use_24_hour_format (ECellDateEditText *ecd, { g_return_if_fail (E_IS_CELL_DATE_EDIT_TEXT (ecd)); + if ((ecd->priv->use_24_hour_format ? 1 : 0) == (use_24_hour ? 1 : 0)) + return; + ecd->priv->use_24_hour_format = use_24_hour; g_object_notify (G_OBJECT (ecd), "use-24-hour-format"); diff --git a/calendar/gui/e-date-time-list.c b/calendar/gui/e-date-time-list.c index 70a4578f70..4ca04a3f16 100644 --- a/calendar/gui/e-date-time-list.c +++ b/calendar/gui/e-date-time-list.c @@ -525,6 +525,9 @@ e_date_time_list_set_use_24_hour_format (EDateTimeList *date_time_list, { g_return_if_fail (E_IS_DATE_TIME_LIST (date_time_list)); + if ((date_time_list->use_24_hour_format ? 1 : 0) == (use_24_hour_format ? 1 : 0)) + return; + date_time_list->use_24_hour_format = use_24_hour_format; g_object_notify (G_OBJECT (date_time_list), "use-24-hour-format"); diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c index cb20ffeb4e..32021b670a 100644 --- a/calendar/gui/e-day-view-main-item.c +++ b/calendar/gui/e-day-view-main-item.c @@ -1277,6 +1277,9 @@ e_day_view_main_item_set_day_view (EDayViewMainItem *main_item, g_return_if_fail (E_IS_DAY_VIEW_MAIN_ITEM (main_item)); g_return_if_fail (E_IS_DAY_VIEW (day_view)); + if (main_item->priv->day_view == day_view) + return; + if (main_item->priv->day_view != NULL) g_object_unref (main_item->priv->day_view); diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c index 3ddc9489d1..02600d0225 100644 --- a/calendar/gui/e-day-view-time-item.c +++ b/calendar/gui/e-day-view-time-item.c @@ -1011,6 +1011,9 @@ e_day_view_time_item_set_day_view (EDayViewTimeItem *time_item, g_return_if_fail (E_IS_DAY_VIEW_TIME_ITEM (time_item)); g_return_if_fail (E_IS_DAY_VIEW (day_view)); + if (time_item->priv->day_view == day_view) + return; + if (time_item->priv->day_view != NULL) g_object_unref (time_item->priv->day_view); diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index b5afbdf4e4..15cfc8079d 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -858,6 +858,9 @@ e_day_view_top_item_set_day_view (EDayViewTopItem *top_item, g_return_if_fail (E_IS_DAY_VIEW_TOP_ITEM (top_item)); g_return_if_fail (E_IS_DAY_VIEW (day_view)); + if (top_item->priv->day_view == day_view) + return; + if (top_item->priv->day_view != NULL) g_object_unref (top_item->priv->day_view); @@ -880,6 +883,9 @@ e_day_view_top_item_set_show_dates (EDayViewTopItem *top_item, { g_return_if_fail (E_IS_DAY_VIEW_TOP_ITEM (top_item)); + if ((top_item->priv->show_dates ? 1 : 0) == (show_dates ? 1 : 0)) + return; + top_item->priv->show_dates = show_dates; g_object_notify (G_OBJECT (top_item), "show-dates"); diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 4d15f03939..da77c4d51d 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -2827,6 +2827,9 @@ e_day_view_marcus_bains_set_show_line (EDayView *day_view, { g_return_if_fail (E_IS_DAY_VIEW (day_view)); + if ((day_view->marcus_bains_show_line ? 1 : 0) == (show_line ? 1 : 0)) + return; + day_view->marcus_bains_show_line = show_line; e_day_view_marcus_bains_update (day_view); @@ -2848,6 +2851,9 @@ e_day_view_marcus_bains_set_day_view_color (EDayView *day_view, { g_return_if_fail (E_IS_DAY_VIEW (day_view)); + if (g_strcmp0 (day_view->marcus_bains_day_view_color, day_view_color) == 0) + return; + g_free (day_view->marcus_bains_day_view_color); day_view->marcus_bains_day_view_color = g_strdup (day_view_color); @@ -2870,6 +2876,9 @@ e_day_view_marcus_bains_set_time_bar_color (EDayView *day_view, { g_return_if_fail (E_IS_DAY_VIEW (day_view)); + if (g_strcmp0 (day_view->marcus_bains_time_bar_color, time_bar_color) == 0) + return; + g_free (day_view->marcus_bains_time_bar_color); day_view->marcus_bains_time_bar_color = g_strdup (time_bar_color); diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c index 6e73107b6f..6d15afc130 100644 --- a/calendar/gui/e-meeting-store.c +++ b/calendar/gui/e-meeting-store.c @@ -879,6 +879,9 @@ e_meeting_store_set_client (EMeetingStore *store, { g_return_if_fail (E_IS_MEETING_STORE (store)); + if (store->priv->client == client) + return; + if (client != NULL) { g_return_if_fail (E_IS_CAL_CLIENT (client)); g_object_ref (client); @@ -906,6 +909,9 @@ e_meeting_store_set_default_reminder_interval (EMeetingStore *store, { g_return_if_fail (E_IS_MEETING_STORE (store)); + if (store->priv->default_reminder_interval == default_reminder_interval) + return; + store->priv->default_reminder_interval = default_reminder_interval; g_object_notify (G_OBJECT (store), "default-reminder-interval"); @@ -925,6 +931,9 @@ e_meeting_store_set_default_reminder_units (EMeetingStore *store, { g_return_if_fail (E_IS_MEETING_STORE (store)); + if (store->priv->default_reminder_units == default_reminder_units) + return; + store->priv->default_reminder_units = default_reminder_units; g_object_notify (G_OBJECT (store), "default-reminder-units"); @@ -944,6 +953,9 @@ e_meeting_store_set_free_busy_template (EMeetingStore *store, { g_return_if_fail (E_IS_MEETING_STORE (store)); + if (g_strcmp0 (store->priv->fb_uri, free_busy_template) == 0) + return; + g_free (store->priv->fb_uri); store->priv->fb_uri = g_strdup (free_busy_template); @@ -964,6 +976,9 @@ e_meeting_store_set_timezone (EMeetingStore *store, { g_return_if_fail (E_IS_MEETING_STORE (store)); + if (store->priv->zone == timezone) + return; + store->priv->zone = timezone; g_object_notify (G_OBJECT (store), "timezone"); @@ -983,6 +998,9 @@ e_meeting_store_set_week_start_day (EMeetingStore *store, { g_return_if_fail (E_IS_MEETING_STORE (store)); + if (store->priv->week_start_day == week_start_day) + return; + store->priv->week_start_day = week_start_day; g_object_notify (G_OBJECT (store), "week-start-day"); diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index a7a5294241..79acc1887a 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -1018,6 +1018,9 @@ e_meeting_time_selector_set_show_week_numbers (EMeetingTimeSelector *mts, { g_return_if_fail (E_IS_MEETING_TIME_SELECTOR (mts)); + if ((mts->priv->show_week_numbers ? 1 : 0) == (show_week_numbers ? 1 : 0)) + return; + mts->priv->show_week_numbers = show_week_numbers; g_object_notify (G_OBJECT (mts), "show-week-numbers"); @@ -1037,6 +1040,9 @@ e_meeting_time_selector_set_use_24_hour_format (EMeetingTimeSelector *mts, { g_return_if_fail (E_IS_MEETING_TIME_SELECTOR (mts)); + if ((mts->priv->use_24_hour_format ? 1 : 0) == (use_24_hour_format ? 1 : 0)) + return; + mts->priv->use_24_hour_format = use_24_hour_format; g_object_notify (G_OBJECT (mts), "use-24-hour-format"); @@ -1056,6 +1062,9 @@ e_meeting_time_selector_set_week_start_day (EMeetingTimeSelector *mts, { g_return_if_fail (E_IS_MEETING_TIME_SELECTOR (mts)); + if (mts->priv->week_start_day == week_start_day) + return; + mts->priv->week_start_day = week_start_day; g_object_notify (G_OBJECT (mts), "week-start-day"); diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c index d8429b844d..41b40dcf3b 100644 --- a/calendar/gui/e-timezone-entry.c +++ b/calendar/gui/e-timezone-entry.c @@ -353,6 +353,9 @@ e_timezone_entry_set_timezone (ETimezoneEntry *timezone_entry, { g_return_if_fail (E_IS_TIMEZONE_ENTRY (timezone_entry)); + if (timezone_entry->priv->timezone == timezone) + return; + timezone_entry->priv->timezone = timezone; timezone_entry_update_entry (timezone_entry); diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index c18ab8db57..13de066ce5 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -1192,6 +1192,9 @@ e_week_view_event_item_set_event_num (EWeekViewEventItem *event_item, { g_return_if_fail (E_IS_WEEK_VIEW_EVENT_ITEM (event_item)); + if (event_item->priv->event_num == event_num) + return; + event_item->priv->event_num = event_num; gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (event_item)); @@ -1212,6 +1215,9 @@ e_week_view_event_item_set_span_num (EWeekViewEventItem *event_item, { g_return_if_fail (E_IS_WEEK_VIEW_EVENT_ITEM (event_item)); + if (event_item->priv->span_num == span_num) + return; + event_item->priv->span_num = span_num; gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (event_item)); diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c index 06ebf68dbe..edf21ccaf6 100644 --- a/calendar/gui/e-week-view-main-item.c +++ b/calendar/gui/e-week-view-main-item.c @@ -477,6 +477,9 @@ e_week_view_main_item_set_week_view (EWeekViewMainItem *main_item, g_return_if_fail (E_IS_WEEK_VIEW_MAIN_ITEM (main_item)); g_return_if_fail (E_IS_WEEK_VIEW (week_view)); + if (main_item->priv->week_view == week_view) + return; + if (main_item->priv->week_view != NULL) g_object_unref (main_item->priv->week_view); diff --git a/calendar/gui/e-week-view-titles-item.c b/calendar/gui/e-week-view-titles-item.c index 40d7391679..0ad78e9cf7 100644 --- a/calendar/gui/e-week-view-titles-item.c +++ b/calendar/gui/e-week-view-titles-item.c @@ -302,6 +302,9 @@ e_week_view_titles_item_set_week_view (EWeekViewTitlesItem *titles_item, g_return_if_fail (E_IS_WEEK_VIEW_TITLES_ITEM (titles_item)); g_return_if_fail (E_IS_WEEK_VIEW (week_view)); + if (titles_item->priv->week_view == week_view) + return; + if (titles_item->priv->week_view != NULL) g_object_unref (titles_item->priv->week_view); diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index ae9ca7a75e..613ab9e5b9 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2033,7 +2033,7 @@ e_week_view_set_compress_weekend (EWeekView *week_view, g_return_if_fail (E_IS_WEEK_VIEW (week_view)); - if (week_view->compress_weekend == compress_weekend) + if ((week_view->compress_weekend ? 1 : 0) == (compress_weekend ? 1 : 0)) return; week_view->compress_weekend = compress_weekend; @@ -2079,7 +2079,7 @@ e_week_view_set_show_event_end_times (EWeekView *week_view, { g_return_if_fail (E_IS_WEEK_VIEW (week_view)); - if (week_view->show_event_end_times == show_event_end_times) + if ((week_view->show_event_end_times ? 1 : 0) == (show_event_end_times ? 1 : 0)) return; week_view->show_event_end_times = show_event_end_times; diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 7b737b69c0..7975d2752b 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1840,6 +1840,9 @@ gnome_calendar_set_view (GnomeCalendar *gcal, g_return_if_fail (GNOME_IS_CALENDAR (gcal)); + if (gcal->priv->current_view_type == view_type) + return; + gcal->priv->current_view_type = view_type; gnome_calendar_set_range_selected (gcal, FALSE); @@ -1970,6 +1973,9 @@ gnome_calendar_set_date_navigator (GnomeCalendar *gcal, { g_return_if_fail (GNOME_IS_CALENDAR (gcal)); + if (gcal->priv->date_navigator == date_navigator) + return; + if (date_navigator != NULL) { g_return_if_fail (E_IS_CALENDAR (date_navigator)); g_object_ref (date_navigator); @@ -2000,6 +2006,9 @@ gnome_calendar_set_memo_table (GnomeCalendar *gcal, { g_return_if_fail (GNOME_IS_CALENDAR (gcal)); + if (gcal->priv->memo_table == memo_table) + return; + if (memo_table != NULL) { g_return_if_fail (E_IS_MEMO_TABLE (memo_table)); g_object_ref (memo_table); @@ -2027,6 +2036,9 @@ gnome_calendar_set_task_table (GnomeCalendar *gcal, { g_return_if_fail (GNOME_IS_CALENDAR (gcal)); + if (gcal->priv->task_table == task_table) + return; + if (task_table != NULL) { g_return_if_fail (E_IS_TASK_TABLE (task_table)); g_object_ref (task_table); diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c index 5ef5e41d15..83c4afd49e 100644 --- a/composer/e-composer-header.c +++ b/composer/e-composer-header.c @@ -379,6 +379,9 @@ e_composer_header_set_sensitive (EComposerHeader *header, { g_return_if_fail (E_IS_COMPOSER_HEADER (header)); + if ((header->priv->sensitive ? 1 : 0) == (sensitive ? 1 : 0)) + return; + header->priv->sensitive = sensitive; g_object_notify (G_OBJECT (header), "sensitive"); @@ -398,6 +401,9 @@ e_composer_header_set_visible (EComposerHeader *header, { g_return_if_fail (E_IS_COMPOSER_HEADER (header)); + if ((header->priv->visible ? 1 : 0) == (visible ? 1 : 0)) + return; + header->priv->visible = visible; g_object_notify (G_OBJECT (header), "visible"); diff --git a/composer/e-composer-post-header.c b/composer/e-composer-post-header.c index cc013244bc..48deadfb70 100644 --- a/composer/e-composer-post-header.c +++ b/composer/e-composer-post-header.c @@ -350,6 +350,9 @@ e_composer_post_header_set_mail_account (EComposerPostHeader *header, g_return_if_fail (E_IS_COMPOSER_POST_HEADER (header)); + if (header->priv->mail_account == mail_account) + return; + if (mail_account != NULL) { g_return_if_fail (E_IS_SOURCE (mail_account)); g_object_ref (mail_account); diff --git a/e-util/e-activity.c b/e-util/e-activity.c index ae34366393..cd1c5699b2 100644 --- a/e-util/e-activity.c +++ b/e-util/e-activity.c @@ -394,6 +394,9 @@ e_activity_set_alert_sink (EActivity *activity, { g_return_if_fail (E_IS_ACTIVITY (activity)); + if (activity->priv->alert_sink == alert_sink) + return; + if (alert_sink != NULL) { g_return_if_fail (E_IS_ALERT_SINK (alert_sink)); g_object_ref (alert_sink); @@ -421,6 +424,9 @@ e_activity_set_cancellable (EActivity *activity, { g_return_if_fail (E_IS_ACTIVITY (activity)); + if (activity->priv->cancellable == cancellable) + return; + if (cancellable != NULL) { g_return_if_fail (G_IS_CANCELLABLE (cancellable)); g_object_ref (cancellable); @@ -459,6 +465,9 @@ e_activity_set_icon_name (EActivity *activity, { g_return_if_fail (E_IS_ACTIVITY (activity)); + if (g_strcmp0 (activity->priv->icon_name, icon_name) == 0) + return; + g_free (activity->priv->icon_name); activity->priv->icon_name = g_strdup (icon_name); @@ -479,6 +488,9 @@ e_activity_set_percent (EActivity *activity, { g_return_if_fail (E_IS_ACTIVITY (activity)); + if (activity->priv->percent == percent) + return; + activity->priv->percent = percent; g_object_notify (G_OBJECT (activity), "percent"); @@ -498,6 +510,9 @@ e_activity_set_state (EActivity *activity, { g_return_if_fail (E_IS_ACTIVITY (activity)); + if (activity->priv->state == state) + return; + activity->priv->state = state; g_object_notify (G_OBJECT (activity), "state"); @@ -517,6 +532,9 @@ e_activity_set_text (EActivity *activity, { g_return_if_fail (E_IS_ACTIVITY (activity)); + if (g_strcmp0 (activity->priv->text, text) == 0) + return; + g_free (activity->priv->text); activity->priv->text = g_strdup (text); diff --git a/e-util/e-ui-manager.c b/e-util/e-ui-manager.c index 98fab98ce5..928697606a 100644 --- a/e-util/e-ui-manager.c +++ b/e-util/e-ui-manager.c @@ -213,6 +213,9 @@ e_ui_manager_set_express_mode (EUIManager *ui_manager, { g_return_if_fail (E_IS_UI_MANAGER (ui_manager)); + if ((ui_manager->priv->express_mode ? 1 : 0) == (express_mode ? 1 : 0)) + return; + ui_manager->priv->express_mode = express_mode; g_object_notify (G_OBJECT (ui_manager), "express-mode"); diff --git a/em-format/e-mail-formatter.c b/em-format/e-mail-formatter.c index 0c8a0e7068..2bf8ac0de7 100644 --- a/em-format/e-mail-formatter.c +++ b/em-format/e-mail-formatter.c @@ -1200,6 +1200,10 @@ e_mail_formatter_set_mark_citations (EMailFormatter *formatter, { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); + if (((E_MAIL_FORMATTER_GET_CLASS (formatter)->text_html_flags + & CAMEL_MIME_FILTER_TOHTML_MARK_CITATION) ? 1 : 0) == (mark_citations ? 1 : 0)) + return; + if (mark_citations) E_MAIL_FORMATTER_GET_CLASS (formatter)->text_html_flags |= CAMEL_MIME_FILTER_TOHTML_MARK_CITATION; @@ -1224,6 +1228,9 @@ e_mail_formatter_set_only_local_photos (EMailFormatter *formatter, { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); + if ((formatter->priv->only_local_photos ? 1 : 0) == (only_local_photos ? 1 : 0)) + return; + formatter->priv->only_local_photos = only_local_photos; g_object_notify (G_OBJECT (formatter), "only-local-photos"); @@ -1243,6 +1250,9 @@ e_mail_formatter_set_show_sender_photo (EMailFormatter *formatter, { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); + if ((formatter->priv->show_sender_photo ? 1 : 0) == (show_sender_photo ? 1 : 0)) + return; + formatter->priv->show_sender_photo = show_sender_photo; g_object_notify (G_OBJECT (formatter), "show-sender-photo"); @@ -1262,6 +1272,9 @@ e_mail_formatter_set_show_real_date (EMailFormatter *formatter, { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); + if ((formatter->priv->show_real_date ? 1 : 0) == (show_real_date ? 1 : 0)) + return; + formatter->priv->show_real_date = show_real_date; g_object_notify (G_OBJECT (formatter), "show-real-date"); @@ -1281,6 +1294,9 @@ e_mail_formatter_set_animate_images (EMailFormatter *formatter, { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); + if ((formatter->priv->animate_images ? 1 : 0) == (animate_images ? 1 : 0)) + return; + formatter->priv->animate_images = animate_images; g_object_notify (G_OBJECT (formatter), "animate-images"); @@ -1301,6 +1317,9 @@ e_mail_formatter_set_charset (EMailFormatter *formatter, g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); g_return_if_fail (charset && *charset); + if (g_strcmp0 (formatter->priv->charset, charset) == 0) + return; + if (formatter->priv->charset) g_free (formatter->priv->charset); @@ -1324,6 +1343,9 @@ e_mail_formatter_set_default_charset (EMailFormatter *formatter, g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); g_return_if_fail (default_charset && *default_charset); + if (g_strcmp0 (formatter->priv->default_charset, default_charset) == 0) + return; + if (formatter->priv->default_charset) g_free (formatter->priv->default_charset); diff --git a/libevolution-utils/e-alert.c b/libevolution-utils/e-alert.c index 7983083103..7d3b5e717f 100644 --- a/libevolution-utils/e-alert.c +++ b/libevolution-utils/e-alert.c @@ -782,6 +782,9 @@ e_alert_set_message_type (EAlert *alert, { g_return_if_fail (E_IS_ALERT (alert)); + if (alert->priv->message_type == message_type) + return; + alert->priv->message_type = message_type; g_object_notify (G_OBJECT (alert), "message-type"); @@ -818,6 +821,9 @@ e_alert_set_primary_text (EAlert *alert, { g_return_if_fail (E_IS_ALERT (alert)); + if (g_strcmp0 (alert->priv->primary_text, primary_text) == 0) + return; + g_free (alert->priv->primary_text); alert->priv->primary_text = g_strdup (primary_text); @@ -855,6 +861,9 @@ e_alert_set_secondary_text (EAlert *alert, { g_return_if_fail (E_IS_ALERT (alert)); + if (g_strcmp0 (alert->priv->secondary_text, secondary_text) == 0) + return; + g_free (alert->priv->secondary_text); alert->priv->secondary_text = g_strdup (secondary_text); diff --git a/mail/e-mail-account-store.c b/mail/e-mail-account-store.c index e22ed99274..c7afce32d4 100644 --- a/mail/e-mail-account-store.c +++ b/mail/e-mail-account-store.c @@ -1093,6 +1093,9 @@ e_mail_account_store_set_express_mode (EMailAccountStore *store, { g_return_if_fail (E_IS_MAIL_ACCOUNT_STORE (store)); + if ((store->priv->express_mode ? 1 : 0) == (express_mode ? 1 : 0)) + return; + store->priv->express_mode = express_mode; g_object_notify (G_OBJECT (store), "express-mode"); diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c index 5b89154885..936b3b520f 100644 --- a/mail/e-mail-browser.c +++ b/mail/e-mail-browser.c @@ -985,6 +985,9 @@ e_mail_browser_set_show_deleted (EMailBrowser *browser, { g_return_if_fail (E_IS_MAIL_BROWSER (browser)); + if ((browser->priv->show_deleted ? 1 : 0) == (show_deleted ? 1 : 0)) + return; + browser->priv->show_deleted = show_deleted; g_object_notify (G_OBJECT (browser), "show-deleted"); diff --git a/mail/e-mail-config-auth-check.c b/mail/e-mail-config-auth-check.c index 22523e5af0..21e6633b76 100644 --- a/mail/e-mail-config-auth-check.c +++ b/mail/e-mail-config-auth-check.c @@ -438,6 +438,9 @@ e_mail_config_auth_check_set_active_mechanism (EMailConfigAuthCheck *auth_check, { g_return_if_fail (E_IS_MAIL_CONFIG_AUTH_CHECK (auth_check)); + if (g_strcmp0 (auth_check->priv->active_mechanism, active_mechanism) == 0) + return; + g_free (auth_check->priv->active_mechanism); auth_check->priv->active_mechanism = g_strdup (active_mechanism); diff --git a/mail/e-mail-config-confirm-page.c b/mail/e-mail-config-confirm-page.c index ac3585ad08..6d276263e4 100644 --- a/mail/e-mail-config-confirm-page.c +++ b/mail/e-mail-config-confirm-page.c @@ -197,6 +197,9 @@ e_mail_config_confirm_page_set_text (EMailConfigConfirmPage *page, { g_return_if_fail (E_IS_MAIL_CONFIG_CONFIRM_PAGE (page)); + if (g_strcmp0 (page->priv->text, (text != NULL) ? text : "") == 0) + return; + g_free (page->priv->text); page->priv->text = g_strdup ((text != NULL) ? text : ""); diff --git a/mail/e-mail-config-identity-page.c b/mail/e-mail-config-identity-page.c index b42f0dd49f..055d449d4b 100644 --- a/mail/e-mail-config-identity-page.c +++ b/mail/e-mail-config-identity-page.c @@ -692,6 +692,9 @@ e_mail_config_identity_page_set_show_account_info (EMailConfigIdentityPage *page { g_return_if_fail (E_IS_MAIL_CONFIG_IDENTITY_PAGE (page)); + if ((page->priv->show_account_info ? 1 : 0) == (show_account_info ? 1 : 0)) + return; + page->priv->show_account_info = show_account_info; g_object_notify (G_OBJECT (page), "show-account-info"); @@ -711,6 +714,9 @@ e_mail_config_identity_page_set_show_instructions (EMailConfigIdentityPage *page { g_return_if_fail (E_IS_MAIL_CONFIG_IDENTITY_PAGE (page)); + if ((page->priv->show_instructions ? 1 : 0) == (show_instructions ? 1 : 0)) + return; + page->priv->show_instructions = show_instructions; g_object_notify (G_OBJECT (page), "show-instructions"); @@ -730,6 +736,9 @@ e_mail_config_identity_page_set_show_signatures (EMailConfigIdentityPage *page, { g_return_if_fail (E_IS_MAIL_CONFIG_IDENTITY_PAGE (page)); + if ((page->priv->show_signatures ? 1 : 0) == (show_signatures ? 1 : 0)) + return; + page->priv->show_signatures = show_signatures; g_object_notify (G_OBJECT (page), "show-signatures"); diff --git a/mail/e-mail-config-service-backend.c b/mail/e-mail-config-service-backend.c index 49019c5fb7..c6c42ae7f5 100644 --- a/mail/e-mail-config-service-backend.c +++ b/mail/e-mail-config-service-backend.c @@ -297,6 +297,9 @@ e_mail_config_service_backend_set_source (EMailConfigServiceBackend *backend, { g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_BACKEND (backend)); + if (backend->priv->source == source) + return; + if (source != NULL) { g_return_if_fail (E_IS_SOURCE (source)); g_object_ref (source); @@ -324,6 +327,9 @@ e_mail_config_service_backend_set_collection (EMailConfigServiceBackend *backend { g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_BACKEND (backend)); + if (backend->priv->collection == collection) + return; + if (collection != NULL) { g_return_if_fail (E_IS_SOURCE (collection)); g_object_ref (collection); diff --git a/mail/e-mail-config-service-notebook.c b/mail/e-mail-config-service-notebook.c index 757cd902da..0043b2c812 100644 --- a/mail/e-mail-config-service-notebook.c +++ b/mail/e-mail-config-service-notebook.c @@ -350,6 +350,9 @@ e_mail_config_service_notebook_set_active_backend (EMailConfigServiceNotebook *n { g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_NOTEBOOK (notebook)); + if (notebook->priv->active_backend == backend) + return; + if (backend != NULL) { g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_BACKEND (backend)); g_object_ref (backend); diff --git a/mail/e-mail-config-service-page.c b/mail/e-mail-config-service-page.c index 5994ebc2bf..dc4eb805bf 100644 --- a/mail/e-mail-config-service-page.c +++ b/mail/e-mail-config-service-page.c @@ -823,6 +823,9 @@ e_mail_config_service_page_set_active_backend (EMailConfigServicePage *page, { g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_PAGE (page)); + if (page->priv->active_backend == backend) + return; + if (backend != NULL) { g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_BACKEND (backend)); g_object_ref (backend); @@ -850,6 +853,9 @@ e_mail_config_service_page_set_email_address (EMailConfigServicePage *page, { g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_PAGE (page)); + if (g_strcmp0 (page->priv->email_address, email_address) == 0) + return; + g_free (page->priv->email_address); page->priv->email_address = g_strdup (email_address); diff --git a/mail/e-mail-config-summary-page.c b/mail/e-mail-config-summary-page.c index 03a9ed19b4..2da138ee4f 100644 --- a/mail/e-mail-config-summary-page.c +++ b/mail/e-mail-config-summary-page.c @@ -875,6 +875,9 @@ e_mail_config_summary_page_set_account_name (EMailConfigSummaryPage *page, if (account_name == NULL) account_name = ""; + if (g_strcmp0 (page->priv->account_name, account_name) == 0) + return; + g_free (page->priv->account_name); page->priv->account_name = g_strdup (account_name); @@ -959,6 +962,9 @@ e_mail_config_summary_page_set_identity_source (EMailConfigSummaryPage *page, { g_return_if_fail (E_IS_MAIL_CONFIG_SUMMARY_PAGE (page)); + if (page->priv->identity_source == identity_source) + return; + if (identity_source != NULL) { g_return_if_fail (E_IS_SOURCE (identity_source)); g_object_ref (identity_source); diff --git a/mail/e-mail-config-welcome-page.c b/mail/e-mail-config-welcome-page.c index 905c42849c..9196bb8c2f 100644 --- a/mail/e-mail-config-welcome-page.c +++ b/mail/e-mail-config-welcome-page.c @@ -195,6 +195,9 @@ e_mail_config_welcome_page_set_text (EMailConfigWelcomePage *page, { g_return_if_fail (E_IS_MAIL_CONFIG_WELCOME_PAGE (page)); + if (g_strcmp0 (page->priv->text, (text != NULL) ? text : "") == 0) + return; + g_free (page->priv->text); page->priv->text = g_strdup ((text != NULL) ? text : ""); diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c index 1b4b284720..d3652c57c3 100644 --- a/mail/e-mail-display.c +++ b/mail/e-mail-display.c @@ -1575,6 +1575,9 @@ e_mail_display_set_parts_list (EMailDisplay *display, { g_return_if_fail (E_IS_MAIL_DISPLAY (display)); + if (display->priv->part_list == part_list) + return; + if (part_list) { g_return_if_fail (E_IS_MAIL_PART_LIST (part_list)); g_object_ref (part_list); @@ -1602,7 +1605,7 @@ e_mail_display_set_headers_collapsable (EMailDisplay *display, { g_return_if_fail (E_IS_MAIL_DISPLAY (display)); - if (display->priv->headers_collapsable == collapsable) + if ((display->priv->headers_collapsable ? 1 : 0) == (collapsable ? 1 : 0)) return; display->priv->headers_collapsable = collapsable; @@ -1628,7 +1631,7 @@ e_mail_display_set_headers_collapsed (EMailDisplay *display, { g_return_if_fail (E_IS_MAIL_DISPLAY (display)); - if (display->priv->headers_collapsed == collapsed) + if ((display->priv->headers_collapsed ? 1 : 0) == (collapsed ? 1 : 0)) return; display->priv->headers_collapsed = collapsed; diff --git a/mail/e-mail-junk-options.c b/mail/e-mail-junk-options.c index e2c670c688..34793dad6a 100644 --- a/mail/e-mail-junk-options.c +++ b/mail/e-mail-junk-options.c @@ -356,6 +356,9 @@ e_mail_junk_options_set_session (EMailJunkOptions *options, { g_return_if_fail (E_IS_MAIL_JUNK_OPTIONS (options)); + if (options->priv->session == session) + return; + if (session != NULL) { g_return_if_fail (E_IS_MAIL_SESSION (session)); g_object_ref (session); diff --git a/mail/e-mail-label-dialog.c b/mail/e-mail-label-dialog.c index 15222cc7b4..839cc75424 100644 --- a/mail/e-mail-label-dialog.c +++ b/mail/e-mail-label-dialog.c @@ -266,6 +266,9 @@ e_mail_label_dialog_set_label_name (EMailLabelDialog *dialog, entry = GTK_ENTRY (dialog->priv->entry); + if (g_strcmp0 (gtk_entry_get_text (entry), label_name) == 0) + return; + gtk_entry_set_text (entry, label_name); g_object_notify (G_OBJECT (dialog), "label-name"); diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index c350b52dd3..5d1c36a0ba 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -4572,6 +4572,9 @@ e_mail_reader_set_forward_style (EMailReader *reader, priv = E_MAIL_READER_GET_PRIVATE (reader); + if (priv->forward_style == style) + return; + priv->forward_style = style; g_object_notify (G_OBJECT (reader), "forward-style"); @@ -4600,7 +4603,7 @@ e_mail_reader_set_group_by_threads (EMailReader *reader, priv = E_MAIL_READER_GET_PRIVATE (reader); - if (group_by_threads == priv->group_by_threads) + if ((group_by_threads ? 1 : 0) == (priv->group_by_threads ? 1 : 0)) return; priv->group_by_threads = group_by_threads; @@ -4635,6 +4638,9 @@ e_mail_reader_set_reply_style (EMailReader *reader, priv = E_MAIL_READER_GET_PRIVATE (reader); + if (priv->reply_style == style) + return; + priv->reply_style = style; g_object_notify (G_OBJECT (reader), "reply-style"); diff --git a/mail/e-mail-tab-picker.c b/mail/e-mail-tab-picker.c index d2267dc142..c5751ca90f 100644 --- a/mail/e-mail-tab-picker.c +++ b/mail/e-mail-tab-picker.c @@ -1252,7 +1252,7 @@ e_mail_tab_picker_set_preview_mode (EMailTabPicker *picker, EMailTabPickerPrivate *priv = picker->priv; - if (priv->preview_mode == preview) + if ((priv->preview_mode ? 1 : 0) == (preview ? 1 : 0)) return; priv->preview_mode = preview; @@ -1333,7 +1333,7 @@ e_mail_tab_picker_enable_drop (EMailTabPicker *picker, { EMailTabPickerPrivate *priv = picker->priv; - if (priv->drop_enabled == enable) + if ((priv->drop_enabled ? 1 : 0) == (enable ? 1 : 0)) return; priv->drop_enabled = enable; diff --git a/mail/e-mail-tab.c b/mail/e-mail-tab.c index d79edf40e8..a2a80436d0 100644 --- a/mail/e-mail-tab.c +++ b/mail/e-mail-tab.c @@ -1459,7 +1459,7 @@ e_mail_tab_set_can_close (EMailTab *tab, { EMailTabPrivate *priv = tab->priv; - if (priv->can_close == can_close) + if ((priv->can_close ? 1 : 0) == (can_close ? 1 : 0)) return; priv->can_close = can_close; @@ -1504,7 +1504,7 @@ e_mail_tab_set_docking (EMailTab *tab, { EMailTabPrivate *priv = tab->priv; - if (priv->docking == docking) + if ((priv->docking ? 1 : 0) == (docking ? 1 : 0)) return; priv->docking = docking; @@ -1815,7 +1815,7 @@ e_mail_tab_set_private (EMailTab *tab, { EMailTabPrivate *priv = tab->priv; - if (priv->private == private) + if ((priv->private ? 1 : 0) == (private ? 1 : 0)) return; priv->private = private; @@ -1840,7 +1840,7 @@ e_mail_tab_set_active (EMailTab *tab, { EMailTabPrivate *priv = tab->priv; - if (priv->active == active) + if ((priv->active ? 1 : 0) == (active ? 1 : 0)) return; priv->active = active; diff --git a/mail/e-mail-tag-editor.c b/mail/e-mail-tag-editor.c index 57db55a5db..da87b18320 100644 --- a/mail/e-mail-tag-editor.c +++ b/mail/e-mail-tag-editor.c @@ -382,7 +382,7 @@ e_mail_tag_editor_set_completed (EMailTagEditor *editor, { g_return_if_fail (E_IS_MAIL_TAG_EDITOR (editor)); - if (completed == editor->priv->completed) + if ((completed ? 1 : 0) == (editor->priv->completed ? 1 : 0)) return; editor->priv->completed = completed; @@ -406,6 +406,9 @@ e_mail_tag_editor_set_week_start_day (EMailTagEditor *editor, g_return_if_fail (E_IS_MAIL_TAG_EDITOR (editor)); g_return_if_fail (week_start_day >= 0 && week_start_day < 7); + if (editor->priv->week_start_day == week_start_day) + return; + editor->priv->week_start_day = week_start_day; g_object_notify (G_OBJECT (editor), "week-start-day"); @@ -425,7 +428,7 @@ e_mail_tag_editor_set_use_24_hour_format (EMailTagEditor *editor, { g_return_if_fail (E_IS_MAIL_TAG_EDITOR (editor)); - if (use_24_hour_format == editor->priv->use_24_hour_format) + if ((use_24_hour_format ? 1 : 0) == (editor->priv->use_24_hour_format ? 1 : 0)) return; editor->priv->use_24_hour_format = use_24_hour_format; diff --git a/mail/e-mail-view.c b/mail/e-mail-view.c index 72884dcc4b..1410d15f4e 100644 --- a/mail/e-mail-view.c +++ b/mail/e-mail-view.c @@ -184,6 +184,9 @@ static void mail_view_set_orientation (EMailView *view, GtkOrientation orientation) { + if (view->priv->orientation == orientation) + return; + view->priv->orientation = orientation; g_object_notify (G_OBJECT (view), "orientation"); @@ -201,6 +204,9 @@ static void mail_view_set_preview_visible (EMailView *view, gboolean preview_visible) { + if ((view->priv->preview_visible ? 1 : 0) == (preview_visible ? 1 : 0)) + return; + view->priv->preview_visible = preview_visible; g_object_notify (G_OBJECT (view), "preview-visible"); @@ -216,6 +222,9 @@ static void mail_view_set_show_deleted (EMailView *view, gboolean show_deleted) { + if ((view->priv->show_deleted ? 1 : 0) == (show_deleted ? 1 : 0)) + return; + view->priv->show_deleted = show_deleted; g_object_notify (G_OBJECT (view), "show-deleted"); @@ -442,6 +451,9 @@ e_mail_view_set_previous_view (EMailView *view, { g_return_if_fail (E_IS_MAIL_VIEW (view)); + if (view->priv->previous_view == previous_view) + return; + if (previous_view != NULL) { g_return_if_fail (E_IS_MAIL_VIEW (previous_view)); g_object_ref (previous_view); diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c index fb4e27d83b..bcbcd722e0 100644 --- a/mail/em-folder-selection-button.c +++ b/mail/em-folder-selection-button.c @@ -437,6 +437,9 @@ em_folder_selection_button_set_session (EMFolderSelectionButton *button, { g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button)); + if (button->priv->session == session) + return; + if (session != NULL) { g_return_if_fail (E_IS_MAIL_SESSION (session)); g_object_ref (session); @@ -464,6 +467,9 @@ em_folder_selection_button_set_caption (EMFolderSelectionButton *button, { g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button)); + if (g_strcmp0 (button->priv->caption, caption) == 0) + return; + g_free (button->priv->caption); button->priv->caption = g_strdup (caption); @@ -488,6 +494,9 @@ em_folder_selection_button_set_folder_uri (EMFolderSelectionButton *button, if (folder_uri != NULL && *folder_uri == '\0') folder_uri = NULL; + if (g_strcmp0 (button->priv->folder_uri, folder_uri) == 0) + return; + g_free (button->priv->folder_uri); button->priv->folder_uri = g_strdup (folder_uri); @@ -510,6 +519,9 @@ em_folder_selection_button_set_store (EMFolderSelectionButton *button, { g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button)); + if (button->priv->store == store) + return; + if (store != NULL) { g_return_if_fail (CAMEL_IS_STORE (store)); g_object_ref (store); @@ -537,6 +549,9 @@ em_folder_selection_button_set_title (EMFolderSelectionButton *button, { g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button)); + if (g_strcmp0 (button->priv->title, title) == 0) + return; + g_free (button->priv->title); button->priv->title = g_strdup (title); diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index b264beef31..f6a16d842a 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -515,6 +515,9 @@ em_folder_tree_model_set_selection (EMFolderTreeModel *model, if (selection != NULL) g_return_if_fail (GTK_IS_TREE_SELECTION (selection)); + if (model->priv->selection == selection) + return; + if (model->priv->selection != NULL) { g_object_weak_unref ( G_OBJECT (model->priv->selection), (GWeakNotify) @@ -546,6 +549,9 @@ em_folder_tree_model_set_session (EMFolderTreeModel *model, { g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model)); + if (model->priv->session == session) + return; + if (session != NULL) { g_return_if_fail (E_IS_MAIL_SESSION (session)); g_object_ref (session); diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c index 05f8bd8d03..d2ce13f099 100644 --- a/modules/addressbook/e-book-shell-content.c +++ b/modules/addressbook/e-book-shell-content.c @@ -121,6 +121,9 @@ static void book_shell_content_set_orientation (EBookShellContent *book_shell_content, GtkOrientation orientation) { + if (book_shell_content->priv->orientation == orientation) + return; + book_shell_content->priv->orientation = orientation; g_object_notify (G_OBJECT (book_shell_content), "orientation"); @@ -700,6 +703,9 @@ e_book_shell_content_set_preview_visible (EBookShellContent *book_shell_content, { g_return_if_fail (E_IS_BOOK_SHELL_CONTENT (book_shell_content)); + if ((book_shell_content->priv->preview_visible ? 1 : 0) == (preview_visible ? 1 : 0)) + return; + book_shell_content->priv->preview_visible = preview_visible; g_object_notify (G_OBJECT (book_shell_content), "preview-visible"); @@ -720,6 +726,9 @@ e_book_shell_content_set_preview_show_maps (EBookShellContent *book_shell_conten { g_return_if_fail (E_IS_BOOK_SHELL_CONTENT (book_shell_content)); + if ((book_shell_content->priv->preview_show_maps ? 1 : 0) == (show_maps ? 1 : 0)) + return; + book_shell_content->priv->preview_show_maps = show_maps; g_object_notify (G_OBJECT (book_shell_content), "preview-show-maps"); diff --git a/modules/bogofilter/evolution-bogofilter.c b/modules/bogofilter/evolution-bogofilter.c index 7d00888565..203142ace4 100644 --- a/modules/bogofilter/evolution-bogofilter.c +++ b/modules/bogofilter/evolution-bogofilter.c @@ -257,6 +257,9 @@ static void bogofilter_set_convert_to_unicode (EBogofilter *extension, gboolean convert_to_unicode) { + if ((extension->convert_to_unicode ? 1 : 0) == (convert_to_unicode ? 1 : 0)) + return; + extension->convert_to_unicode = convert_to_unicode; g_object_notify (G_OBJECT (extension), "convert-to-unicode"); diff --git a/modules/book-config-ldap/e-source-ldap.c b/modules/book-config-ldap/e-source-ldap.c index 88ee6bc634..a491409029 100644 --- a/modules/book-config-ldap/e-source-ldap.c +++ b/modules/book-config-ldap/e-source-ldap.c @@ -463,6 +463,9 @@ e_source_ldap_set_authentication (ESourceLDAP *extension, { g_return_if_fail (E_IS_SOURCE_LDAP (extension)); + if (extension->priv->authentication == authentication) + return; + extension->priv->authentication = authentication; g_object_notify (G_OBJECT (extension), "authentication"); @@ -482,6 +485,9 @@ e_source_ldap_set_can_browse (ESourceLDAP *extension, { g_return_if_fail (E_IS_SOURCE_LDAP (extension)); + if ((extension->priv->can_browse ? 1 : 0) == (can_browse ? 1 : 0)) + return; + extension->priv->can_browse = can_browse; g_object_notify (G_OBJECT (extension), "can-browse"); @@ -518,6 +524,7 @@ e_source_ldap_set_filter (ESourceLDAP *extension, const gchar *filter) { gboolean needs_parens; + gchar *new_filter; g_return_if_fail (E_IS_SOURCE_LDAP (extension)); @@ -528,11 +535,19 @@ e_source_ldap_set_filter (ESourceLDAP *extension, g_mutex_lock (extension->priv->property_lock); - g_free (extension->priv->filter); if (needs_parens) - extension->priv->filter = g_strdup_printf ("(%s)", filter); + new_filter = g_strdup_printf ("(%s)", filter); else - extension->priv->filter = g_strdup (filter); + new_filter = g_strdup (filter); + + if (g_strcmp0 (extension->priv->filter, new_filter) == 0) { + g_mutex_unlock (extension->priv->property_lock); + g_free (new_filter); + return; + } + + g_free (extension->priv->filter); + extension->priv->filter = new_filter; g_mutex_unlock (extension->priv->property_lock); @@ -553,6 +568,9 @@ e_source_ldap_set_limit (ESourceLDAP *extension, { g_return_if_fail (E_IS_SOURCE_LDAP (extension)); + if (extension->priv->limit == limit) + return; + extension->priv->limit = limit; g_object_notify (G_OBJECT (extension), "limit"); @@ -592,6 +610,11 @@ e_source_ldap_set_root_dn (ESourceLDAP *extension, g_mutex_lock (extension->priv->property_lock); + if (g_strcmp0 (extension->priv->root_dn, root_dn) == 0) { + g_mutex_unlock (extension->priv->property_lock); + return; + } + g_free (extension->priv->root_dn); extension->priv->root_dn = e_util_strdup_strip (root_dn); @@ -614,6 +637,9 @@ e_source_ldap_set_scope (ESourceLDAP *extension, { g_return_if_fail (E_IS_SOURCE_LDAP (extension)); + if (extension->priv->scope == scope) + return; + extension->priv->scope = scope; g_object_notify (G_OBJECT (extension), "scope"); @@ -633,6 +659,9 @@ e_source_ldap_set_security (ESourceLDAP *extension, { g_return_if_fail (E_IS_SOURCE_LDAP (extension)); + if (extension->priv->security == security) + return; + extension->priv->security = security; g_object_notify (G_OBJECT (extension), "security"); diff --git a/modules/cal-config-contacts/e-source-contacts.c b/modules/cal-config-contacts/e-source-contacts.c index 32ba589c71..1d2040cd72 100644 --- a/modules/cal-config-contacts/e-source-contacts.c +++ b/modules/cal-config-contacts/e-source-contacts.c @@ -133,6 +133,9 @@ e_source_contacts_set_include_me (ESourceContacts *extension, { g_return_if_fail (E_IS_SOURCE_CONTACTS (extension)); + if ((extension->priv->include_me ? 1 : 0) == (include_me ? 1 : 0)) + return; + extension->priv->include_me = include_me; g_object_notify (G_OBJECT (extension), "include-me"); diff --git a/modules/cal-config-weather/e-source-weather.c b/modules/cal-config-weather/e-source-weather.c index 63db1bc14b..3440224173 100644 --- a/modules/cal-config-weather/e-source-weather.c +++ b/modules/cal-config-weather/e-source-weather.c @@ -212,12 +212,21 @@ void e_source_weather_set_location (ESourceWeather *extension, const gchar *location) { + gchar *new_location; + g_return_if_fail (E_IS_SOURCE_WEATHER (extension)); g_mutex_lock (extension->priv->property_lock); + new_location = e_util_strdup_strip (location); + if (g_strcmp0 (extension->priv->location, new_location) == 0) { + g_mutex_unlock (extension->priv->property_lock); + g_free (new_location); + return; + } + g_free (extension->priv->location); - extension->priv->location = e_util_strdup_strip (location); + extension->priv->location = new_location; g_mutex_unlock (extension->priv->property_lock); @@ -238,6 +247,9 @@ e_source_weather_set_units (ESourceWeather *extension, { g_return_if_fail (E_IS_SOURCE_WEATHER (extension)); + if (extension->priv->units == units) + return; + extension->priv->units = units; g_object_notify (G_OBJECT (extension), "units"); 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"); diff --git a/modules/itip-formatter/e-source-conflict-search.c b/modules/itip-formatter/e-source-conflict-search.c index c2f5eb6e99..4319b572cc 100644 --- a/modules/itip-formatter/e-source-conflict-search.c +++ b/modules/itip-formatter/e-source-conflict-search.c @@ -144,6 +144,9 @@ e_source_conflict_search_set_include_me (ESourceConflictSearch *extension, { g_return_if_fail (E_IS_SOURCE_CONFLICT_SEARCH (extension)); + if ((extension->priv->include_me ? 1 : 0) == (include_me ? 1 : 0)) + return; + extension->priv->include_me = include_me; g_object_notify (G_OBJECT (extension), "include-me"); diff --git a/modules/spamassassin/evolution-spamassassin.c b/modules/spamassassin/evolution-spamassassin.c index 275e921398..0a6330e264 100644 --- a/modules/spamassassin/evolution-spamassassin.c +++ b/modules/spamassassin/evolution-spamassassin.c @@ -339,6 +339,9 @@ static void spam_assassin_set_local_only (ESpamAssassin *extension, gboolean local_only) { + if ((extension->local_only ? 1 : 0) == (local_only ? 1 : 0)) + return; + extension->local_only = local_only; g_object_notify (G_OBJECT (extension), "local-only"); @@ -354,6 +357,9 @@ static void spam_assassin_set_spamc_binary (ESpamAssassin *extension, const gchar *spamc_binary) { + if (g_strcmp0 (extension->spamc_binary, spamc_binary) == 0) + return; + g_free (extension->spamc_binary); extension->spamc_binary = g_strdup (spamc_binary); @@ -370,6 +376,9 @@ static void spam_assassin_set_spamd_binary (ESpamAssassin *extension, const gchar *spamd_binary) { + if (g_strcmp0 (extension->spamd_binary, spamd_binary) == 0) + return; + g_free (extension->spamd_binary); extension->spamd_binary = g_strdup (spamd_binary); @@ -386,6 +395,9 @@ static void spam_assassin_set_socket_path (ESpamAssassin *extension, const gchar *socket_path) { + if (g_strcmp0 (extension->socket_path, socket_path) == 0) + return; + g_free (extension->socket_path); extension->socket_path = g_strdup (socket_path); @@ -402,6 +414,9 @@ static void spam_assassin_set_use_daemon (ESpamAssassin *extension, gboolean use_daemon) { + if ((extension->use_daemon ? 1 : 0) == (use_daemon ? 1 : 0)) + return; + extension->use_daemon = use_daemon; g_object_notify (G_OBJECT (extension), "use-daemon"); diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c index 644293b2a2..9d9ad5a0cb 100644 --- a/shell/e-shell-searchbar.c +++ b/shell/e-shell-searchbar.c @@ -1102,6 +1102,9 @@ e_shell_searchbar_set_express_mode (EShellSearchbar *searchbar, { g_return_if_fail (E_IS_SHELL_SEARCHBAR (searchbar)); + if ((searchbar->priv->express_mode ? 1 : 0) == (express_mode ? 1 : 0)) + return; + searchbar->priv->express_mode = express_mode; /* Emit "notify" on all the properties we override. */ @@ -1139,6 +1142,9 @@ e_shell_searchbar_set_labels_visible (EShellSearchbar *searchbar, { g_return_if_fail (E_IS_SHELL_SEARCHBAR (searchbar)); + if ((searchbar->priv->labels_visible ? 1 : 0) == (labels_visible ? 1 : 0)) + return; + searchbar->priv->labels_visible = labels_visible; g_object_notify (G_OBJECT (searchbar), "labels-visible"); @@ -1162,6 +1168,9 @@ e_shell_searchbar_set_filter_visible (EShellSearchbar *searchbar, { g_return_if_fail (E_IS_SHELL_SEARCHBAR (searchbar)); + if ((searchbar->priv->filter_visible ? 1 : 0) == (filter_visible ? 1 : 0)) + return; + searchbar->priv->filter_visible = filter_visible; g_object_notify (G_OBJECT (searchbar), "filter-visible"); @@ -1189,6 +1198,9 @@ e_shell_searchbar_set_search_hint (EShellSearchbar *searchbar, entry = GTK_ENTRY (searchbar->priv->search_entry); + if (g_strcmp0 (gtk_entry_get_placeholder_text (entry), search_hint) == 0) + return; + gtk_entry_set_placeholder_text (entry, search_hint); g_object_notify (G_OBJECT (searchbar), "search-hint"); @@ -1208,6 +1220,9 @@ e_shell_searchbar_set_search_option (EShellSearchbar *searchbar, { g_return_if_fail (E_IS_SHELL_SEARCHBAR (searchbar)); + if (searchbar->priv->search_option == search_option) + return; + if (search_option != NULL) { g_return_if_fail (GTK_IS_RADIO_ACTION (search_option)); g_object_ref (search_option); @@ -1259,6 +1274,9 @@ e_shell_searchbar_set_search_text (EShellSearchbar *searchbar, if (search_text == NULL) search_text = ""; + if (g_strcmp0 (gtk_entry_get_text (entry), search_text) == 0) + return; + gtk_entry_set_text (entry, search_text); shell_searchbar_update_search_widgets (searchbar); @@ -1280,6 +1298,9 @@ e_shell_searchbar_set_search_visible (EShellSearchbar *searchbar, { g_return_if_fail (E_IS_SHELL_SEARCHBAR (searchbar)); + if ((searchbar->priv->search_visible ? 1 : 0) == (search_visible ? 1 : 0)) + return; + searchbar->priv->search_visible = search_visible; g_object_notify (G_OBJECT (searchbar), "search-visible"); @@ -1321,6 +1342,9 @@ e_shell_searchbar_set_scope_visible (EShellSearchbar *searchbar, { g_return_if_fail (E_IS_SHELL_SEARCHBAR (searchbar)); + if ((searchbar->priv->scope_visible ? 1 : 0) == (scope_visible ? 1 : 0)) + return; + searchbar->priv->scope_visible = scope_visible; g_object_notify (G_OBJECT (searchbar), "scope-visible"); @@ -1351,6 +1375,9 @@ e_shell_searchbar_set_state_group (EShellSearchbar *searchbar, if (state_group == NULL) state_group = STATE_GROUP_DEFAULT; + if (g_strcmp0 (searchbar->priv->state_group, state_group) == 0) + return; + g_free (searchbar->priv->state_group); searchbar->priv->state_group = g_strdup (state_group); diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c index bae19f1309..6338e9886d 100644 --- a/shell/e-shell-settings.c +++ b/shell/e-shell-settings.c @@ -48,6 +48,60 @@ static GList *instances; static guint property_count; static gpointer parent_class; +static gboolean +shell_settings_value_equal (const GValue *v1, + const GValue *v2, + gboolean is_debug) +{ + if (!v1 || !v2) + return v1 == v2; + + if (G_VALUE_HOLDS_STRING (v1) && + G_VALUE_HOLDS_STRING (v2)) { + return g_strcmp0 (g_value_get_string (v1), + g_value_get_string (v2)) == 0; + } else if (G_VALUE_HOLDS_UCHAR (v1) && + G_VALUE_HOLDS_UCHAR (v2)) { + return g_value_get_uchar (v1) == g_value_get_uchar (v2); + } else if (G_VALUE_HOLDS_CHAR (v1) && + G_VALUE_HOLDS_CHAR (v2)) { + return g_value_get_schar (v1) == g_value_get_schar (v2); + } else if (G_VALUE_HOLDS_INT (v1) && + G_VALUE_HOLDS_INT (v2)) { + return g_value_get_int (v1) == g_value_get_int (v2); + } else if (G_VALUE_HOLDS_UINT (v1) && + G_VALUE_HOLDS_UINT (v2)) { + return g_value_get_uint (v1) == g_value_get_uint (v2); + } else if (G_VALUE_HOLDS_LONG (v1) && + G_VALUE_HOLDS_LONG (v2)) { + return g_value_get_long (v1) == g_value_get_long (v2); + } else if (G_VALUE_HOLDS_ULONG (v1) && + G_VALUE_HOLDS_ULONG (v2)) { + return g_value_get_ulong (v1) == g_value_get_ulong (v2); + } else if (G_VALUE_HOLDS_INT64 (v1) && + G_VALUE_HOLDS_INT64 (v2)) { + return g_value_get_int64 (v1) == g_value_get_int64 (v2); + } else if (G_VALUE_HOLDS_UINT64 (v1) && + G_VALUE_HOLDS_UINT64 (v2)) { + return g_value_get_uint64 (v1) == g_value_get_uint64 (v2); + } else if (G_VALUE_HOLDS_DOUBLE (v1) && + G_VALUE_HOLDS_DOUBLE (v2)) { + return g_value_get_double (v1) == g_value_get_double (v2); + } else if (G_VALUE_HOLDS_BOOLEAN (v1) && + G_VALUE_HOLDS_BOOLEAN (v2)) { + return (g_value_get_boolean (v1) ? 1 : 0) == (g_value_get_boolean (v2) ? 1 : 0); + } else if (G_VALUE_HOLDS_POINTER (v1) && + G_VALUE_HOLDS_POINTER (v2)) { + return g_value_get_pointer (v1) == g_value_get_pointer (v2); + } + + if (is_debug) + g_debug ("%s: Cannot compare '%s' with '%s'", + G_STRFUNC, G_VALUE_TYPE_NAME (v1), G_VALUE_TYPE_NAME (v2)); + + return FALSE; +} + static GParamSpec * shell_settings_pspec_for_key (const gchar *property_name, const gchar *schema, @@ -151,6 +205,12 @@ shell_settings_set_property (GObject *object, dest_value = &g_array_index ( priv->value_array, GValue, property_id - 1); + if (shell_settings_value_equal (value, dest_value, priv->debug)) { + if (priv->debug) + g_debug ("Setting '%s' set, but it didn't change", pspec->name); + return; + } + g_value_copy (value, dest_value); g_object_notify (object, pspec->name); diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c index d869a2a63a..362321069a 100644 --- a/shell/e-shell-sidebar.c +++ b/shell/e-shell-sidebar.c @@ -594,6 +594,9 @@ e_shell_sidebar_set_icon_name (EShellSidebar *shell_sidebar, { g_return_if_fail (E_IS_SHELL_SIDEBAR (shell_sidebar)); + if (g_strcmp0 (shell_sidebar->priv->icon_name, icon_name) == 0) + return; + g_free (shell_sidebar->priv->icon_name); shell_sidebar->priv->icon_name = g_strdup (icon_name); @@ -637,6 +640,9 @@ e_shell_sidebar_set_primary_text (EShellSidebar *shell_sidebar, { g_return_if_fail (E_IS_SHELL_SIDEBAR (shell_sidebar)); + if (g_strcmp0 (shell_sidebar->priv->primary_text, primary_text) == 0) + return; + g_free (shell_sidebar->priv->primary_text); shell_sidebar->priv->primary_text = e_utf8_ensure_valid (primary_text); @@ -683,6 +689,9 @@ e_shell_sidebar_set_secondary_text (EShellSidebar *shell_sidebar, { g_return_if_fail (E_IS_SHELL_SIDEBAR (shell_sidebar)); + if (g_strcmp0 (shell_sidebar->priv->secondary_text, secondary_text) == 0) + return; + g_free (shell_sidebar->priv->secondary_text); shell_sidebar->priv->secondary_text = e_utf8_ensure_valid (secondary_text); diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c index efbc311945..b2830cac02 100644 --- a/shell/e-shell-switcher.c +++ b/shell/e-shell-switcher.c @@ -773,6 +773,9 @@ e_shell_switcher_set_visible (EShellSwitcher *switcher, g_return_if_fail (E_IS_SHELL_SWITCHER (switcher)); + if ((switcher->priv->toolbar_visible ? 1 : 0) == (visible ? 1 : 0)) + return; + switcher->priv->toolbar_visible = visible; for (iter = switcher->priv->proxies; iter != NULL; iter = iter->next) diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index fdad1cbd19..06e99a8270 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -1367,6 +1367,9 @@ e_shell_view_set_page_num (EShellView *shell_view, { g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); + if (shell_view->priv->page_num == page_num) + return; + shell_view->priv->page_num = page_num; g_object_notify (G_OBJECT (shell_view), "page-num"); @@ -1440,6 +1443,9 @@ e_shell_view_set_search_rule (EShellView *shell_view, { g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); + if (shell_view->priv->search_rule == search_rule) + return; + if (search_rule != NULL) { g_return_if_fail (E_IS_FILTER_RULE (search_rule)); g_object_ref (search_rule); diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 572fbaf4f3..a0404f9915 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -537,6 +537,9 @@ e_shell_window_switch_to_view (EShellWindow *shell_window, g_return_if_fail (E_IS_SHELL_WINDOW (shell_window)); g_return_if_fail (view_name != NULL); + if (shell_window->priv->active_view == view_name) + return; + shell_view = e_shell_window_get_shell_view (shell_window, view_name); shell_window->priv->active_view = view_name; 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"); diff --git a/shell/e-shell.c b/shell/e-shell.c index 7ab685ab27..0f11c16903 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -1744,7 +1744,7 @@ e_shell_set_network_available (EShell *shell, if (shell->priv->network_available_locked) return; - if (network_available == shell->priv->network_available) + if ((network_available ? 1 : 0) == (shell->priv->network_available ? 1 : 0)) return; shell->priv->network_available = network_available; diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c index d7c90df330..ed9fb02105 100644 --- a/widgets/misc/e-attachment-bar.c +++ b/widgets/misc/e-attachment-bar.c @@ -759,6 +759,9 @@ e_attachment_bar_set_expanded (EAttachmentBar *bar, { g_return_if_fail (E_IS_ATTACHMENT_BAR (bar)); + if ((bar->priv->expanded ? 1 : 0) == (expanded ? 1 : 0)) + return; + bar->priv->expanded = expanded; g_object_notify (G_OBJECT (bar), "expanded"); diff --git a/widgets/misc/e-attachment-button.c b/widgets/misc/e-attachment-button.c index d3aa4a6350..d3fda0985a 100644 --- a/widgets/misc/e-attachment-button.c +++ b/widgets/misc/e-attachment-button.c @@ -834,6 +834,9 @@ e_attachment_button_set_expandable (EAttachmentButton *button, { g_return_if_fail (E_IS_ATTACHMENT_BUTTON (button)); + if ((button->priv->expandable ? 1 : 0) == (expandable ? 1 : 0)) + return; + button->priv->expandable = expandable; if (!expandable) @@ -856,6 +859,9 @@ e_attachment_button_set_expanded (EAttachmentButton *button, { g_return_if_fail (E_IS_ATTACHMENT_BUTTON (button)); + if ((button->priv->expanded ? 1 : 0) == (expanded ? 1 : 0)) + return; + button->priv->expanded = expanded; g_object_notify (G_OBJECT (button), "expanded"); diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c index c0048fcd31..119c66e6f2 100644 --- a/widgets/misc/e-attachment-paned.c +++ b/widgets/misc/e-attachment-paned.c @@ -843,6 +843,9 @@ e_attachment_paned_set_expanded (EAttachmentPaned *paned, { g_return_if_fail (E_IS_ATTACHMENT_PANED (paned)); + if ((paned->priv->expanded ? 1 : 0) == (expanded ? 1 : 0)) + return; + paned->priv->expanded = expanded; g_object_notify (G_OBJECT (paned), "expanded"); @@ -862,6 +865,9 @@ e_attachment_paned_set_resize_toplevel (EAttachmentPaned *paned, { g_return_if_fail (E_IS_ATTACHMENT_PANED (paned)); + if ((paned->priv->resize_toplevel ? 1 : 0) == (resize_toplevel ? 1 : 0)) + return; + paned->priv->resize_toplevel = resize_toplevel; g_object_notify (G_OBJECT (paned), "resize-toplevel"); diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 38b1900e03..60b6b42d35 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -1050,7 +1050,7 @@ e_date_edit_set_show_date (EDateEdit *dedit, priv = dedit->priv; - if (priv->show_date == show_date) + if ((priv->show_date ? 1 : 0) == (show_date ? 1 : 0)) return; priv->show_date = show_date; @@ -1107,7 +1107,7 @@ e_date_edit_set_show_time (EDateEdit *dedit, priv = dedit->priv; - if (priv->show_time == show_time) + if ((priv->show_time ? 1 : 0) == (show_time ? 1 : 0)) return; priv->show_time = show_time; @@ -1250,7 +1250,7 @@ e_date_edit_set_use_24_hour_format (EDateEdit *dedit, { g_return_if_fail (E_IS_DATE_EDIT (dedit)); - if (dedit->priv->use_24_hour_format == use_24_hour_format) + if ((dedit->priv->use_24_hour_format ? 1 : 0) == (use_24_hour_format ? 1 : 0)) return; dedit->priv->use_24_hour_format = use_24_hour_format; @@ -1278,6 +1278,9 @@ e_date_edit_set_allow_no_date_set (EDateEdit *dedit, { g_return_if_fail (E_IS_DATE_EDIT (dedit)); + if ((dedit->priv->allow_no_date_set ? 1 : 0) == (allow_no_date_set ? 1 : 0)) + return; + dedit->priv->allow_no_date_set = allow_no_date_set; if (!allow_no_date_set) { diff --git a/widgets/misc/e-mail-signature-combo-box.c b/widgets/misc/e-mail-signature-combo-box.c index 40f0d77744..d7a7039344 100644 --- a/widgets/misc/e-mail-signature-combo-box.c +++ b/widgets/misc/e-mail-signature-combo-box.c @@ -381,6 +381,9 @@ e_mail_signature_combo_box_set_identity_uid (EMailSignatureComboBox *combo_box, g_return_if_fail (E_IS_MAIL_SIGNATURE_COMBO_BOX (combo_box)); + if (g_strcmp0 (combo_box->priv->identity_uid, identity_uid) == 0) + return; + g_free (combo_box->priv->identity_uid); combo_box->priv->identity_uid = g_strdup (identity_uid); diff --git a/widgets/misc/e-mail-signature-manager.c b/widgets/misc/e-mail-signature-manager.c index 0392316756..425fbca33a 100644 --- a/widgets/misc/e-mail-signature-manager.c +++ b/widgets/misc/e-mail-signature-manager.c @@ -690,6 +690,9 @@ e_mail_signature_manager_set_prefer_html (EMailSignatureManager *manager, { g_return_if_fail (E_IS_MAIL_SIGNATURE_MANAGER (manager)); + if ((manager->priv->prefer_html ? 1 : 0) == (prefer_html ? 1 : 0)) + return; + manager->priv->prefer_html = prefer_html; g_object_notify (G_OBJECT (manager), "prefer-html"); diff --git a/widgets/misc/e-online-button.c b/widgets/misc/e-online-button.c index 07ff998dc3..41b81f4b94 100644 --- a/widgets/misc/e-online-button.c +++ b/widgets/misc/e-online-button.c @@ -190,6 +190,9 @@ e_online_button_set_online (EOnlineButton *button, g_return_if_fail (E_IS_ONLINE_BUTTON (button)); + if ((button->priv->online ? 1 : 0) == (online ? 1 : 0)) + return; + button->priv->online = online; image = GTK_IMAGE (button->priv->image); diff --git a/widgets/misc/e-popup-action.c b/widgets/misc/e-popup-action.c index 2fd000ccad..f5d8445d77 100644 --- a/widgets/misc/e-popup-action.c +++ b/widgets/misc/e-popup-action.c @@ -139,6 +139,9 @@ popup_action_set_use_action_appearance (EPopupAction *popup_action, GtkActivatable *activatable; GtkAction *related_action; + if ((popup_action->priv->use_action_appearance ? 1 : 0) == (use_action_appearance ? 1 : 0)) + return; + popup_action->priv->use_action_appearance = use_action_appearance; g_object_notify (G_OBJECT (popup_action), "use-action-appearance"); diff --git a/widgets/misc/e-port-entry.c b/widgets/misc/e-port-entry.c index cf857b5d55..f007731433 100644 --- a/widgets/misc/e-port-entry.c +++ b/widgets/misc/e-port-entry.c @@ -468,6 +468,9 @@ e_port_entry_set_security_method (EPortEntry *port_entry, { g_return_if_fail (E_IS_PORT_ENTRY (port_entry)); + if (port_entry->priv->method == method) + return; + port_entry->priv->method = method; port_entry_method_changed (port_entry); diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c index 9cf4f669dd..8ace48ca1d 100644 --- a/widgets/misc/e-web-view.c +++ b/widgets/misc/e-web-view.c @@ -2205,6 +2205,9 @@ e_web_view_set_caret_mode (EWebView *web_view, { g_return_if_fail (E_IS_WEB_VIEW (web_view)); + if ((web_view->priv->caret_mode ? 1 : 0) == (caret_mode ? 1 : 0)) + return; + web_view->priv->caret_mode = caret_mode; g_object_notify (G_OBJECT (web_view), "caret-mode"); @@ -2233,6 +2236,9 @@ e_web_view_set_disable_printing (EWebView *web_view, { g_return_if_fail (E_IS_WEB_VIEW (web_view)); + if ((web_view->priv->disable_printing ? 1 : 0) == (disable_printing ? 1 : 0)) + return; + web_view->priv->disable_printing = disable_printing; g_object_notify (G_OBJECT (web_view), "disable-printing"); @@ -2252,6 +2258,9 @@ e_web_view_set_disable_save_to_disk (EWebView *web_view, { g_return_if_fail (E_IS_WEB_VIEW (web_view)); + if ((web_view->priv->disable_save_to_disk ? 1 : 0) == (disable_save_to_disk ? 1 : 0)) + return; + web_view->priv->disable_save_to_disk = disable_save_to_disk; g_object_notify (G_OBJECT (web_view), "disable-save-to-disk"); @@ -2416,6 +2425,9 @@ e_web_view_set_selected_uri (EWebView *web_view, { g_return_if_fail (E_IS_WEB_VIEW (web_view)); + if (g_strcmp0 (web_view->priv->selected_uri, selected_uri) == 0) + return; + g_free (web_view->priv->selected_uri); web_view->priv->selected_uri = g_strdup (selected_uri); @@ -2436,6 +2448,9 @@ e_web_view_set_cursor_image (EWebView *web_view, { g_return_if_fail (E_IS_WEB_VIEW (web_view)); + if (web_view->priv->cursor_image == image) + return; + if (image != NULL) g_object_ref (image); @@ -2461,6 +2476,9 @@ e_web_view_set_cursor_image_src (EWebView *web_view, { g_return_if_fail (E_IS_WEB_VIEW (web_view)); + if (g_strcmp0 (web_view->priv->cursor_image_src, src_uri) == 0) + return; + g_free (web_view->priv->cursor_image_src); web_view->priv->cursor_image_src = g_strdup (src_uri); @@ -2481,6 +2499,9 @@ e_web_view_set_open_proxy (EWebView *web_view, { g_return_if_fail (E_IS_WEB_VIEW (web_view)); + if (web_view->priv->open_proxy == open_proxy) + return; + if (open_proxy != NULL) { g_return_if_fail (GTK_IS_ACTION (open_proxy)); g_object_ref (open_proxy); @@ -2517,6 +2538,9 @@ e_web_view_set_print_proxy (EWebView *web_view, { g_return_if_fail (E_IS_WEB_VIEW (web_view)); + if (web_view->priv->print_proxy == print_proxy) + return; + if (print_proxy != NULL) { g_return_if_fail (GTK_IS_ACTION (print_proxy)); g_object_ref (print_proxy); @@ -2544,6 +2568,9 @@ e_web_view_set_save_as_proxy (EWebView *web_view, { g_return_if_fail (E_IS_WEB_VIEW (web_view)); + if (web_view->priv->save_as_proxy == save_as_proxy) + return; + if (save_as_proxy != NULL) { g_return_if_fail (GTK_IS_ACTION (save_as_proxy)); g_object_ref (save_as_proxy); |