diff -up evolution-3.8.5/addressbook/gui/contact-editor/e-contact-editor.c.labels-gsettings-busy-loop evolution-3.8.5/addressbook/gui/contact-editor/e-contact-editor.c
--- evolution-3.8.5/addressbook/gui/contact-editor/e-contact-editor.c.labels-gsettings-busy-loop 2014-06-05 12:50:43.380256027 +0200
+++ evolution-3.8.5/addressbook/gui/contact-editor/e-contact-editor.c 2014-06-05 12:50:44.137250570 +0200
@@ -4428,7 +4428,7 @@ e_contact_editor_set_property (GObject *
editor->target_client = editor->source_client;
g_object_ref (editor->target_client);
- editor->target_editable_id = g_signal_connect (
+ editor->target_editable_id = e_signal_connect_notify (
editor->target_client, "notify::readonly",
G_CALLBACK (notify_readonly_cb), editor);
@@ -4475,7 +4475,7 @@ e_contact_editor_set_property (GObject *
editor->target_client = target_client;
g_object_ref (editor->target_client);
- editor->target_editable_id = g_signal_connect (
+ editor->target_editable_id = e_signal_connect_notify (
editor->target_client, "notify::readonly",
G_CALLBACK (notify_readonly_cb), editor);
diff -up evolution-3.8.5/addressbook/gui/contact-list-editor/e-contact-list-editor.c.labels-gsettings-busy-loop evolution-3.8.5/addressbook/gui/contact-list-editor/e-contact-list-editor.c
--- evolution-3.8.5/addressbook/gui/contact-list-editor/e-contact-list-editor.c.labels-gsettings-busy-loop 2013-08-10 23:38:42.000000000 +0200
+++ evolution-3.8.5/addressbook/gui/contact-list-editor/e-contact-list-editor.c 2014-06-05 12:50:44.138250560 +0200
@@ -1474,10 +1474,10 @@ contact_list_editor_constructed (GObject
e_name_selector_peek_model (editor->priv->name_selector),
"Members", _("_Members"), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
editor, "notify::book",
G_CALLBACK (contact_list_editor_notify_cb), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
editor, "notify::editable",
G_CALLBACK (contact_list_editor_notify_cb), NULL);
diff -up evolution-3.8.5/addressbook/gui/widgets/eab-contact-display.c.labels-gsettings-busy-loop evolution-3.8.5/addressbook/gui/widgets/eab-contact-display.c
--- evolution-3.8.5/addressbook/gui/widgets/eab-contact-display.c.labels-gsettings-busy-loop 2013-07-23 14:52:21.000000000 +0200
+++ evolution-3.8.5/addressbook/gui/widgets/eab-contact-display.c 2014-06-05 12:50:44.138250560 +0200
@@ -514,7 +514,7 @@ eab_contact_display_init (EABContactDisp
web_view, "create-plugin-widget",
G_CALLBACK (contact_display_object_requested), display);
#endif
- g_signal_connect (
+ e_signal_connect_notify (
web_view, "notify::load-status",
G_CALLBACK (contact_display_load_status_changed), NULL);
g_signal_connect (
diff -up evolution-3.8.5/addressbook/gui/widgets/e-contact-map-window.c.labels-gsettings-busy-loop evolution-3.8.5/addressbook/gui/widgets/e-contact-map-window.c
--- evolution-3.8.5/addressbook/gui/widgets/e-contact-map-window.c.labels-gsettings-busy-loop 2013-07-23 14:52:22.000000000 +0200
+++ evolution-3.8.5/addressbook/gui/widgets/e-contact-map-window.c 2014-06-05 12:50:44.138250560 +0200
@@ -370,7 +370,7 @@ e_contact_map_window_init (EContactMapWi
view = e_contact_map_get_view (E_CONTACT_MAP (map));
champlain_view_set_zoom_level (view, 2);
priv->map = E_CONTACT_MAP (map);
- g_signal_connect (
+ e_signal_connect_notify (
view, "notify::zoom-level",
G_CALLBACK (zoom_level_changed_cb), window);
g_signal_connect (
diff -up evolution-3.8.5/addressbook/gui/widgets/e-contact-marker.c.labels-gsettings-busy-loop evolution-3.8.5/addressbook/gui/widgets/e-contact-marker.c
--- evolution-3.8.5/addressbook/gui/widgets/e-contact-marker.c.labels-gsettings-busy-loop 2013-07-23 14:52:21.000000000 +0200
+++ evolution-3.8.5/addressbook/gui/widgets/e-contact-marker.c 2014-06-05 12:50:44.138250560 +0200
@@ -584,7 +584,7 @@ e_contact_marker_init (EContactMarker *m
priv->total_width = 0;
priv->total_height = 0;
- g_signal_connect (
+ e_signal_connect_notify (
marker, "notify::selected",
G_CALLBACK (notify_selected), NULL);
g_signal_connect (
diff -up evolution-3.8.5/calendar/gui/dialogs/recurrence-page.c.labels-gsettings-busy-loop evolution-3.8.5/calendar/gui/dialogs/recurrence-page.c
--- evolution-3.8.5/calendar/gui/dialogs/recurrence-page.c.labels-gsettings-busy-loop 2013-07-23 14:52:34.000000000 +0200
+++ evolution-3.8.5/calendar/gui/dialogs/recurrence-page.c 2014-06-05 12:50:44.139250548 +0200
@@ -283,7 +283,7 @@ recurrence_page_constructor (GType type,
/* Keep the calendar updated as the user twizzles widgets. */
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (object));
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
editor, "notify::changed",
G_CALLBACK (preview_recur), object);
@@ -2530,7 +2530,7 @@ recurrence_page_construct (RecurrencePag
init_widgets (rpage);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
editor, "notify::client",
G_CALLBACK (sensitize_buttons), rpage);
diff -up evolution-3.8.5/calendar/gui/dialogs/schedule-page.c.labels-gsettings-busy-loop evolution-3.8.5/calendar/gui/dialogs/schedule-page.c
--- evolution-3.8.5/calendar/gui/dialogs/schedule-page.c.labels-gsettings-busy-loop 2013-07-23 14:52:34.000000000 +0200
+++ evolution-3.8.5/calendar/gui/dialogs/schedule-page.c 2014-06-05 12:50:44.139250548 +0200
@@ -430,7 +430,7 @@ schedule_page_construct (SchedulePage *s
return NULL;
}
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
editor, "notify::client",
G_CALLBACK (sensitize_widgets), spage);
diff -up evolution-3.8.5/calendar/gui/dialogs/task-details-page.c.labels-gsettings-busy-loop evolution-3.8.5/calendar/gui/dialogs/task-details-page.c
--- evolution-3.8.5/calendar/gui/dialogs/task-details-page.c.labels-gsettings-busy-loop 2013-07-23 14:52:32.000000000 +0200
+++ evolution-3.8.5/calendar/gui/dialogs/task-details-page.c 2014-06-05 12:50:44.139250548 +0200
@@ -759,7 +759,7 @@ task_details_page_construct (TaskDetails
init_widgets (tdpage);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
editor, "notify::client",
G_CALLBACK (sensitize_widgets), tdpage);
diff -up evolution-3.8.5/calendar/gui/e-cal-list-view.c.labels-gsettings-busy-loop evolution-3.8.5/calendar/gui/e-cal-list-view.c
--- evolution-3.8.5/calendar/gui/e-cal-list-view.c.labels-gsettings-busy-loop 2013-07-23 14:52:32.000000000 +0200
+++ evolution-3.8.5/calendar/gui/e-cal-list-view.c 2014-06-05 12:50:44.139250548 +0200
@@ -339,7 +339,7 @@ setup_e_table (ECalListView *cal_list_vi
cal_list_view->table, "cursor_change",
G_CALLBACK (e_cal_list_view_cursor_change_cb),
cal_list_view);
- g_signal_connect_after (
+ e_signal_connect_notify_after (
cal_list_view->table, "notify::is-editing",
G_CALLBACK (e_cal_list_view_table_editing_changed_cb),
cal_list_view);
diff -up evolution-3.8.5/calendar/gui/e-day-view.c.labels-gsettings-busy-loop evolution-3.8.5/calendar/gui/e-day-view.c
--- evolution-3.8.5/calendar/gui/e-day-view.c.labels-gsettings-busy-loop 2014-06-05 12:50:43.912252173 +0200
+++ evolution-3.8.5/calendar/gui/e-day-view.c 2014-06-05 12:50:44.140250537 +0200
@@ -92,7 +92,11 @@
#define E_DAY_VIEW_MAX_ROWS_AT_TOP 6
struct _EDayViewPrivate {
- gint placeholder;
+ gulong notify_week_start_day_id;
+ gulong notify_work_day_start_hour_id;
+ gulong notify_work_day_start_minute_id;
+ gulong notify_work_day_end_hour_id;
+ gulong notify_work_day_end_minute_id;
};
typedef struct {
@@ -749,6 +753,12 @@ day_view_dispose (GObject *object)
if (model) {
g_signal_handlers_disconnect_by_data (model, day_view);
g_signal_handlers_disconnect_by_data (model, day_view->main_canvas);
+
+ e_signal_disconnect_notify_handler (model, &day_view->priv->notify_week_start_day_id);
+ e_signal_disconnect_notify_handler (model, &day_view->priv->notify_work_day_start_hour_id);
+ e_signal_disconnect_notify_handler (model, &day_view->priv->notify_work_day_start_minute_id);
+ e_signal_disconnect_notify_handler (model, &day_view->priv->notify_work_day_end_hour_id);
+ e_signal_disconnect_notify_handler (model, &day_view->priv->notify_work_day_end_minute_id);
}
e_day_view_cancel_layout (day_view);
@@ -826,27 +836,27 @@ day_view_constructed (GObject *object)
model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
day_view, "notify::time-divisions",
G_CALLBACK (day_view_notify_time_divisions_cb), day_view);
- g_signal_connect_swapped (
+ day_view->priv->notify_week_start_day_id = e_signal_connect_notify_swapped (
model, "notify::week-start-day",
G_CALLBACK (day_view_notify_week_start_day_cb), day_view);
- g_signal_connect_swapped (
+ day_view->priv->notify_work_day_start_hour_id = e_signal_connect_notify_swapped (
model, "notify::work-day-start-hour",
G_CALLBACK (gtk_widget_queue_draw), day_view->main_canvas);
- g_signal_connect_swapped (
+ day_view->priv->notify_work_day_start_minute_id = e_signal_connect_notify_swapped (
model, "notify::work-day-start-minute",
G_CALLBACK (gtk_widget_queue_draw), day_view->main_canvas);
- g_signal_connect_swapped (
+ day_view->priv->notify_work_day_end_hour_id = e_signal_connect_notify_swapped (
model, "notify::work-day-end-hour",
G_CALLBACK (gtk_widget_queue_draw), day_view->main_canvas);
- g_signal_connect_swapped (
+ day_view->priv->notify_work_day_end_minute_id = e_signal_connect_notify_swapped (
model, "notify::work-day-end-minute",
G_CALLBACK (gtk_widget_queue_draw), day_view->main_canvas);
}
diff -up evolution-3.8.5/calendar/gui/e-day-view-time-item.c.labels-gsettings-busy-loop evolution-3.8.5/calendar/gui/e-day-view-time-item.c
--- evolution-3.8.5/calendar/gui/e-day-view-time-item.c.labels-gsettings-busy-loop 2014-06-05 12:53:12.275165090 +0200
+++ evolution-3.8.5/calendar/gui/e-day-view-time-item.c 2014-06-05 12:53:23.107084998 +0200
@@ -721,16 +721,21 @@ edvti_second_zone_changed_cb (GSettings
{
EDayViewTimeItem *time_item = user_data;
EDayView *day_view;
+ icaltimezone *second_zone;
gchar *location;
g_return_if_fail (user_data != NULL);
g_return_if_fail (E_IS_DAY_VIEW_TIME_ITEM (time_item));
location = calendar_config_get_day_second_zone ();
- time_item->priv->second_zone =
- location ? icaltimezone_get_builtin_timezone (location) : NULL;
+ second_zone = location ? icaltimezone_get_builtin_timezone (location) : NULL;
g_free (location);
+ if (second_zone == time_item->priv->second_zone)
+ return;
+
+ time_item->priv->second_zone = second_zone;
+
day_view = e_day_view_time_item_get_day_view (time_item);
gtk_widget_set_size_request (
day_view->time_canvas,
diff -up evolution-3.8.5/calendar/gui/e-meeting-time-sel.c.labels-gsettings-busy-loop evolution-3.8.5/calendar/gui/e-meeting-time-sel.c
--- evolution-3.8.5/calendar/gui/e-meeting-time-sel.c.labels-gsettings-busy-loop 2013-08-01 14:12:40.000000000 +0200
+++ evolution-3.8.5/calendar/gui/e-meeting-time-sel.c 2014-06-05 12:50:44.141250520 +0200
@@ -46,6 +46,7 @@
struct _EMeetingTimeSelectorPrivate {
gboolean use_24_hour_format;
+ gulong notify_free_busy_template_id;
};
/* An array of hour strings for 24 hour time, "0:00" .. "23:00". */
@@ -250,6 +251,8 @@ meeting_time_selector_dispose (GObject *
g_signal_handlers_disconnect_matched (
mts->model, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, mts);
+ e_signal_disconnect_notify_handler (mts->model, &mts->priv->notify_free_busy_template_id);
+
g_object_unref (mts->model);
mts->model = NULL;
}
@@ -395,7 +398,7 @@ e_meeting_time_selector_construct (EMeet
if (mts->model)
g_object_ref (mts->model);
- g_signal_connect_swapped (
+ mts->priv->notify_free_busy_template_id = e_signal_connect_notify_swapped (
mts->model, "notify::free-busy-template",
G_CALLBACK (free_busy_template_changed_cb), mts);
diff -up evolution-3.8.5/calendar/gui/e-task-table.c.labels-gsettings-busy-loop evolution-3.8.5/calendar/gui/e-task-table.c
--- evolution-3.8.5/calendar/gui/e-task-table.c.labels-gsettings-busy-loop 2013-07-23 14:52:27.000000000 +0200
+++ evolution-3.8.5/calendar/gui/e-task-table.c 2014-06-05 12:50:44.141250520 +0200
@@ -59,6 +59,11 @@ struct _ETaskTablePrivate {
GtkTargetList *copy_target_list;
GtkTargetList *paste_target_list;
+
+ gulong notify_highlight_due_today_id;
+ gulong notify_color_due_today_id;
+ gulong notify_highlight_overdue_id;
+ gulong notify_color_overdue_id;
};
enum {
@@ -316,26 +321,25 @@ task_table_set_model (ETaskTable *task_t
task_table);
/* redraw on drawing options change */
- g_signal_connect (
+ task_table->priv->notify_highlight_due_today_id = e_signal_connect_notify (
model, "notify::highlight-due-today",
G_CALLBACK (task_table_queue_draw_cb),
task_table);
- g_signal_connect (
+ task_table->priv->notify_color_due_today_id = e_signal_connect_notify (
model, "notify::color-due-today",
G_CALLBACK (task_table_queue_draw_cb),
task_table);
- g_signal_connect (
+ task_table->priv->notify_highlight_overdue_id = e_signal_connect_notify (
model, "notify::highlight-overdue",
G_CALLBACK (task_table_queue_draw_cb),
task_table);
- g_signal_connect (
+ task_table->priv->notify_color_overdue_id = e_signal_connect_notify (
model, "notify::color-overdue",
G_CALLBACK (task_table_queue_draw_cb),
task_table);
-
}
static void
@@ -429,7 +433,13 @@ task_table_dispose (GObject *object)
}
if (priv->model != NULL) {
- g_signal_handlers_disconnect_by_func (priv->model, task_table_queue_draw_cb, object);
+ g_signal_handlers_disconnect_by_data (priv->model, object);
+
+ e_signal_disconnect_notify_handler (priv->model, &priv->notify_highlight_due_today_id);
+ e_signal_disconnect_notify_handler (priv->model, &priv->notify_color_due_today_id);
+ e_signal_disconnect_notify_handler (priv->model, &priv->notify_highlight_overdue_id);
+ e_signal_disconnect_notify_handler (priv->model, &priv->notify_color_overdue_id);
+
g_object_unref (priv->model);
priv->model = NULL;
}
diff -up evolution-3.8.5/calendar/gui/e-week-view.c.labels-gsettings-busy-loop evolution-3.8.5/calendar/gui/e-week-view.c
--- evolution-3.8.5/calendar/gui/e-week-view.c.labels-gsettings-busy-loop 2013-07-23 14:52:36.000000000 +0200
+++ evolution-3.8.5/calendar/gui/e-week-view.c 2014-06-05 12:50:44.141250520 +0200
@@ -78,7 +78,7 @@
#define E_WEEK_VIEW_LAYOUT_TIMEOUT 100
struct _EWeekViewPrivate {
- gint placeholder;
+ gulong notify_week_start_day_id;
};
typedef struct {
@@ -691,8 +691,10 @@ week_view_dispose (GObject *object)
e_week_view_cancel_layout (week_view);
- if (model)
+ if (model) {
g_signal_handlers_disconnect_by_data (model, object);
+ e_signal_disconnect_notify_handler (model, &week_view->priv->notify_week_start_day_id);
+ }
if (week_view->events) {
e_week_view_free_events (week_view);
@@ -728,18 +730,20 @@ week_view_dispose (GObject *object)
static void
week_view_constructed (GObject *object)
{
+ EWeekView *week_view;
ECalModel *model;
ECalendarView *calendar_view;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_week_view_parent_class)->constructed (object);
+ week_view = E_WEEK_VIEW (object);
calendar_view = E_CALENDAR_VIEW (object);
model = e_calendar_view_get_model (calendar_view);
e_week_view_recalc_display_start_day (E_WEEK_VIEW (object));
- g_signal_connect_swapped (
+ week_view->priv->notify_week_start_day_id = e_signal_connect_notify_swapped (
model, "notify::week-start-day",
G_CALLBACK (week_view_notify_week_start_day_cb), object);
diff -up evolution-3.8.5/calendar/gui/gnome-cal.c.labels-gsettings-busy-loop evolution-3.8.5/calendar/gui/gnome-cal.c
--- evolution-3.8.5/calendar/gui/gnome-cal.c.labels-gsettings-busy-loop 2013-07-23 14:52:30.000000000 +0200
+++ evolution-3.8.5/calendar/gui/gnome-cal.c 2014-06-05 12:50:44.142250506 +0200
@@ -125,6 +125,8 @@ struct _GnomeCalendarPrivate {
gboolean lview_select_daten_range;
GCancellable *cancellable;
+
+ gulong notify_week_start_day_id;
};
struct _ViewData {
@@ -540,7 +542,7 @@ gnome_calendar_constructed (GObject *obj
gcal->priv->views[GNOME_CAL_WORK_WEEK_VIEW] = calendar_view;
g_object_ref_sink (calendar_view);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
calendar_view, "notify::working-days",
G_CALLBACK (gnome_calendar_update_time_range), gcal);
@@ -588,7 +590,7 @@ gnome_calendar_constructed (GObject *obj
calendar_view, "selection-changed",
G_CALLBACK (view_selection_changed_cb), gcal);
- g_signal_connect_swapped (
+ gcal->priv->notify_week_start_day_id = e_signal_connect_notify_swapped (
model, "notify::week-start-day",
G_CALLBACK (gnome_calendar_notify_week_start_day_cb), gcal);
@@ -1574,6 +1576,7 @@ gnome_calendar_do_dispose (GObject *obje
if (priv->model != NULL) {
g_signal_handlers_disconnect_by_data (priv->model, object);
+ e_signal_disconnect_notify_handler (priv->model, &priv->notify_week_start_day_id);
g_object_unref (priv->model);
priv->model = NULL;
}
diff -up evolution-3.8.5/composer/e-composer-name-header.c.labels-gsettings-busy-loop evolution-3.8.5/composer/e-composer-name-header.c
--- evolution-3.8.5/composer/e-composer-name-header.c.labels-gsettings-busy-loop 2013-07-23 14:52:19.000000000 +0200
+++ evolution-3.8.5/composer/e-composer-name-header.c 2014-06-05 12:50:44.142250506 +0200
@@ -222,7 +222,7 @@ composer_name_header_constructed (GObjec
NULL);
E_COMPOSER_HEADER (object)->input_widget = g_object_ref_sink (entry);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
object, "notify::visible",
G_CALLBACK (composer_name_header_visible_changed_cb), object);
diff -up evolution-3.8.5/composer/e-composer-private.c.labels-gsettings-busy-loop evolution-3.8.5/composer/e-composer-private.c
--- evolution-3.8.5/composer/e-composer-private.c.labels-gsettings-busy-loop 2013-07-23 14:52:19.000000000 +0200
+++ evolution-3.8.5/composer/e-composer-private.c 2014-06-05 12:50:44.142250506 +0200
@@ -392,7 +392,7 @@ e_composer_private_constructed (EMsgComp
priv->gallery_icon_view = g_object_ref (widget);
g_free (gallery_path);
- g_signal_connect (
+ e_signal_connect_notify (
composer, "notify::html-mode",
G_CALLBACK (composer_update_gallery_visibility), NULL);
diff -up evolution-3.8.5/composer/e-msg-composer.c.labels-gsettings-busy-loop evolution-3.8.5/composer/e-msg-composer.c
--- evolution-3.8.5/composer/e-msg-composer.c.labels-gsettings-busy-loop 2013-07-23 14:52:19.000000000 +0200
+++ evolution-3.8.5/composer/e-msg-composer.c 2014-06-05 12:50:44.143250493 +0200
@@ -2019,28 +2019,28 @@ msg_composer_constructed (GObject *objec
/* Configure Headers */
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
table, "notify::destinations-bcc",
G_CALLBACK (msg_composer_notify_header_cb), composer);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
table, "notify::destinations-cc",
G_CALLBACK (msg_composer_notify_header_cb), composer);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
table, "notify::destinations-to",
G_CALLBACK (msg_composer_notify_header_cb), composer);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
table, "notify::identity-uid",
G_CALLBACK (msg_composer_mail_identity_changed_cb), composer);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
table, "notify::reply-to",
G_CALLBACK (msg_composer_notify_header_cb), composer);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
table, "notify::signature-uid",
G_CALLBACK (e_composer_update_signature), composer);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
table, "notify::subject",
G_CALLBACK (msg_composer_subject_changed_cb), composer);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
table, "notify::subject",
G_CALLBACK (msg_composer_notify_header_cb), composer);
diff -up evolution-3.8.5/e-util/e-action-combo-box.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-action-combo-box.c
--- evolution-3.8.5/e-util/e-action-combo-box.c.labels-gsettings-busy-loop 2013-07-23 14:52:15.000000000 +0200
+++ evolution-3.8.5/e-util/e-action-combo-box.c 2014-06-05 12:50:44.143250493 +0200
@@ -23,6 +23,7 @@
#endif
#include "e-action-combo-box.h"
+#include "e-misc-utils.h"
#include <glib/gi18n.h>
@@ -512,13 +513,13 @@ e_action_combo_box_set_action (EActionCo
if (combo_box->priv->action_group != NULL) {
combo_box->priv->group_sensitive_handler_id =
- g_signal_connect (
+ e_signal_connect_notify (
combo_box->priv->action_group,
"notify::sensitive", G_CALLBACK (
action_combo_box_action_group_notify_cb),
combo_box);
combo_box->priv->group_visible_handler_id =
- g_signal_connect (
+ e_signal_connect_notify (
combo_box->priv->action_group,
"notify::visible", G_CALLBACK (
action_combo_box_action_group_notify_cb),
diff -up evolution-3.8.5/e-util/e-activity-bar.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-activity-bar.c
--- evolution-3.8.5/e-util/e-activity-bar.c.labels-gsettings-busy-loop 2013-07-23 14:52:05.000000000 +0200
+++ evolution-3.8.5/e-util/e-activity-bar.c 2014-06-05 12:50:44.143250493 +0200
@@ -21,6 +21,7 @@
#endif
#include "e-activity-bar.h"
+#include "e-misc-utils.h"
#define E_ACTIVITY_BAR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
diff -up evolution-3.8.5/e-util/e-activity-proxy.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-activity-proxy.c
--- evolution-3.8.5/e-util/e-activity-proxy.c.labels-gsettings-busy-loop 2013-07-23 14:52:03.000000000 +0200
+++ evolution-3.8.5/e-util/e-activity-proxy.c 2014-06-05 12:50:44.143250493 +0200
@@ -24,6 +24,7 @@
#endif
#include "e-activity-proxy.h"
+#include "e-misc-utils.h"
#include <glib/gi18n.h>
diff -up evolution-3.8.5/e-util/e-attachment-bar.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-attachment-bar.c
--- evolution-3.8.5/e-util/e-attachment-bar.c.labels-gsettings-busy-loop 2013-07-23 14:52:15.000000000 +0200
+++ evolution-3.8.5/e-util/e-attachment-bar.c 2014-06-05 12:50:44.143250493 +0200
@@ -30,6 +30,7 @@
#include "e-attachment-store.h"
#include "e-attachment-icon-view.h"
#include "e-attachment-tree-view.h"
+#include "e-misc-utils.h"
#define E_ATTACHMENT_BAR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -133,12 +134,12 @@ attachment_bar_set_store (EAttachmentBar
GTK_TREE_VIEW (bar->priv->tree_view),
bar->priv->model);
- g_signal_connect_object (
+ e_signal_connect_notify_object (
bar->priv->model, "notify::num-attachments",
G_CALLBACK (attachment_bar_update_status), bar,
G_CONNECT_SWAPPED);
- g_signal_connect_object (
+ e_signal_connect_notify_object (
bar->priv->model, "notify::total-size",
G_CALLBACK (attachment_bar_update_status), bar,
G_CONNECT_SWAPPED);
diff -up evolution-3.8.5/e-util/e-attachment-button.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-attachment-button.c
--- evolution-3.8.5/e-util/e-attachment-button.c.labels-gsettings-busy-loop 2013-07-23 14:52:08.000000000 +0200
+++ evolution-3.8.5/e-util/e-attachment-button.c 2014-06-05 12:50:44.144250482 +0200
@@ -26,6 +26,7 @@
#endif
#include "e-attachment-button.h"
+#include "e-misc-utils.h"
#define E_ATTACHMENT_BUTTON_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -774,7 +775,7 @@ e_attachment_button_set_attachment (EAtt
G_BINDING_SYNC_CREATE);
button->priv->shown_binding = binding;
- handler_id = g_signal_connect_swapped (
+ handler_id = e_signal_connect_notify_swapped (
attachment, "notify::reference",
G_CALLBACK (attachment_button_update_cell_view),
button);
diff -up evolution-3.8.5/e-util/e-attachment.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-attachment.c
--- evolution-3.8.5/e-util/e-attachment.c.labels-gsettings-busy-loop 2014-06-05 12:50:43.867252500 +0200
+++ evolution-3.8.5/e-util/e-attachment.c 2014-06-05 12:50:44.144250482 +0200
@@ -34,6 +34,7 @@
#include "e-attachment-store.h"
#include "e-icon-factory.h"
#include "e-mktemp.h"
+#include "e-misc-utils.h"
#define E_ATTACHMENT_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -1024,51 +1025,51 @@ e_attachment_init (EAttachment *attachme
g_mutex_init (&attachment->priv->property_lock);
g_mutex_init (&attachment->priv->idle_lock);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::encrypted",
G_CALLBACK (attachment_update_icon_column), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::file-info",
G_CALLBACK (attachment_update_file_info_columns), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::file-info",
G_CALLBACK (attachment_update_icon_column), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::loading",
G_CALLBACK (attachment_update_icon_column), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::loading",
G_CALLBACK (attachment_update_progress_columns), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::percent",
G_CALLBACK (attachment_update_progress_columns), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::reference",
G_CALLBACK (attachment_update_file_info_columns), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::reference",
G_CALLBACK (attachment_update_icon_column), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::reference",
G_CALLBACK (attachment_update_progress_columns), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::saving",
G_CALLBACK (attachment_update_icon_column), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::saving",
G_CALLBACK (attachment_update_progress_columns), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
attachment, "notify::signed",
G_CALLBACK (attachment_update_icon_column), NULL);
diff -up evolution-3.8.5/e-util/e-attachment-paned.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-attachment-paned.c
--- evolution-3.8.5/e-util/e-attachment-paned.c.labels-gsettings-busy-loop 2013-07-23 14:52:03.000000000 +0200
+++ evolution-3.8.5/e-util/e-attachment-paned.c 2014-06-05 12:50:44.144250482 +0200
@@ -27,6 +27,7 @@
#include <glib/gi18n.h>
+#include "e-misc-utils.h"
#include "e-attachment-view.h"
#include "e-attachment-store.h"
#include "e-attachment-icon-view.h"
@@ -745,15 +746,15 @@ e_attachment_paned_init (EAttachmentPane
paned->priv->status_label = g_object_ref (widget);
gtk_widget_hide (widget);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
paned->priv->expander, "notify::expanded",
G_CALLBACK (attachment_paned_notify_cb), paned);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
paned->priv->model, "notify::num-attachments",
G_CALLBACK (attachment_paned_update_status), paned);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
paned->priv->model, "notify::total-size",
G_CALLBACK (attachment_paned_update_status), paned);
diff -up evolution-3.8.5/e-util/e-category-completion.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-category-completion.c
--- evolution-3.8.5/e-util/e-category-completion.c.labels-gsettings-busy-loop 2013-07-23 14:52:05.000000000 +0200
+++ evolution-3.8.5/e-util/e-category-completion.c 2014-06-05 12:50:44.144250482 +0200
@@ -26,6 +26,8 @@
#include <libedataserver/libedataserver.h>
+#include "e-misc-utils.h"
+
#define E_CATEGORY_COMPLETION_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_CATEGORY_COMPLETION, ECategoryCompletionPrivate))
@@ -34,6 +36,9 @@ struct _ECategoryCompletionPrivate {
GtkWidget *last_known_entry;
gchar *create;
gchar *prefix;
+
+ gulong notify_cursor_position_id;
+ gulong notify_text_id;
};
enum {
@@ -342,6 +347,8 @@ category_completion_track_entry (GtkEntr
g_signal_handlers_disconnect_matched (
priv->last_known_entry, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, completion);
+ e_signal_disconnect_notify_handler (priv->last_known_entry, &priv->notify_cursor_position_id);
+ e_signal_disconnect_notify_handler (priv->last_known_entry, &priv->notify_text_id);
g_object_unref (priv->last_known_entry);
}
@@ -354,11 +361,11 @@ category_completion_track_entry (GtkEntr
g_object_ref (priv->last_known_entry);
- g_signal_connect_swapped (
+ priv->notify_cursor_position_id = e_signal_connect_notify_swapped (
priv->last_known_entry, "notify::cursor-position",
G_CALLBACK (category_completion_update_prefix), completion);
- g_signal_connect_swapped (
+ priv->notify_text_id = e_signal_connect_notify_swapped (
priv->last_known_entry, "notify::text",
G_CALLBACK (category_completion_update_prefix), completion);
@@ -413,6 +420,8 @@ category_completion_dispose (GObject *ob
g_signal_handlers_disconnect_matched (
priv->last_known_entry, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, object);
+ e_signal_disconnect_notify_handler (priv->last_known_entry, &priv->notify_cursor_position_id);
+ e_signal_disconnect_notify_handler (priv->last_known_entry, &priv->notify_text_id);
g_object_unref (priv->last_known_entry);
priv->last_known_entry = NULL;
}
diff -up evolution-3.8.5/e-util/e-charset-combo-box.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-charset-combo-box.c
--- evolution-3.8.5/e-util/e-charset-combo-box.c.labels-gsettings-busy-loop 2013-07-23 14:52:06.000000000 +0200
+++ evolution-3.8.5/e-util/e-charset-combo-box.c 2014-06-05 12:50:44.144250482 +0200
@@ -352,7 +352,7 @@ e_charset_combo_box_init (ECharsetComboB
e_action_combo_box_add_separator_after (
E_ACTION_COMBO_BOX (combo_box), g_slist_length (group));
- g_signal_connect (
+ e_signal_connect_notify (
combo_box, "notify::charset",
G_CALLBACK (charset_combo_box_notify_charset_cb), NULL);
diff -up evolution-3.8.5/e-util/e-filter-rule.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-filter-rule.c
--- evolution-3.8.5/e-util/e-filter-rule.c.labels-gsettings-busy-loop 2013-07-23 14:52:09.000000000 +0200
+++ evolution-3.8.5/e-util/e-filter-rule.c 2014-06-05 12:50:44.145250475 +0200
@@ -33,6 +33,7 @@
#include "e-alert-dialog.h"
#include "e-filter-rule.h"
#include "e-rule-context.h"
+#include "e-misc-utils.h"
#define E_FILTER_RULE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -896,10 +897,10 @@ filter_rule_get_widget (EFilterRule *rul
vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0));
scrolledwindow = gtk_scrolled_window_new (hadj, vadj);
- g_signal_connect (
+ e_signal_connect_notify (
hadj, "notify::upper",
G_CALLBACK (ensure_scrolled_width_cb), scrolledwindow);
- g_signal_connect (
+ e_signal_connect_notify (
vadj, "notify::upper",
G_CALLBACK (ensure_scrolled_height_cb), scrolledwindow);
diff -up evolution-3.8.5/e-util/e-interval-chooser.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-interval-chooser.c
--- evolution-3.8.5/e-util/e-interval-chooser.c.labels-gsettings-busy-loop 2013-07-23 14:52:00.000000000 +0200
+++ evolution-3.8.5/e-util/e-interval-chooser.c 2014-06-05 12:50:44.145250475 +0200
@@ -22,6 +22,7 @@
#include <glib/gi18n-lib.h>
#include "e-util-enums.h"
+#include "e-misc-utils.h"
#define E_INTERVAL_CHOOSER_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -130,7 +131,7 @@ e_interval_chooser_init (EIntervalChoose
chooser->priv->spin_button = GTK_SPIN_BUTTON (widget);
gtk_widget_show (widget);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
widget, "notify::value",
G_CALLBACK (interval_chooser_notify_interval), chooser);
@@ -145,7 +146,7 @@ e_interval_chooser_init (EIntervalChoose
chooser->priv->combo_box = GTK_COMBO_BOX (widget);
gtk_widget_show (widget);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
widget, "notify::active",
G_CALLBACK (interval_chooser_notify_interval), chooser);
}
diff -up evolution-3.8.5/e-util/e-menu-tool-button.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-menu-tool-button.c
--- evolution-3.8.5/e-util/e-menu-tool-button.c.labels-gsettings-busy-loop 2013-07-23 14:52:09.000000000 +0200
+++ evolution-3.8.5/e-util/e-menu-tool-button.c 2014-06-05 12:50:44.145250475 +0200
@@ -24,6 +24,7 @@
#endif
#include "e-menu-tool-button.h"
+#include "e-misc-utils.h"
#define E_MENU_TOOL_BUTTON_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -242,7 +243,7 @@ e_menu_tool_button_init (EMenuToolButton
button->priv->prefer_item = NULL;
- g_signal_connect (
+ e_signal_connect_notify (
button, "notify::menu",
G_CALLBACK (menu_tool_button_update_button), NULL);
}
diff -up evolution-3.8.5/e-util/e-misc-utils.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-misc-utils.c
--- evolution-3.8.5/e-util/e-misc-utils.c.labels-gsettings-busy-loop 2014-06-05 12:50:43.382256022 +0200
+++ evolution-3.8.5/e-util/e-misc-utils.c 2014-06-05 12:50:44.145250475 +0200
@@ -2070,3 +2070,304 @@ e_misc_utils_is_help_package_installed (
return is_installed;
}
+
+typedef struct _EConnectNotifyData {
+ GConnectFlags flags;
+ GValue *old_value;
+
+ GCallback c_handler;
+ gpointer user_data;
+} EConnectNotifyData;
+
+static EConnectNotifyData *
+e_connect_notify_data_new (GCallback c_handler,
+ gpointer user_data,
+ guint32 connect_flags)
+{
+ EConnectNotifyData *connect_data;
+
+ connect_data = g_new0 (EConnectNotifyData, 1);
+ connect_data->flags = connect_flags;
+ connect_data->c_handler = c_handler;
+ connect_data->user_data = user_data;
+
+ return connect_data;
+}
+
+static void
+e_connect_notify_data_free (EConnectNotifyData *data)
+{
+ if (!data)
+ return;
+
+ if (data->old_value) {
+ g_value_unset (data->old_value);
+ g_free (data->old_value);
+ }
+ g_free (data);
+}
+
+static gboolean
+e_value_equal (GValue *value1,
+ GValue *value2)
+{
+ if (value1 == value2)
+ return TRUE;
+
+ if (!value1 || !value2)
+ return FALSE;
+
+ #define testType(_uc,_lc) G_STMT_START { \
+ if (G_VALUE_HOLDS_ ## _uc (value1)) \
+ return g_value_get_ ## _lc (value1) == g_value_get_ ## _lc (value2); \
+ } G_STMT_END
+
+ testType (BOOLEAN, boolean);
+ testType (BOXED, boxed);
+ testType (CHAR, schar);
+ testType (DOUBLE, double);
+ testType (ENUM, enum);
+ testType (FLAGS, flags);
+ testType (FLOAT, float);
+ testType (GTYPE, gtype);
+ testType (INT, int);
+ testType (INT64, int64);
+ testType (LONG, long);
+ testType (OBJECT, object);
+ testType (POINTER, pointer);
+ testType (UCHAR, uchar);
+ testType (UINT, uint);
+ testType (UINT64, uint64);
+ testType (ULONG, ulong);
+
+ #undef testType
+
+ if (G_VALUE_HOLDS_PARAM (value1)) {
+ GParamSpec *param1, *param2;
+
+ param1 = g_value_get_param (value1);
+ param2 = g_value_get_param (value2);
+
+ return param1 && param2 &&
+ g_strcmp0 (param1->name, param2->name) == 0 &&
+ param1->flags == param2->flags &&
+ param1->value_type == param2->value_type &&
+ param1->owner_type == param2->owner_type;
+ } else if (G_VALUE_HOLDS_STRING (value1)) {
+ const gchar *string1, *string2;
+
+ string1 = g_value_get_string (value1);
+ string2 = g_value_get_string (value2);
+
+ return g_strcmp0 (string1, string2) == 0;
+ } else if (G_VALUE_HOLDS_VARIANT (value1)) {
+ GVariant *variant1, *variant2;
+
+ variant1 = g_value_get_variant (value1);
+ variant2 = g_value_get_variant (value2);
+
+ return variant1 == variant2 ||
+ (variant1 && variant2 && g_variant_equal (variant1, variant2));
+ }
+
+ return FALSE;
+}
+
+static void
+e_signal_connect_notify_cb (gpointer instance,
+ GParamSpec *param,
+ gpointer user_data)
+{
+ EConnectNotifyData *connect_data = user_data;
+ GValue *value;
+
+ g_return_if_fail (connect_data != NULL);
+
+ value = g_new0 (GValue, 1);
+ g_value_init (value, param->value_type);
+ g_object_get_property (instance, param->name, value);
+
+ if (!e_value_equal (connect_data->old_value, value)) {
+ typedef void (* NotifyCBType) (gpointer instance, GParamSpec *param, gpointer user_data);
+ NotifyCBType c_handler = (NotifyCBType) connect_data->c_handler;
+
+ if (connect_data->old_value) {
+ g_value_unset (connect_data->old_value);
+ g_free (connect_data->old_value);
+ }
+ connect_data->old_value = value;
+
+ if (connect_data->flags == G_CONNECT_SWAPPED) {
+ c_handler (connect_data->user_data, param, instance);
+ } else {
+ c_handler (instance, param, connect_data->user_data);
+ }
+ } else {
+ g_value_unset (value);
+ g_free (value);
+ }
+}
+
+/**
+ * e_signal_connect_notify:
+ *
+ * This installs a special handler in front of @c_handler, which will
+ * call the @c_handler only if the property value changed since the last
+ * time it was checked. Due to this, these handlers cannot be disconnected
+ * by by any of the g_signal_handlers_* functions, but only with the returned
+ * handler ID. A convenient e_signal_disconnect_notify_handler() was added
+ * to make it easier.
+ **/
+gulong
+e_signal_connect_notify (gpointer instance,
+ const gchar *notify_name,
+ GCallback c_handler,
+ gpointer user_data)
+{
+ EConnectNotifyData *connect_data;
+
+ g_return_val_if_fail (g_str_has_prefix (notify_name, "notify::"), 0);
+
+ connect_data = e_connect_notify_data_new (c_handler, user_data, 0);
+
+ return g_signal_connect_data (instance,
+ notify_name,
+ G_CALLBACK (e_signal_connect_notify_cb),
+ connect_data,
+ (GClosureNotify) e_connect_notify_data_free,
+ 0);
+}
+
+/**
+ * e_signal_connect_notify_after:
+ *
+ * This installs a special handler in front of @c_handler, which will
+ * call the @c_handler only if the property value changed since the last
+ * time it was checked. Due to this, these handlers cannot be disconnected
+ * by by any of the g_signal_handlers_* functions, but only with the returned
+ * handler ID. A convenient e_signal_disconnect_notify_handler() was added
+ * to make it easier.
+ **/
+gulong
+e_signal_connect_notify_after (gpointer instance,
+ const gchar *notify_name,
+ GCallback c_handler,
+ gpointer user_data)
+{
+ EConnectNotifyData *connect_data;
+
+ g_return_val_if_fail (g_str_has_prefix (notify_name, "notify::"), 0);
+
+ connect_data = e_connect_notify_data_new (c_handler, user_data, G_CONNECT_AFTER);
+
+ return g_signal_connect_data (instance,
+ notify_name,
+ G_CALLBACK (e_signal_connect_notify_cb),
+ connect_data,
+ (GClosureNotify) e_connect_notify_data_free,
+ G_CONNECT_AFTER);
+}
+
+/**
+ * e_signal_connect_notify_swapped:
+ *
+ * This installs a special handler in front of @c_handler, which will
+ * call the @c_handler only if the property value changed since the last
+ * time it was checked. Due to this, these handlers cannot be disconnected
+ * by by any of the g_signal_handlers_* functions, but only with the returned
+ * handler ID. A convenient e_signal_disconnect_notify_handler() was added
+ * to make it easier.
+ **/
+gulong
+e_signal_connect_notify_swapped (gpointer instance,
+ const gchar *notify_name,
+ GCallback c_handler,
+ gpointer user_data)
+{
+ EConnectNotifyData *connect_data;
+
+ g_return_val_if_fail (g_str_has_prefix (notify_name, "notify::"), 0);
+
+ connect_data = e_connect_notify_data_new (c_handler, user_data, G_CONNECT_SWAPPED);
+
+ return g_signal_connect_data (instance,
+ notify_name,
+ G_CALLBACK (e_signal_connect_notify_cb),
+ connect_data,
+ (GClosureNotify) e_connect_notify_data_free,
+ 0);
+}
+
+/**
+ * e_signal_connect_notify_object:
+ *
+ * This installs a special handler in front of @c_handler, which will
+ * call the @c_handler only if the property value changed since the last
+ * time it was checked. Due to this, these handlers cannot be disconnected
+ * by by any of the g_signal_handlers_* functions, but only with the returned
+ * handler ID. A convenient e_signal_disconnect_notify_handler() was added
+ * to make it easier.
+ **/
+gulong
+e_signal_connect_notify_object (gpointer instance,
+ const gchar *notify_name,
+ GCallback c_handler,
+ gpointer gobject,
+ GConnectFlags connect_flags)
+{
+ EConnectNotifyData *connect_data;
+ GClosure *closure;
+
+ g_return_val_if_fail (g_str_has_prefix (notify_name, "notify::"), 0);
+
+ if (!gobject) {
+ if ((connect_flags & G_CONNECT_SWAPPED) != 0)
+ return e_signal_connect_notify_swapped (instance, notify_name, c_handler, gobject);
+ else if ((connect_flags & G_CONNECT_AFTER) != 0)
+ e_signal_connect_notify_after (instance, notify_name, c_handler, gobject);
+ else
+ g_warn_if_fail (connect_flags == 0);
+
+ return e_signal_connect_notify (instance, notify_name, c_handler, gobject);
+ }
+
+ g_return_val_if_fail (G_IS_OBJECT (gobject), 0);
+
+ connect_data = e_connect_notify_data_new (c_handler, gobject, connect_flags & G_CONNECT_SWAPPED);
+ closure = g_cclosure_new (
+ G_CALLBACK (e_signal_connect_notify_cb),
+ connect_data,
+ (GClosureNotify) e_connect_notify_data_free);
+
+ g_object_watch_closure (G_OBJECT (gobject), closure);
+
+ return g_signal_connect_closure (instance,
+ notify_name,
+ closure,
+ connect_flags & G_CONNECT_AFTER);
+}
+
+/**
+ * e_signal_disconnect_notify_handler:
+ *
+ * Convenient handler disconnect function to be used with
+ * returned handler IDs from:
+ * e_signal_connect_notify()
+ * e_signal_connect_notify_after()
+ * e_signal_connect_notify_swapped()
+ * e_signal_connect_notify_object()
+ * but not necessarily only with these functions.
+ **/
+void
+e_signal_disconnect_notify_handler (gpointer instance,
+ gulong *handler_id)
+{
+ g_return_if_fail (instance != NULL);
+ g_return_if_fail (handler_id != NULL);
+
+ if (!*handler_id)
+ return;
+
+ g_signal_handler_disconnect (instance, *handler_id);
+ *handler_id = 0;
+}
diff -up evolution-3.8.5/e-util/e-misc-utils.h.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-misc-utils.h
--- evolution-3.8.5/e-util/e-misc-utils.h.labels-gsettings-busy-loop 2014-06-05 12:50:43.382256022 +0200
+++ evolution-3.8.5/e-util/e-misc-utils.h 2014-06-05 12:50:44.146250470 +0200
@@ -185,6 +185,27 @@ gboolean e_binding_transform_uid_to_sour
gboolean e_misc_utils_is_help_package_installed (void);
+gulong e_signal_connect_notify (gpointer instance,
+ const gchar *notify_name,
+ GCallback c_handler,
+ gpointer user_data);
+gulong e_signal_connect_notify_after (gpointer instance,
+ const gchar *notify_name,
+ GCallback c_handler,
+ gpointer user_data);
+gulong e_signal_connect_notify_swapped (gpointer instance,
+ const gchar *notify_name,
+ GCallback c_handler,
+ gpointer user_data);
+gulong e_signal_connect_notify_object (gpointer instance,
+ const gchar *notify_name,
+ GCallback c_handler,
+ gpointer gobject,
+ GConnectFlags connect_flags);
+void e_signal_disconnect_notify_handler
+ (gpointer instance,
+ gulong *handler_id);
+
G_END_DECLS
#endif /* E_MISC_UTILS_H */
diff -up evolution-3.8.5/e-util/e-online-button.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-online-button.c
--- evolution-3.8.5/e-util/e-online-button.c.labels-gsettings-busy-loop 2013-07-23 14:52:00.000000000 +0200
+++ evolution-3.8.5/e-util/e-online-button.c 2014-06-05 12:50:44.146250470 +0200
@@ -23,6 +23,8 @@
#include <glib/gi18n.h>
+#include "e-misc-utils.h"
+
#define E_ONLINE_BUTTON_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_ONLINE_BUTTON, EOnlineButtonPrivate))
@@ -155,11 +157,11 @@ e_online_button_init (EOnlineButton *but
button->priv->image = g_object_ref (widget);
gtk_widget_show (widget);
- g_signal_connect (
+ e_signal_connect_notify (
button, "notify::online",
G_CALLBACK (online_button_update_tooltip), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
button, "notify::sensitive",
G_CALLBACK (online_button_update_tooltip), NULL);
}
diff -up evolution-3.8.5/e-util/e-paned.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-paned.c
--- evolution-3.8.5/e-util/e-paned.c.labels-gsettings-busy-loop 2013-07-23 14:52:14.000000000 +0200
+++ evolution-3.8.5/e-util/e-paned.c 2014-06-05 12:50:44.146250470 +0200
@@ -27,6 +27,8 @@
#include <glib/gi18n-lib.h>
+#include "e-misc-utils.h"
+
#define E_PANED_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_PANED, EPanedPrivate))
@@ -376,11 +378,11 @@ e_paned_init (EPaned *paned)
paned->priv->proportion = 0.5;
paned->priv->fixed_resize = TRUE;
- g_signal_connect (
+ e_signal_connect_notify (
paned, "notify::orientation",
G_CALLBACK (paned_notify_orientation_cb), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
paned, "notify::position",
G_CALLBACK (paned_notify_position_cb), NULL);
}
@@ -472,6 +474,9 @@ e_paned_set_proportion (EPaned *paned,
g_return_if_fail (E_IS_PANED (paned));
g_return_if_fail (CLAMP (proportion, 0.0, 1.0) == proportion);
+ if (paned->priv->proportion == proportion)
+ return;
+
paned->priv->proportion = proportion;
paned->priv->sync_request = SYNC_REQUEST_PROPORTION;
diff -up evolution-3.8.5/e-util/e-photo-cache.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-photo-cache.c
--- evolution-3.8.5/e-util/e-photo-cache.c.labels-gsettings-busy-loop 2013-07-23 14:52:08.000000000 +0200
+++ evolution-3.8.5/e-util/e-photo-cache.c 2014-06-05 12:50:44.146250470 +0200
@@ -708,6 +708,9 @@ e_photo_cache_set_local_only (EPhotoCach
{
g_return_if_fail (E_IS_PHOTO_CACHE (photo_cache));
+ if (photo_cache->priv->local_only == local_only)
+ return;
+
photo_cache->priv->local_only = local_only;
/* Reset the cache. */
diff -up evolution-3.8.5/e-util/e-picture-gallery.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-picture-gallery.c
--- evolution-3.8.5/e-util/e-picture-gallery.c.labels-gsettings-busy-loop 2013-07-23 14:52:01.000000000 +0200
+++ evolution-3.8.5/e-util/e-picture-gallery.c 2014-06-05 12:50:44.146250470 +0200
@@ -26,6 +26,7 @@
#include "e-picture-gallery.h"
#include "e-icon-factory.h"
+#include "e-misc-utils.h"
#define E_PICTURE_GALLERY_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -378,7 +379,7 @@ picture_gallery_constructed (GObject *ob
gtk_target_table_free (targets, n_targets);
gtk_target_list_unref (list);
- g_signal_connect (object, "notify::visible", G_CALLBACK (visible_cb), NULL);
+ e_signal_connect_notify (object, "notify::visible", G_CALLBACK (visible_cb), NULL);
}
static void
diff -up evolution-3.8.5/e-util/e-source-config-dialog.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-source-config-dialog.c
--- evolution-3.8.5/e-util/e-source-config-dialog.c.labels-gsettings-busy-loop 2013-07-23 14:52:02.000000000 +0200
+++ evolution-3.8.5/e-util/e-source-config-dialog.c 2014-06-05 12:50:44.146250470 +0200
@@ -21,6 +21,7 @@
#include "e-alert-bar.h"
#include "e-alert-dialog.h"
#include "e-alert-sink.h"
+#include "e-misc-utils.h"
#define E_SOURCE_CONFIG_DIALOG_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -270,7 +271,7 @@ source_config_dialog_constructed (GObjec
priv->alert_bar = g_object_ref (widget);
/* EAlertBar controls its own visibility. */
- handler_id = g_signal_connect (
+ handler_id = e_signal_connect_notify (
priv->alert_bar, "notify::visible",
G_CALLBACK (source_config_alert_bar_visible_cb), object);
diff -up evolution-3.8.5/e-util/e-spell-entry.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-spell-entry.c
--- evolution-3.8.5/e-util/e-spell-entry.c.labels-gsettings-busy-loop 2013-07-23 14:52:01.000000000 +0200
+++ evolution-3.8.5/e-util/e-spell-entry.c 2014-06-05 12:50:44.147250469 +0200
@@ -27,6 +27,7 @@
#include <editor/gtkhtml-spell-language.h>
#include <editor/gtkhtml-spell-checker.h>
+#include "e-misc-utils.h"
#include "e-spell-entry.h"
#define E_SPELL_ENTRY_GET_PRIVATE(obj) \
@@ -879,7 +880,7 @@ e_spell_entry_init (ESpellEntry *spell_e
g_signal_connect (
spell_entry, "changed",
G_CALLBACK (spell_entry_changed), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
spell_entry, "notify::scroll-offset",
G_CALLBACK (spell_entry_notify_scroll_offset), NULL);
diff -up evolution-3.8.5/e-util/e-table.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-table.c
--- evolution-3.8.5/e-util/e-table.c.labels-gsettings-busy-loop 2013-07-23 14:52:01.000000000 +0200
+++ evolution-3.8.5/e-util/e-table.c 2014-06-05 12:50:44.147250469 +0200
@@ -1134,7 +1134,7 @@ et_build_groups (ETable *et)
g_signal_connect (
et->group, "start_drag",
G_CALLBACK (group_start_drag), et);
- g_signal_connect (
+ e_signal_connect_notify (
et->group, "notify::is-editing",
G_CALLBACK (group_is_editing_changed_cb), et);
@@ -1516,7 +1516,7 @@ e_table_setup_table (ETable *e_table,
g_signal_connect (
e_table->click_to_add, "cursor_change",
G_CALLBACK (click_to_add_cursor_change), e_table);
- g_signal_connect (
+ e_signal_connect_notify (
e_table->click_to_add, "notify::is-editing",
G_CALLBACK (click_to_add_is_editing_changed_cb), e_table);
}
@@ -2376,7 +2376,7 @@ et_set_property (GObject *object,
etable->click_to_add, "cursor_change",
G_CALLBACK (click_to_add_cursor_change),
etable);
- g_signal_connect (
+ e_signal_connect_notify (
etable->click_to_add, "notify::is-editing",
G_CALLBACK (click_to_add_is_editing_changed_cb), etable);
} else {
diff -up evolution-3.8.5/e-util/e-table-click-to-add.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-table-click-to-add.c
--- evolution-3.8.5/e-util/e-table-click-to-add.c.labels-gsettings-busy-loop 2013-07-23 14:51:59.000000000 +0200
+++ evolution-3.8.5/e-util/e-table-click-to-add.c 2014-06-05 12:50:44.147250469 +0200
@@ -414,7 +414,7 @@ finish_editing (ETableClickToAdd *etcta)
etcta->row, "key_press",
G_CALLBACK (item_key_press), etcta);
- g_signal_connect (
+ e_signal_connect_notify (
etcta->row, "notify::is-editing",
G_CALLBACK (table_click_to_add_row_is_editing_changed_cb), etcta);
@@ -471,7 +471,7 @@ etcta_event (GnomeCanvasItem *item,
etcta->row, "key_press",
G_CALLBACK (item_key_press), etcta);
- g_signal_connect (
+ e_signal_connect_notify (
etcta->row, "notify::is-editing",
G_CALLBACK (table_click_to_add_row_is_editing_changed_cb), etcta);
diff -up evolution-3.8.5/e-util/e-table-group-leaf.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-table-group-leaf.c
--- evolution-3.8.5/e-util/e-table-group-leaf.c.labels-gsettings-busy-loop 2013-07-23 14:52:16.000000000 +0200
+++ evolution-3.8.5/e-util/e-table-group-leaf.c 2014-06-05 12:50:44.147250469 +0200
@@ -108,9 +108,7 @@ etgl_dispose (GObject *object)
etgl->item,
etgl->etgl_start_drag_id);
- g_signal_handlers_disconnect_by_func (
- etgl->item,
- etgl_item_is_editing_changed_cb, etgl);
+ e_signal_disconnect_notify_handler (etgl->item, &etgl->notify_is_editing_id);
etgl->etgl_cursor_change_id = 0;
etgl->etgl_cursor_activated_id = 0;
@@ -346,7 +344,7 @@ etgl_realize (GnomeCanvasItem *item)
etgl->item, "start_drag",
G_CALLBACK (etgl_start_drag), etgl);
- g_signal_connect (
+ etgl->notify_is_editing_id = e_signal_connect_notify (
etgl->item, "notify::is-editing",
G_CALLBACK (etgl_item_is_editing_changed_cb), etgl);
diff -up evolution-3.8.5/e-util/e-table-group-leaf.h.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-table-group-leaf.h
--- evolution-3.8.5/e-util/e-table-group-leaf.h.labels-gsettings-busy-loop 2013-07-23 14:52:13.000000000 +0200
+++ evolution-3.8.5/e-util/e-table-group-leaf.h 2014-06-05 12:50:44.148250463 +0200
@@ -91,6 +91,8 @@ struct _ETableGroupLeaf {
gint etgl_start_drag_id;
ESelectionModel *selection_model;
+
+ gulong notify_is_editing_id;
};
struct _ETableGroupLeafClass {
diff -up evolution-3.8.5/e-util/e-tree.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-tree.c
--- evolution-3.8.5/e-util/e-tree.c.labels-gsettings-busy-loop 2013-08-03 15:22:52.000000000 +0200
+++ evolution-3.8.5/e-util/e-tree.c 2014-06-05 12:50:44.148250463 +0200
@@ -1156,7 +1156,7 @@ et_build_item (ETree *et)
g_signal_connect (
et->priv->item, "start_drag",
G_CALLBACK (item_start_drag), et);
- g_signal_connect (
+ e_signal_connect_notify (
et->priv->item, "notify::is-editing",
G_CALLBACK (tree_item_is_editing_changed_cb), et);
}
diff -up evolution-3.8.5/e-util/e-web-view.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-web-view.c
--- evolution-3.8.5/e-util/e-web-view.c.labels-gsettings-busy-loop 2014-06-05 12:50:43.915252151 +0200
+++ evolution-3.8.5/e-util/e-web-view.c 2014-06-05 12:53:23.108084994 +0200
@@ -72,6 +72,8 @@ struct _EWebViewPrivate {
GSettings *font_settings;
GSettings *aliasing_settings;
+
+ GHashTable *old_settings;
};
enum {
@@ -704,6 +706,11 @@ web_view_finalize (GObject *object)
priv = E_WEB_VIEW_GET_PRIVATE (object);
+ if (priv->old_settings) {
+ g_hash_table_destroy (priv->old_settings);
+ priv->old_settings = NULL;
+ }
+
/* All URI requests should be complete or cancelled by now. */
if (priv->requests != NULL)
g_warning ("Finalizing EWebView with active URI requests");
@@ -1333,6 +1340,28 @@ web_view_drag_motion (GtkWidget *widget,
return FALSE;
}
+static void
+e_web_view_test_change_and_update_fonts_cb (EWebView *web_view,
+ const gchar *key,
+ GSettings *settings)
+{
+ GVariant *new_value, *old_value;
+
+ new_value = g_settings_get_value (settings, key);
+ old_value = g_hash_table_lookup (web_view->priv->old_settings, key);
+
+ if (!new_value || !old_value || !g_variant_equal (new_value, old_value)) {
+ if (new_value)
+ g_hash_table_insert (web_view->priv->old_settings, g_strdup (key), new_value);
+ else
+ g_hash_table_remove (web_view->priv->old_settings, key);
+
+ e_web_view_update_fonts (web_view);
+ } else if (new_value) {
+ g_variant_unref (new_value);
+ }
+}
+
static gpointer
web_view_disable_webkit_3rd_party_plugins (gpointer unused)
{
@@ -1602,6 +1631,8 @@ e_web_view_init (EWebView *web_view)
web_view->priv = E_WEB_VIEW_GET_PRIVATE (web_view);
+ web_view->priv->old_settings = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
+
g_signal_connect (
web_view, "create-plugin-widget",
G_CALLBACK (web_view_create_plugin_widget_cb), NULL);
@@ -1624,7 +1655,7 @@ e_web_view_init (EWebView *web_view)
web_view, "context-menu",
G_CALLBACK (web_view_context_menu_cb), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
web_view, "notify::load-status",
G_CALLBACK (web_view_load_status_changed_cb), NULL);
@@ -1645,10 +1676,10 @@ e_web_view_init (EWebView *web_view)
settings = g_settings_new ("org.gnome.desktop.interface");
g_signal_connect_swapped (
settings, "changed::font-name",
- G_CALLBACK (e_web_view_update_fonts), web_view);
+ G_CALLBACK (e_web_view_test_change_and_update_fonts_cb), web_view);
g_signal_connect_swapped (
settings, "changed::monospace-font-name",
- G_CALLBACK (e_web_view_update_fonts), web_view);
+ G_CALLBACK (e_web_view_test_change_and_update_fonts_cb), web_view);
web_view->priv->font_settings = settings;
/* This schema is optional. Use if available. */
@@ -1659,7 +1690,7 @@ e_web_view_init (EWebView *web_view)
settings = g_settings_new (id);
g_signal_connect_swapped (
settings, "changed::antialiasing",
- G_CALLBACK (e_web_view_update_fonts), web_view);
+ G_CALLBACK (e_web_view_test_change_and_update_fonts_cb), web_view);
web_view->priv->aliasing_settings = settings;
g_settings_schema_unref (settings_schema);
}
diff -up evolution-3.8.5/e-util/e-web-view-gtkhtml.c.labels-gsettings-busy-loop evolution-3.8.5/e-util/e-web-view-gtkhtml.c
--- evolution-3.8.5/e-util/e-web-view-gtkhtml.c.labels-gsettings-busy-loop 2013-07-23 14:52:08.000000000 +0200
+++ evolution-3.8.5/e-util/e-web-view-gtkhtml.c 2014-06-05 12:50:44.149250456 +0200
@@ -1793,6 +1793,9 @@ e_web_view_gtkhtml_set_animate (EWebView
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (web_view));
+ if (gtk_html_get_animate (GTK_HTML (web_view)) == animate)
+ return;
+
gtk_html_set_animate (GTK_HTML (web_view), animate);
g_object_notify (G_OBJECT (web_view), "animate");
@@ -1819,6 +1822,9 @@ e_web_view_gtkhtml_set_caret_mode (EWebV
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (web_view));
+ if (gtk_html_get_caret_mode (GTK_HTML (web_view)) == caret_mode)
+ return;
+
gtk_html_set_caret_mode (GTK_HTML (web_view), caret_mode);
g_object_notify (G_OBJECT (web_view), "caret-mode");
@@ -1846,6 +1852,9 @@ e_web_view_gtkhtml_set_disable_printing
{
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (web_view));
+ if (web_view->priv->disable_printing == disable_printing)
+ return;
+
web_view->priv->disable_printing = disable_printing;
g_object_notify (G_OBJECT (web_view), "disable-printing");
@@ -1865,6 +1874,9 @@ e_web_view_gtkhtml_set_disable_save_to_d
{
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (web_view));
+ if (web_view->priv->disable_save_to_disk == disable_save_to_disk)
+ return;
+
web_view->priv->disable_save_to_disk = disable_save_to_disk;
g_object_notify (G_OBJECT (web_view), "disable-save-to-disk");
@@ -1891,6 +1903,9 @@ e_web_view_gtkhtml_set_editable (EWebVie
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (web_view));
+ if (gtk_html_get_editable (GTK_HTML (web_view)) == editable)
+ return;
+
gtk_html_set_editable (GTK_HTML (web_view), editable);
g_object_notify (G_OBJECT (web_view), "editable");
@@ -1917,6 +1932,9 @@ e_web_view_gtkhtml_set_inline_spelling (
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (web_view));
+ if (gtk_html_get_inline_spelling (GTK_HTML (web_view)) == inline_spelling)
+ return;
+
gtk_html_set_inline_spelling (GTK_HTML (web_view), inline_spelling);
g_object_notify (G_OBJECT (web_view), "inline-spelling");
@@ -1943,6 +1961,9 @@ e_web_view_gtkhtml_set_magic_links (EWeb
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (web_view));
+ if (gtk_html_get_magic_links (GTK_HTML (web_view)) == magic_links)
+ return;
+
gtk_html_set_magic_links (GTK_HTML (web_view), magic_links);
g_object_notify (G_OBJECT (web_view), "magic-links");
@@ -1969,6 +1990,9 @@ e_web_view_gtkhtml_set_magic_smileys (EW
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (web_view));
+ if (gtk_html_get_magic_smileys (GTK_HTML (web_view)) == magic_smileys)
+ return;
+
gtk_html_set_magic_smileys (GTK_HTML (web_view), magic_smileys);
g_object_notify (G_OBJECT (web_view), "magic-smileys");
@@ -1988,6 +2012,9 @@ e_web_view_gtkhtml_set_selected_uri (EWe
{
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (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);
@@ -2008,6 +2035,9 @@ e_web_view_gtkhtml_set_cursor_image (EWe
{
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (web_view));
+ if (web_view->priv->cursor_image == image)
+ return;
+
if (image != NULL)
g_object_ref (image);
@@ -2033,6 +2063,9 @@ e_web_view_gtkhtml_set_open_proxy (EWebV
{
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (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);
@@ -2068,6 +2101,9 @@ e_web_view_gtkhtml_set_print_proxy (EWeb
{
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (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);
@@ -2095,6 +2131,9 @@ e_web_view_gtkhtml_set_save_as_proxy (EW
{
g_return_if_fail (E_IS_WEB_VIEW_GTKHTML (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);
diff -up evolution-3.8.5/libemail-engine/e-mail-session.c.labels-gsettings-busy-loop evolution-3.8.5/libemail-engine/e-mail-session.c
--- evolution-3.8.5/libemail-engine/e-mail-session.c.labels-gsettings-busy-loop 2013-07-23 14:51:34.000000000 +0200
+++ evolution-3.8.5/libemail-engine/e-mail-session.c 2014-06-05 12:50:44.149250456 +0200
@@ -406,6 +406,9 @@ mail_session_set_junk_filter_name (EMail
}
}
+ if (camel_session_get_junk_filter (CAMEL_SESSION (session)) == junk_filter)
+ return;
+
camel_session_set_junk_filter (CAMEL_SESSION (session), junk_filter);
/* XXX We emit the "notify" signal in mail_session_notify(). */
@@ -875,7 +878,7 @@ mail_session_idle_refresh_cb (EMailSessi
/* Listen for network state changes and force a
* mail store refresh when coming back online. */
- g_signal_connect (
+ e_signal_connect_notify (
session, "notify::online",
G_CALLBACK (mail_session_force_refresh), NULL);
@@ -1130,7 +1133,7 @@ mail_session_constructed (GObject *objec
G_CALLBACK (mail_session_source_disabled_cb), session);
session->priv->source_disabled_handler_id = handler_id;
- handler_id = g_signal_connect (
+ handler_id = e_signal_connect_notify (
registry, "notify::default-mail-account",
G_CALLBACK (mail_session_default_mail_account_cb), session);
session->priv->default_mail_account_handler_id = handler_id;
diff -up evolution-3.8.5/libemail-engine/mail-config.c.labels-gsettings-busy-loop evolution-3.8.5/libemail-engine/mail-config.c
--- evolution-3.8.5/libemail-engine/mail-config.c.labels-gsettings-busy-loop 2014-06-05 12:51:47.365791700 +0200
+++ evolution-3.8.5/libemail-engine/mail-config.c 2014-06-05 12:53:23.108084994 +0200
@@ -74,11 +74,24 @@ settings_jh_headers_changed (GSettings *
gchar **strv;
gint i;
+ strv = g_settings_get_strv (settings, "junk-custom-header");
+ if (key) {
+ for (i = 0, node = config->jh_header; strv[i] && node; i++, node = g_slist_next (node)) {
+ if (g_strcmp0 (node->data, strv[i]) != 0)
+ break;
+ }
+
+ /* both lists are read to the end, thus they are the same */
+ if (!node && !strv[i]) {
+ g_strfreev (strv);
+ return;
+ }
+ }
+
g_slist_foreach (config->jh_header, (GFunc) g_free, NULL);
g_slist_free (config->jh_header);
config->jh_header = NULL;
- strv = g_settings_get_strv (settings, "junk-custom-header");
for (i = 0; strv[i] != NULL; i++)
config->jh_header = g_slist_append (config->jh_header, g_strdup (strv[i]));
g_strfreev (strv);
@@ -109,6 +122,9 @@ settings_jh_check_changed (GSettings *se
const gchar *key,
EMailSession *session)
{
+ if (key && config->jh_check == g_settings_get_boolean (settings, "junk-check-custom-header"))
+ return;
+
config->jh_check = g_settings_get_boolean (settings, "junk-check-custom-header");
if (!config->jh_check) {
camel_session_set_junk_headers (
diff -up evolution-3.8.5/mail/e-mail-config-assistant.c.labels-gsettings-busy-loop evolution-3.8.5/mail/e-mail-config-assistant.c
--- evolution-3.8.5/mail/e-mail-config-assistant.c.labels-gsettings-busy-loop 2013-07-23 14:51:57.000000000 +0200
+++ evolution-3.8.5/mail/e-mail-config-assistant.c 2014-06-05 12:50:44.149250456 +0200
@@ -630,7 +630,7 @@ mail_config_assistant_constructed (GObje
page, "email-address",
G_BINDING_SYNC_CREATE);
- g_signal_connect (
+ e_signal_connect_notify (
page, "notify::active-backend",
G_CALLBACK (mail_config_assistant_notify_account_backend),
assistant);
@@ -713,7 +713,7 @@ mail_config_assistant_constructed (GObje
page, "email-address",
G_BINDING_SYNC_CREATE);
- g_signal_connect (
+ e_signal_connect_notify (
page, "notify::active-backend",
G_CALLBACK (mail_config_assistant_notify_transport_backend),
assistant);
diff -up evolution-3.8.5/mail/e-mail-display.c.labels-gsettings-busy-loop evolution-3.8.5/mail/e-mail-display.c
--- evolution-3.8.5/mail/e-mail-display.c.labels-gsettings-busy-loop 2013-07-23 14:51:53.000000000 +0200
+++ evolution-3.8.5/mail/e-mail-display.c 2014-06-05 12:53:23.109085002 +0200
@@ -66,6 +66,8 @@ struct _EMailDisplayPrivate {
GHashTable *widgets;
guint scheduled_reload;
+
+ GHashTable *old_settings;
};
enum {
@@ -571,7 +573,7 @@ plugin_widget_set_parent_element (GtkWid
/* Assign the WebKitDOMElement to "parent_element" data of the GtkWidget
* and the GtkWidget to "widget" data of the DOM Element */
- g_object_set_data (G_OBJECT (widget), "parent_element", element);
+ g_object_set_data_full (G_OBJECT (widget), "parent_element", g_object_ref (element), g_object_unref);
g_object_set_data (G_OBJECT (element), "widget", widget);
g_object_bind_property (
@@ -1365,6 +1367,22 @@ mail_display_dispose (GObject *object)
}
static void
+mail_display_finalize (GObject *object)
+{
+ EMailDisplayPrivate *priv;
+
+ priv = E_MAIL_DISPLAY_GET_PRIVATE (object);
+
+ if (priv->old_settings) {
+ g_hash_table_destroy (priv->old_settings);
+ priv->old_settings = NULL;
+ }
+
+ /* Chain up to parent's finalize() method. */
+ G_OBJECT_CLASS (e_mail_display_parent_class)->finalize (object);
+}
+
+static void
mail_display_constructed (GObject *object)
{
e_extensible_load_extensions (E_EXTENSIBLE (object));
@@ -1486,6 +1504,28 @@ mail_display_set_fonts (EWebView *web_vi
}
static void
+e_mail_display_test_change_and_update_fonts_cb (EMailDisplay *mail_display,
+ const gchar *key,
+ GSettings *settings)
+{
+ GVariant *new_value, *old_value;
+
+ new_value = g_settings_get_value (settings, key);
+ old_value = g_hash_table_lookup (mail_display->priv->old_settings, key);
+
+ if (!new_value || !old_value || !g_variant_equal (new_value, old_value)) {
+ if (new_value)
+ g_hash_table_insert (mail_display->priv->old_settings, g_strdup (key), new_value);
+ else
+ g_hash_table_remove (mail_display->priv->old_settings, key);
+
+ e_web_view_update_fonts (E_WEB_VIEW (mail_display));
+ } else if (new_value) {
+ g_variant_unref (new_value);
+ }
+}
+
+static void
e_mail_display_class_init (EMailDisplayClass *class)
{
GObjectClass *object_class;
@@ -1499,6 +1539,7 @@ e_mail_display_class_init (EMailDisplayC
object_class->set_property = mail_display_set_property;
object_class->get_property = mail_display_get_property;
object_class->dispose = mail_display_dispose;
+ object_class->finalize = mail_display_finalize;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->realize = mail_display_realize;
@@ -1574,6 +1615,8 @@ e_mail_display_init (EMailDisplay *displ
display->priv = E_MAIL_DISPLAY_GET_PRIVATE (display);
+ display->priv->old_settings = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
+
/* Set invalid mode so that MODE property initialization is run
* completely (see e_mail_display_set_mode) */
display->priv->mode = E_MAIL_FORMATTER_MODE_INVALID;
@@ -1601,28 +1644,28 @@ e_mail_display_init (EMailDisplay *displ
g_signal_connect (
display, "frame-created",
G_CALLBACK (mail_display_frame_created), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
display, "notify::uri",
G_CALLBACK (mail_display_uri_changed), NULL);
display->priv->settings = g_settings_new ("org.gnome.evolution.mail");
g_signal_connect_swapped (
display->priv->settings , "changed::monospace-font",
- G_CALLBACK (e_web_view_update_fonts), display);
+ G_CALLBACK (e_mail_display_test_change_and_update_fonts_cb), display);
g_signal_connect_swapped (
display->priv->settings , "changed::variable-width-font",
- G_CALLBACK (e_web_view_update_fonts), display);
+ G_CALLBACK (e_mail_display_test_change_and_update_fonts_cb), display);
g_signal_connect_swapped (
display->priv->settings , "changed::use-custom-font",
- G_CALLBACK (e_web_view_update_fonts), display);
+ G_CALLBACK (e_mail_display_test_change_and_update_fonts_cb), display);
e_web_view_update_fonts (E_WEB_VIEW (display));
main_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (display));
- g_signal_connect (
+ e_signal_connect_notify (
main_frame, "notify::load-status",
G_CALLBACK (setup_DOM_bindings), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
main_frame, "notify::load-status",
G_CALLBACK (mail_parts_bind_dom), NULL);
@@ -1698,37 +1741,60 @@ e_mail_display_set_mode (EMailDisplay *d
display->priv->formatter = formatter;
mail_display_update_formatter_colors (display);
- g_signal_connect (
+ e_signal_connect_notify_object (
formatter, "notify::image-loading-policy",
G_CALLBACK (formatter_image_loading_policy_changed_cb),
- display);
+ display, 0);
- g_object_connect (
- formatter,
- "swapped-object-signal::notify::charset",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::image-loading-policy",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::mark-citations",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::show-sender-photo",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::show-real-date",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::animate-images",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::text-color",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::body-color",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::citation-color",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::content-color",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::frame-color",
- G_CALLBACK (e_mail_display_reload), display,
- "swapped-object-signal::notify::header-color",
- G_CALLBACK (e_mail_display_reload), display,
+ e_signal_connect_notify_object (
+ formatter, "notify::charset",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::image-loading-policy",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::mark-citations",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::show-sender-photo",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::show-real-date",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::animate-images",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::text-color",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::body-color",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::citation-color",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::content-color",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::frame-color",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ e_signal_connect_notify_object (
+ formatter, "notify::header-color",
+ G_CALLBACK (e_mail_display_reload), display, G_CONNECT_SWAPPED);
+
+ g_object_connect (formatter,
"swapped-object-signal::need-redraw",
G_CALLBACK (e_mail_display_reload), display,
NULL);
diff -up evolution-3.8.5/mail/e-mail-label-list-store.c.labels-gsettings-busy-loop evolution-3.8.5/mail/e-mail-label-list-store.c
--- evolution-3.8.5/mail/e-mail-label-list-store.c.labels-gsettings-busy-loop 2013-07-23 14:51:54.000000000 +0200
+++ evolution-3.8.5/mail/e-mail-label-list-store.c 2014-06-05 12:50:44.150250448 +0200
@@ -36,9 +36,17 @@
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_MAIL_LABEL_LIST_STORE, EMailLabelListStorePrivate))
+enum {
+ CHANGED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
struct _EMailLabelListStorePrivate {
GHashTable *tag_index;
GSettings *mail_settings;
+ guint idle_changed_id;
};
static struct {
@@ -180,6 +188,11 @@ mail_label_list_store_dispose (GObject *
priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (object);
+ if (priv->idle_changed_id) {
+ g_source_remove (priv->idle_changed_id);
+ priv->idle_changed_id = 0;
+ }
+
if (priv->mail_settings != NULL) {
g_object_unref (priv->mail_settings);
priv->mail_settings = NULL;
@@ -204,14 +217,17 @@ mail_label_list_store_finalize (GObject
finalize (object);
}
-static void
-labels_model_changed_cb (EMailLabelListStore *store)
+static gboolean
+labels_model_changed_idle_cb (gpointer user_data)
{
+ EMailLabelListStore *store = user_data;
GPtrArray *array;
GtkTreeIter tmp_iter;
gboolean iter_set;
- g_return_if_fail (E_IS_MAIL_LABEL_LIST_STORE (store));
+ g_return_val_if_fail (E_IS_MAIL_LABEL_LIST_STORE (store), FALSE);
+
+ store->priv->idle_changed_id = 0;
/* Make sure we don't enter an infinite synchronizing loop */
g_signal_handlers_block_by_func (
@@ -249,6 +265,21 @@ labels_model_changed_cb (EMailLabelListS
g_signal_handlers_unblock_by_func (
store->priv->mail_settings,
labels_settings_changed_cb, store);
+
+ g_signal_emit (store, signals[CHANGED], 0);
+
+ return FALSE;
+}
+
+static void
+labels_model_changed_cb (EMailLabelListStore *store)
+{
+ g_return_if_fail (E_IS_MAIL_LABEL_LIST_STORE (store));
+
+ /* do the actual save and signal emission on idle,
+ to accumulate as many changes as possible */
+ if (!store->priv->idle_changed_id)
+ store->priv->idle_changed_id = g_idle_add (labels_model_changed_idle_cb, store);
}
static void
@@ -257,10 +288,50 @@ labels_settings_changed_cb (GSettings *s
gpointer user_data)
{
EMailLabelListStore *store;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GHashTable *changed_labels;
gchar **strv;
gint i;
store = E_MAIL_LABEL_LIST_STORE (user_data);
+ model = GTK_TREE_MODEL (store);
+
+ strv = g_settings_get_strv (store->priv->mail_settings, "labels");
+
+ /* Check if any label changed first, because GSettings can claim
+ change when nothing changed at all */
+ changed_labels = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ if (gtk_tree_model_get_iter_first (model, &iter)) {
+ do {
+ gchar *label_str = NULL;
+
+ gtk_tree_model_get (model, &iter, 0, &label_str, -1);
+
+ if (label_str)
+ g_hash_table_insert (changed_labels, label_str, NULL);
+ } while (gtk_tree_model_iter_next (model, &iter));
+
+
+ for (i = 0; strv[i] != NULL; i++) {
+ if (!g_hash_table_remove (changed_labels, strv[i])) {
+ g_hash_table_insert (changed_labels, g_strdup (""), NULL);
+ break;
+ }
+ }
+ } else {
+ /* nothing in the store, thus fill it (pretend change) */
+ g_hash_table_insert (changed_labels, g_strdup (""), NULL);
+ }
+
+ /* Nothing changed */
+ if (g_hash_table_size (changed_labels) == 0) {
+ g_hash_table_destroy (changed_labels);
+ g_strfreev (strv);
+ return;
+ }
+
+ g_hash_table_destroy (changed_labels);
/* Make sure we don't enter an infinite synchronizing loop */
g_signal_handlers_block_by_func (
@@ -268,8 +339,6 @@ labels_settings_changed_cb (GSettings *s
gtk_list_store_clear (GTK_LIST_STORE (store));
- strv = g_settings_get_strv (store->priv->mail_settings, "labels");
-
for (i = 0; strv[i] != NULL; i++) {
GtkTreeIter iter;
@@ -359,6 +428,14 @@ e_mail_label_list_store_class_init (EMai
class->icon_factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (class->icon_factory);
+
+ signals[CHANGED] = g_signal_new (
+ "changed",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_FIRST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
}
static void
diff -up evolution-3.8.5/mail/e-mail-paned-view.c.labels-gsettings-busy-loop evolution-3.8.5/mail/e-mail-paned-view.c
--- evolution-3.8.5/mail/e-mail-paned-view.c.labels-gsettings-busy-loop 2013-07-23 14:51:54.000000000 +0200
+++ evolution-3.8.5/mail/e-mail-paned-view.c 2014-06-05 12:50:44.150250448 +0200
@@ -1052,7 +1052,7 @@ e_mail_paned_view_init (EMailPanedView *
view->priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view);
view->priv->enable_show_folder = FALSE;
- g_signal_connect (
+ e_signal_connect_notify (
view, "notify::group-by-threads",
G_CALLBACK (mail_paned_view_notify_group_by_threads_cb),
NULL);
diff -up evolution-3.8.5/mail/e-mail-reader.c.labels-gsettings-busy-loop evolution-3.8.5/mail/e-mail-reader.c
--- evolution-3.8.5/mail/e-mail-reader.c.labels-gsettings-busy-loop 2014-06-05 12:50:43.920252115 +0200
+++ evolution-3.8.5/mail/e-mail-reader.c 2014-06-05 12:50:44.150250448 +0200
@@ -4174,7 +4174,7 @@ connect_signals:
display, "key-press-event",
G_CALLBACK (mail_reader_key_press_event_cb), reader);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
display, "notify::load-status",
G_CALLBACK (mail_reader_load_status_changed_cb), reader);
diff -up evolution-3.8.5/mail/em-filter-rule.c.labels-gsettings-busy-loop evolution-3.8.5/mail/em-filter-rule.c
--- evolution-3.8.5/mail/em-filter-rule.c.labels-gsettings-busy-loop 2013-07-23 14:51:56.000000000 +0200
+++ evolution-3.8.5/mail/em-filter-rule.c 2014-06-05 12:50:44.151250440 +0200
@@ -658,7 +658,7 @@ get_widget (EFilterRule *fr,
g_object_set_data (G_OBJECT (add), "scrolled-window", scrolledwindow);
- g_signal_connect (
+ e_signal_connect_notify (
vadj, "notify::upper",
G_CALLBACK (ensure_scrolled_height_cb), scrolledwindow);
diff -up evolution-3.8.5/modules/addressbook/e-book-shell-view-private.c.labels-gsettings-busy-loop evolution-3.8.5/modules/addressbook/e-book-shell-view-private.c
--- evolution-3.8.5/modules/addressbook/e-book-shell-view-private.c.labels-gsettings-busy-loop 2013-07-23 14:51:45.000000000 +0200
+++ evolution-3.8.5/modules/addressbook/e-book-shell-view-private.c 2014-06-05 12:50:44.151250440 +0200
@@ -333,7 +333,7 @@ book_shell_view_activate_selected_source
G_CALLBACK (contacts_removed),
book_shell_view, G_CONNECT_SWAPPED);
- g_signal_connect_object (
+ e_signal_connect_notify_object (
model, "notify::query",
G_CALLBACK (model_query_changed_cb),
book_shell_view, G_CONNECT_SWAPPED);
@@ -529,7 +529,7 @@ e_book_shell_view_private_init (EBookShe
if (!gal_view_collection_loaded (shell_view_class->view_collection))
book_shell_view_load_view_collection (shell_view_class);
- g_signal_connect (
+ e_signal_connect_notify (
book_shell_view, "notify::view-id",
G_CALLBACK (book_shell_view_notify_view_id_cb), NULL);
}
diff -up evolution-3.8.5/modules/calendar/e-calendar-preferences.c.labels-gsettings-busy-loop evolution-3.8.5/modules/calendar/e-calendar-preferences.c
--- evolution-3.8.5/modules/calendar/e-calendar-preferences.c.labels-gsettings-busy-loop 2013-07-23 14:51:48.000000000 +0200
+++ evolution-3.8.5/modules/calendar/e-calendar-preferences.c 2014-06-05 12:50:44.151250440 +0200
@@ -513,7 +513,7 @@ calendar_preferences_construct (ECalenda
widget, "active",
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- g_signal_connect (
+ e_signal_connect_notify (
shell_settings, "notify::cal-use-system-timezone",
G_CALLBACK (update_system_tz_widgets), prefs);
update_system_tz_widgets (shell_settings, NULL, prefs);
diff -up evolution-3.8.5/modules/calendar/e-cal-shell-content.c.labels-gsettings-busy-loop evolution-3.8.5/modules/calendar/e-cal-shell-content.c
--- evolution-3.8.5/modules/calendar/e-cal-shell-content.c.labels-gsettings-busy-loop 2013-07-23 14:51:47.000000000 +0200
+++ evolution-3.8.5/modules/calendar/e-cal-shell-content.c 2014-06-05 12:50:44.151250440 +0200
@@ -415,7 +415,7 @@ cal_shell_content_constructed (GObject *
for (ii = 0; ii < GNOME_CAL_LAST_VIEW; ii++) {
calendar_view = gnome_calendar_get_calendar_view (calendar, ii);
- g_signal_connect (
+ e_signal_connect_notify (
calendar_view, "notify::is-editing",
G_CALLBACK (cal_shell_content_is_editing_changed_cb), shell_view);
@@ -430,7 +430,7 @@ cal_shell_content_constructed (GObject *
priv->notebook, "page",
G_BINDING_SYNC_CREATE);
- g_signal_connect (
+ e_signal_connect_notify (
widget, "notify::is-editing",
G_CALLBACK (cal_shell_content_is_editing_changed_cb), shell_view);
@@ -521,7 +521,7 @@ cal_shell_content_constructed (GObject *
shell_view);
}
- g_signal_connect (
+ e_signal_connect_notify (
widget, "notify::is-editing",
G_CALLBACK (cal_shell_content_is_editing_changed_cb), shell_view);
@@ -537,7 +537,7 @@ cal_shell_content_constructed (GObject *
priv->view_instance = view_instance;
if (!e_shell_get_express_mode (shell)) {
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
shell_view, "notify::view-id",
G_CALLBACK (cal_shell_content_notify_view_id_cb),
object);
diff -up evolution-3.8.5/modules/calendar/e-cal-shell-settings.c.labels-gsettings-busy-loop evolution-3.8.5/modules/calendar/e-cal-shell-settings.c
--- evolution-3.8.5/modules/calendar/e-cal-shell-settings.c.labels-gsettings-busy-loop 2013-07-23 14:51:47.000000000 +0200
+++ evolution-3.8.5/modules/calendar/e-cal-shell-settings.c 2014-06-05 12:50:44.151250440 +0200
@@ -949,7 +949,7 @@ e_cal_shell_backend_init_settings (EShel
g_object_ref (shell_settings),
(GDestroyNotify) g_object_unref);
- g_signal_connect (
+ e_signal_connect_notify (
shell_settings, "notify::cal-use-system-timezone",
G_CALLBACK (cal_use_system_timezone_changed_cb), NULL);
}
diff -up evolution-3.8.5/modules/calendar/e-cal-shell-view-private.c.labels-gsettings-busy-loop evolution-3.8.5/modules/calendar/e-cal-shell-view-private.c
--- evolution-3.8.5/modules/calendar/e-cal-shell-view-private.c.labels-gsettings-busy-loop 2014-06-05 12:50:43.426255699 +0200
+++ evolution-3.8.5/modules/calendar/e-cal-shell-view-private.c 2014-06-05 12:50:44.152250431 +0200
@@ -484,7 +484,7 @@ e_cal_shell_view_private_init (ECalShell
if (!gal_view_collection_loaded (shell_view_class->view_collection))
cal_shell_view_load_view_collection (shell_view_class);
- g_signal_connect (
+ e_signal_connect_notify (
cal_shell_view, "notify::view-id",
G_CALLBACK (cal_shell_view_notify_view_id_cb), NULL);
}
diff -up evolution-3.8.5/modules/calendar/e-memo-shell-content.c.labels-gsettings-busy-loop evolution-3.8.5/modules/calendar/e-memo-shell-content.c
--- evolution-3.8.5/modules/calendar/e-memo-shell-content.c.labels-gsettings-busy-loop 2013-07-23 14:51:46.000000000 +0200
+++ evolution-3.8.5/modules/calendar/e-memo-shell-content.c 2014-06-05 12:50:44.152250431 +0200
@@ -552,7 +552,7 @@ memo_shell_content_constructed (GObject
G_CALLBACK (memo_shell_content_selection_change_cb),
object);
- g_signal_connect (
+ e_signal_connect_notify (
priv->memo_table, "notify::is-editing",
G_CALLBACK (memo_shell_content_is_editing_changed_cb), shell_view);
diff -up evolution-3.8.5/modules/calendar/e-memo-shell-view-private.c.labels-gsettings-busy-loop evolution-3.8.5/modules/calendar/e-memo-shell-view-private.c
--- evolution-3.8.5/modules/calendar/e-memo-shell-view-private.c.labels-gsettings-busy-loop 2013-07-23 14:51:48.000000000 +0200
+++ evolution-3.8.5/modules/calendar/e-memo-shell-view-private.c 2014-06-05 12:50:44.152250431 +0200
@@ -179,7 +179,7 @@ e_memo_shell_view_private_init (EMemoShe
if (!gal_view_collection_loaded (shell_view_class->view_collection))
memo_shell_view_load_view_collection (shell_view_class);
- g_signal_connect (
+ e_signal_connect_notify (
memo_shell_view, "notify::view-id",
G_CALLBACK (memo_shell_view_notify_view_id_cb), NULL);
}
diff -up evolution-3.8.5/modules/calendar/e-task-shell-content.c.labels-gsettings-busy-loop evolution-3.8.5/modules/calendar/e-task-shell-content.c
--- evolution-3.8.5/modules/calendar/e-task-shell-content.c.labels-gsettings-busy-loop 2013-07-23 14:51:49.000000000 +0200
+++ evolution-3.8.5/modules/calendar/e-task-shell-content.c 2014-06-05 12:50:44.152250431 +0200
@@ -552,7 +552,7 @@ task_shell_content_constructed (GObject
G_CALLBACK (task_shell_content_selection_change_cb),
object);
- g_signal_connect (
+ e_signal_connect_notify (
priv->task_table, "notify::is-editing",
G_CALLBACK (task_shell_content_is_editing_changed_cb), shell_view);
diff -up evolution-3.8.5/modules/calendar/e-task-shell-view-private.c.labels-gsettings-busy-loop evolution-3.8.5/modules/calendar/e-task-shell-view-private.c
--- evolution-3.8.5/modules/calendar/e-task-shell-view-private.c.labels-gsettings-busy-loop 2013-07-23 14:51:48.000000000 +0200
+++ evolution-3.8.5/modules/calendar/e-task-shell-view-private.c 2014-06-05 12:50:44.152250431 +0200
@@ -233,7 +233,7 @@ e_task_shell_view_private_init (ETaskShe
if (!gal_view_collection_loaded (shell_view_class->view_collection))
task_shell_view_load_view_collection (shell_view_class);
- g_signal_connect (
+ e_signal_connect_notify (
task_shell_view, "notify::view-id",
G_CALLBACK (task_shell_view_notify_view_id_cb), NULL);
}
@@ -373,15 +373,15 @@ e_task_shell_view_private_constructed (E
G_BINDING_SYNC_CREATE);
/* Hide Completed Tasks (enable/units/value) */
- g_signal_connect_object (
+ e_signal_connect_notify_object (
shell_settings, "notify::cal-hide-completed-tasks",
G_CALLBACK (task_shell_view_schedule_process_completed_tasks),
task_shell_view, G_CONNECT_SWAPPED);
- g_signal_connect_object (
+ e_signal_connect_notify_object (
shell_settings, "notify::cal-hide-completed-tasks-units",
G_CALLBACK (task_shell_view_schedule_process_completed_tasks),
task_shell_view, G_CONNECT_SWAPPED);
- g_signal_connect_object (
+ e_signal_connect_notify_object (
shell_settings, "notify::cal-hide-completed-tasks-value",
G_CALLBACK (task_shell_view_schedule_process_completed_tasks),
task_shell_view, G_CONNECT_SWAPPED);
diff -up evolution-3.8.5/modules/mail/e-mail-shell-view-private.c.labels-gsettings-busy-loop evolution-3.8.5/modules/mail/e-mail-shell-view-private.c
--- evolution-3.8.5/modules/mail/e-mail-shell-view-private.c.labels-gsettings-busy-loop 2014-06-05 12:50:43.868252492 +0200
+++ evolution-3.8.5/modules/mail/e-mail-shell-view-private.c 2014-06-05 12:50:44.153250423 +0200
@@ -599,7 +599,7 @@ e_mail_shell_view_private_init (EMailShe
if (!gal_view_collection_loaded (shell_view_class->view_collection))
mail_shell_view_load_view_collection (shell_view_class);
- g_signal_connect (
+ e_signal_connect_notify (
mail_shell_view, "notify::view-id",
G_CALLBACK (mail_shell_view_notify_view_id_cb), NULL);
}
@@ -750,17 +750,7 @@ e_mail_shell_view_private_constructed (E
mail_shell_view, G_CONNECT_SWAPPED);
g_signal_connect_object (
- label_store, "row-changed",
- G_CALLBACK (e_mail_shell_view_update_search_filter),
- mail_shell_view, G_CONNECT_SWAPPED);
-
- g_signal_connect_object (
- label_store, "row-deleted",
- G_CALLBACK (e_mail_shell_view_update_search_filter),
- mail_shell_view, G_CONNECT_SWAPPED);
-
- g_signal_connect_object (
- label_store, "row-inserted",
+ label_store, "changed",
G_CALLBACK (e_mail_shell_view_update_search_filter),
mail_shell_view, G_CONNECT_SWAPPED);
diff -up evolution-3.8.5/modules/offline-alert/evolution-offline-alert.c.labels-gsettings-busy-loop evolution-3.8.5/modules/offline-alert/evolution-offline-alert.c
--- evolution-3.8.5/modules/offline-alert/evolution-offline-alert.c.labels-gsettings-busy-loop 2013-07-23 14:51:49.000000000 +0200
+++ evolution-3.8.5/modules/offline-alert/evolution-offline-alert.c 2014-06-05 12:50:44.153250423 +0200
@@ -115,11 +115,11 @@ offline_alert_window_added_cb (GtkApplic
/* Connect these signals after we have the first EShellWindow
* to avoid false-positive signals during EShell initialization. */
- g_signal_connect (
+ e_signal_connect_notify (
shell, "notify::online",
G_CALLBACK (offline_alert_online_cb), extension);
- g_signal_connect (
+ e_signal_connect_notify (
shell, "notify::network-available",
G_CALLBACK (offline_alert_network_available_cb), extension);
diff -up evolution-3.8.5/modules/settings/e-settings-mail-formatter.c.labels-gsettings-busy-loop evolution-3.8.5/modules/settings/e-settings-mail-formatter.c
--- evolution-3.8.5/modules/settings/e-settings-mail-formatter.c.labels-gsettings-busy-loop 2014-06-05 12:52:48.403341562 +0200
+++ evolution-3.8.5/modules/settings/e-settings-mail-formatter.c 2014-06-05 12:53:23.109085002 +0200
@@ -33,6 +33,7 @@
struct _ESettingsMailFormatterPrivate {
GSettings *settings;
+ GSList *old_headers;
gulong headers_changed_id;
};
@@ -63,12 +64,31 @@ settings_mail_formatter_headers_changed_
formatter = settings_mail_formatter_get_extensible (extension);
headers = g_settings_get_strv (settings, "headers");
+ if (key) {
+ GSList *link;
+
+ for (ii = 0, link = extension->priv->old_headers; headers && headers[ii]; ii++, link = g_slist_next (link)) {
+ if (g_strcmp0 (link->data, headers[ii]) != 0)
+ break;
+ }
+
+ /* both lists are read to the end, thus they are the same */
+ if (!headers[ii] && !link) {
+ g_strfreev (headers);
+ return;
+ }
+ }
+
+ g_slist_free_full (extension->priv->old_headers, g_free);
+ extension->priv->old_headers = NULL;
e_mail_formatter_clear_headers (formatter);
for (ii = 0; headers && headers[ii]; ii++) {
EMailReaderHeader *h;
const gchar *xml = headers[ii];
+ extension->priv->old_headers = g_slist_prepend (extension->priv->old_headers, g_strdup (xml));
+
h = e_mail_reader_header_from_xml (xml);
if (h && h->enabled)
e_mail_formatter_add_header (
@@ -78,6 +98,8 @@ settings_mail_formatter_headers_changed_
e_mail_reader_header_free (h);
}
+ extension->priv->old_headers = g_slist_reverse (extension->priv->old_headers);
+
if (!headers || !headers[0])
e_mail_formatter_set_default_headers (formatter);
@@ -99,6 +121,9 @@ settings_mail_formatter_dispose (GObject
priv->settings = NULL;
}
+ g_slist_free_full (priv->old_headers, g_free);
+ priv->old_headers = NULL;
+
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (e_settings_mail_formatter_parent_class)->
dispose (object);
diff -up evolution-3.8.5/modules/settings/e-settings-web-view-gtkhtml.c.labels-gsettings-busy-loop evolution-3.8.5/modules/settings/e-settings-web-view-gtkhtml.c
--- evolution-3.8.5/modules/settings/e-settings-web-view-gtkhtml.c.labels-gsettings-busy-loop 2013-07-23 14:51:40.000000000 +0200
+++ evolution-3.8.5/modules/settings/e-settings-web-view-gtkhtml.c 2014-06-05 12:50:44.153250423 +0200
@@ -34,6 +34,13 @@
struct _ESettingsWebViewGtkHTMLPrivate {
GtkCssProvider *css_provider;
EShellSettings *shell_settings;
+
+ gulong notify_mail_use_custom_fonts_id;
+ gulong notify_mail_font_monospace_id;
+ gulong notify_mail_font_variable_id;
+ gulong notify_mail_mark_citations_id;
+ gulong notify_mail_citation_color_id;
+ gulong notify_composer_spell_color_id;
};
G_DEFINE_DYNAMIC_TYPE (
@@ -181,32 +188,32 @@ settings_web_view_gtkhtml_realize (GtkWi
/* Reload the style sheet when certain settings change. */
- g_signal_connect_swapped (
+ extension->priv->notify_mail_use_custom_fonts_id = e_signal_connect_notify_swapped (
shell_settings, "notify::mail-use-custom-fonts",
G_CALLBACK (settings_web_view_gtkhtml_load_style),
extension);
- g_signal_connect_swapped (
+ extension->priv->notify_mail_font_monospace_id = e_signal_connect_notify_swapped (
shell_settings, "notify::mail-font-monospace",
G_CALLBACK (settings_web_view_gtkhtml_load_style),
extension);
- g_signal_connect_swapped (
+ extension->priv->notify_mail_font_variable_id = e_signal_connect_notify_swapped (
shell_settings, "notify::mail-font-variable",
G_CALLBACK (settings_web_view_gtkhtml_load_style),
extension);
- g_signal_connect_swapped (
+ extension->priv->notify_mail_mark_citations_id = e_signal_connect_notify_swapped (
shell_settings, "notify::mail-mark-citations",
G_CALLBACK (settings_web_view_gtkhtml_load_style),
extension);
- g_signal_connect_swapped (
+ extension->priv->notify_mail_citation_color_id = e_signal_connect_notify_swapped (
shell_settings, "notify::mail-citation-color",
G_CALLBACK (settings_web_view_gtkhtml_load_style),
extension);
- g_signal_connect_swapped (
+ extension->priv->notify_composer_spell_color_id = e_signal_connect_notify_swapped (
shell_settings, "notify::composer-spell-color",
G_CALLBACK (settings_web_view_gtkhtml_load_style),
extension);
@@ -225,9 +232,13 @@ settings_web_view_gtkhtml_dispose (GObje
}
if (priv->shell_settings != NULL) {
- g_signal_handlers_disconnect_by_func (
- priv->shell_settings,
- settings_web_view_gtkhtml_load_style, object);
+ e_signal_disconnect_notify_handler (priv->shell_settings, &priv->notify_mail_use_custom_fonts_id);
+ e_signal_disconnect_notify_handler (priv->shell_settings, &priv->notify_mail_font_monospace_id);
+ e_signal_disconnect_notify_handler (priv->shell_settings, &priv->notify_mail_font_variable_id);
+ e_signal_disconnect_notify_handler (priv->shell_settings, &priv->notify_mail_mark_citations_id);
+ e_signal_disconnect_notify_handler (priv->shell_settings, &priv->notify_mail_citation_color_id);
+ e_signal_disconnect_notify_handler (priv->shell_settings, &priv->notify_composer_spell_color_id);
+
g_object_unref (priv->shell_settings);
priv->shell_settings = NULL;
}
diff -up evolution-3.8.5/modules/startup-wizard/e-mail-config-import-progress-page.c.labels-gsettings-busy-loop evolution-3.8.5/modules/startup-wizard/e-mail-config-import-progress-page.c
--- evolution-3.8.5/modules/startup-wizard/e-mail-config-import-progress-page.c.labels-gsettings-busy-loop 2013-07-23 14:51:49.000000000 +0200
+++ evolution-3.8.5/modules/startup-wizard/e-mail-config-import-progress-page.c 2014-06-05 12:50:44.153250423 +0200
@@ -183,7 +183,7 @@ mail_config_import_progress_page_constru
activity = e_mail_config_import_progress_page_get_activity (page);
/* The activity state affects the "check-complete" result. */
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
activity, "notify::state",
G_CALLBACK (e_mail_config_page_changed), page);
diff -up evolution-3.8.5/plugins/mail-to-task/mail-to-task.c.labels-gsettings-busy-loop evolution-3.8.5/plugins/mail-to-task/mail-to-task.c
--- evolution-3.8.5/plugins/mail-to-task/mail-to-task.c.labels-gsettings-busy-loop 2013-07-23 14:51:37.000000000 +0200
+++ evolution-3.8.5/plugins/mail-to-task/mail-to-task.c 2014-06-05 12:50:44.153250423 +0200
@@ -795,7 +795,7 @@ do_manage_comp_idle (struct _manage_comp
/* Force editor's title change */
comp_editor_title_changed (GTK_WIDGET (editor), NULL, mc);
- g_signal_connect (
+ e_signal_connect_notify (
editor, "notify::title",
G_CALLBACK (comp_editor_title_changed), mc);
g_signal_connect (
diff -up evolution-3.8.5/plugins/publish-calendar/publish-calendar.c.labels-gsettings-busy-loop evolution-3.8.5/plugins/publish-calendar/publish-calendar.c
--- evolution-3.8.5/plugins/publish-calendar/publish-calendar.c.labels-gsettings-busy-loop 2013-07-23 14:51:37.000000000 +0200
+++ evolution-3.8.5/plugins/publish-calendar/publish-calendar.c 2014-06-05 12:50:44.154250416 +0200
@@ -988,10 +988,12 @@ e_plugin_lib_enable (EPlugin *ep,
EShell *shell = e_shell_get_default ();
if (shell) {
- g_signal_handlers_disconnect_by_func (shell, G_CALLBACK (online_state_changed), NULL);
+ static gulong notify_online_id = 0;
+
+ e_signal_disconnect_notify_handler (shell, ¬ify_online_id);
if (enable) {
online = e_shell_get_online (shell);
- g_signal_connect (
+ notify_online_id = e_signal_connect_notify (
shell, "notify::online",
G_CALLBACK (online_state_changed), NULL);
}
diff -up evolution-3.8.5/shell/e-shell.c.labels-gsettings-busy-loop evolution-3.8.5/shell/e-shell.c
--- evolution-3.8.5/shell/e-shell.c.labels-gsettings-busy-loop 2013-07-23 14:52:24.000000000 +0200
+++ evolution-3.8.5/shell/e-shell.c 2014-06-05 12:50:44.154250416 +0200
@@ -1268,7 +1268,7 @@ e_shell_init (EShell *shell)
shell_parse_debug_string (shell);
- g_signal_connect (
+ e_signal_connect_notify (
shell, "notify::online",
G_CALLBACK (shell_notify_online_cb), NULL);
diff -up evolution-3.8.5/shell/e-shell-switcher.c.labels-gsettings-busy-loop evolution-3.8.5/shell/e-shell-switcher.c
--- evolution-3.8.5/shell/e-shell-switcher.c.labels-gsettings-busy-loop 2013-07-23 14:52:25.000000000 +0200
+++ evolution-3.8.5/shell/e-shell-switcher.c 2014-06-05 12:50:44.154250416 +0200
@@ -34,6 +34,8 @@
#include <glib/gi18n.h>
#include <libebackend/libebackend.h>
+#include <e-util/e-util.h>
+
#define E_SHELL_SWITCHER_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate))
@@ -377,7 +379,7 @@ shell_switcher_screen_changed (GtkWidget
if (settings != NULL) {
priv->settings = g_object_ref (settings);
- priv->settings_handler_id = g_signal_connect_swapped (
+ priv->settings_handler_id = e_signal_connect_notify_swapped (
settings, "notify::gtk-toolbar-style",
G_CALLBACK (shell_switcher_toolbar_style_changed_cb),
widget);
diff -up evolution-3.8.5/shell/e-shell-window.c.labels-gsettings-busy-loop evolution-3.8.5/shell/e-shell-window.c
--- evolution-3.8.5/shell/e-shell-window.c.labels-gsettings-busy-loop 2013-08-10 23:38:43.000000000 +0200
+++ evolution-3.8.5/shell/e-shell-window.c 2014-06-05 12:50:44.154250416 +0200
@@ -431,7 +431,7 @@ shell_window_construct_menubar (EShellWi
main_menu = child;
}
- g_signal_connect (
+ e_signal_connect_notify (
shell_window, "notify::active-view",
G_CALLBACK (shell_window_menubar_update_new_menu), NULL);
@@ -568,7 +568,7 @@ shell_window_construct_sidebar (EShellWi
shell_window->priv->sidebar_notebook = g_object_ref (notebook);
gtk_widget_show (notebook);
- g_signal_connect (
+ e_signal_connect_notify (
shell_window, "notify::active-view",
G_CALLBACK (shell_window_set_notebook_page), notebook);
@@ -596,7 +596,7 @@ shell_window_construct_content (EShellWi
shell_window->priv->content_notebook = g_object_ref (widget);
gtk_widget_show (widget);
- g_signal_connect (
+ e_signal_connect_notify (
shell_window, "notify::active-view",
G_CALLBACK (shell_window_set_notebook_page), widget);
@@ -661,7 +661,7 @@ shell_window_construct_taskbar (EShellWi
shell_window->priv->status_notebook = g_object_ref (notebook);
gtk_widget_show (notebook);
- g_signal_connect (
+ e_signal_connect_notify (
shell_window, "notify::active-view",
G_CALLBACK (shell_window_set_notebook_page), notebook);
@@ -743,15 +743,15 @@ shell_window_create_shell_view (EShellWi
/* Listen for changes that affect the shell window. */
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
action, "notify::icon-name",
G_CALLBACK (e_shell_window_update_icon), shell_window);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
shell_view, "notify::title",
G_CALLBACK (e_shell_window_update_title), shell_window);
- g_signal_connect_swapped (
+ e_signal_connect_notify_swapped (
shell_view, "notify::view-id",
G_CALLBACK (e_shell_window_update_view_menu), shell_window);
diff -up evolution-3.8.5/shell/e-shell-window-private.c.labels-gsettings-busy-loop evolution-3.8.5/shell/e-shell-window-private.c
--- evolution-3.8.5/shell/e-shell-window-private.c.labels-gsettings-busy-loop 2013-07-23 14:52:25.000000000 +0200
+++ evolution-3.8.5/shell/e-shell-window-private.c 2014-06-05 12:50:44.154250416 +0200
@@ -329,19 +329,19 @@ e_shell_window_private_constructed (EShe
/* Bunch of chores to do when the active view changes. */
- g_signal_connect (
+ e_signal_connect_notify (
shell_window, "notify::active-view",
G_CALLBACK (e_shell_window_update_icon), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
shell_window, "notify::active-view",
G_CALLBACK (e_shell_window_update_title), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
shell_window, "notify::active-view",
G_CALLBACK (e_shell_window_update_view_menu), NULL);
- g_signal_connect (
+ e_signal_connect_notify (
shell_window, "notify::active-view",
G_CALLBACK (e_shell_window_update_search_menu), NULL);
diff -up evolution-3.8.5/smime/gui/certificate-manager.c.labels-gsettings-busy-loop evolution-3.8.5/smime/gui/certificate-manager.c
--- evolution-3.8.5/smime/gui/certificate-manager.c.labels-gsettings-busy-loop 2013-07-23 14:52:23.000000000 +0200
+++ evolution-3.8.5/smime/gui/certificate-manager.c 2014-06-05 12:50:44.155250410 +0200
@@ -440,7 +440,7 @@ treeview_add_column (CertPage *cp,
g_signal_connect (
item, "toggled",
G_CALLBACK (header_popup_item_toggled), column);
- g_signal_connect (
+ e_signal_connect_notify (
column, "notify::visible",
G_CALLBACK (treeview_column_visibility_changed), item);
}