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 | |
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')
-rw-r--r-- | calendar/gui/dialogs/comp-editor-page.c | 3 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 30 | ||||
-rw-r--r-- | calendar/gui/e-cal-model-tasks.c | 6 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.c | 30 | ||||
-rw-r--r-- | calendar/gui/e-calendar-view.c | 3 | ||||
-rw-r--r-- | calendar/gui/e-cell-date-edit-text.c | 6 | ||||
-rw-r--r-- | calendar/gui/e-date-time-list.c | 3 | ||||
-rw-r--r-- | calendar/gui/e-day-view-main-item.c | 3 | ||||
-rw-r--r-- | calendar/gui/e-day-view-time-item.c | 3 | ||||
-rw-r--r-- | calendar/gui/e-day-view-top-item.c | 6 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 9 | ||||
-rw-r--r-- | calendar/gui/e-meeting-store.c | 18 | ||||
-rw-r--r-- | calendar/gui/e-meeting-time-sel.c | 9 | ||||
-rw-r--r-- | calendar/gui/e-timezone-entry.c | 3 | ||||
-rw-r--r-- | calendar/gui/e-week-view-event-item.c | 6 | ||||
-rw-r--r-- | calendar/gui/e-week-view-main-item.c | 3 | ||||
-rw-r--r-- | calendar/gui/e-week-view-titles-item.c | 3 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 4 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 12 |
19 files changed, 158 insertions, 2 deletions
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); |