diff options
author | Michael Meeks <michael.meeks@novell.com> | 2010-08-21 03:03:21 +0800 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-08-21 03:04:37 +0800 |
commit | acb73cd1058e5351a80408ba49975eb5ba73287a (patch) | |
tree | 0f2166eeb1c33df7f4f094a8563de5da7b509b9b | |
parent | 44a6aed772d7b1aca9b1679f5208d5def608e1bf (diff) | |
download | gsoc2013-evolution-acb73cd1058e5351a80408ba49975eb5ba73287a.tar.gz gsoc2013-evolution-acb73cd1058e5351a80408ba49975eb5ba73287a.tar.zst gsoc2013-evolution-acb73cd1058e5351a80408ba49975eb5ba73287a.zip |
Fix more non-removal of signals on user_data object distruction by
using g_signal_connect_object in many places; fixes bgo#627525#
-rw-r--r-- | modules/calendar/e-task-shell-view-private.c | 72 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-private.c | 104 |
2 files changed, 88 insertions, 88 deletions
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c index 291f967015..e5cf75711c 100644 --- a/modules/calendar/e-task-shell-view-private.c +++ b/modules/calendar/e-task-shell-view-private.c @@ -246,80 +246,80 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) task_shell_sidebar = E_TASK_SHELL_SIDEBAR (shell_sidebar); selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); - g_signal_connect_swapped ( + g_signal_connect_object ( model, "notify::timezone", G_CALLBACK (e_task_shell_view_update_timezone), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( model, "row-appended", G_CALLBACK (task_shell_view_model_row_appended_cb), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( task_table, "open-component", G_CALLBACK (e_task_shell_view_open_task), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( task_table, "popup-event", G_CALLBACK (task_shell_view_table_popup_event_cb), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( task_table, "selection-change", G_CALLBACK (e_task_shell_view_update_sidebar), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( task_table, "selection-change", G_CALLBACK (e_shell_view_update_actions), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( task_table, "status-message", G_CALLBACK (e_task_shell_view_set_status_message), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( model, "model-changed", G_CALLBACK (e_task_shell_view_update_sidebar), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( model, "model-rows-deleted", G_CALLBACK (e_task_shell_view_update_sidebar), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( model, "model-rows-inserted", G_CALLBACK (e_task_shell_view_update_sidebar), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( task_shell_sidebar, "client-added", G_CALLBACK (task_shell_view_selector_client_added_cb), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( task_shell_sidebar, "client-removed", G_CALLBACK (task_shell_view_selector_client_removed_cb), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( task_shell_sidebar, "status-message", G_CALLBACK (e_task_shell_view_set_status_message), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( selector, "popup-event", G_CALLBACK (task_shell_view_selector_popup_event_cb), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( selector, "primary-selection-changed", G_CALLBACK (e_shell_view_update_actions), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); e_categories_add_change_hook ( (GHookFunc) e_task_shell_view_update_search_filter, @@ -336,18 +336,18 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) model, "default-client"); /* Hide Completed Tasks (enable/units/value) */ - g_signal_connect_swapped ( + g_signal_connect_object ( shell_settings, "notify::cal-hide-completed-tasks", G_CALLBACK (task_shell_view_process_completed_tasks), - task_shell_view); - g_signal_connect_swapped ( + task_shell_view, G_CONNECT_SWAPPED); + g_signal_connect_object ( shell_settings, "notify::cal-hide-completed-tasks-units", G_CALLBACK (task_shell_view_process_completed_tasks), - task_shell_view); - g_signal_connect_swapped ( + task_shell_view, G_CONNECT_SWAPPED); + g_signal_connect_object ( shell_settings, "notify::cal-hide-completed-tasks-value", G_CALLBACK (task_shell_view_process_completed_tasks), - task_shell_view); + task_shell_view, G_CONNECT_SWAPPED); e_task_shell_view_actions_init (task_shell_view); e_task_shell_view_update_sidebar (task_shell_view); diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index d11322899d..b1fcc726f8 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -143,10 +143,10 @@ mail_shell_view_folder_tree_popup_event_cb (EShellView *shell_view, widget_path = "/mail-folder-popup"; menu = e_shell_view_show_popup_menu (shell_view, widget_path, event); - g_signal_connect_swapped ( + g_signal_connect_object ( menu, "selection-done", G_CALLBACK (mail_shell_view_folder_tree_selection_done_cb), - shell_view); + shell_view, G_CONNECT_SWAPPED); } static gboolean @@ -324,41 +324,41 @@ mail_shell_view_reader_changed_cb (EMailShellView *mail_shell_view, mail_shell_view_message_list_key_press_cb, NULL)) return; - g_signal_connect_swapped ( + g_signal_connect_object ( message_list, "key-press", G_CALLBACK (mail_shell_view_message_list_key_press_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( message_list, "popup-menu", G_CALLBACK (mail_shell_view_message_list_popup_menu_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( message_list, "right-click", G_CALLBACK (mail_shell_view_message_list_right_click_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( web_view, "key-press-event", G_CALLBACK (mail_shell_view_key_press_event_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( web_view, "popup-event", G_CALLBACK (mail_shell_view_popup_event_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_data ( + g_signal_connect_object ( web_view, "scroll", G_CALLBACK (mail_shell_view_scroll_cb), - mail_shell_view, (GClosureNotify) NULL, + mail_shell_view, G_CONNECT_AFTER | G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( web_view, "status-message", G_CALLBACK (e_shell_taskbar_set_message), - shell_taskbar); + shell_taskbar, G_CONNECT_SWAPPED); } static void @@ -534,101 +534,101 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view) web_view = em_format_html_get_web_view (formatter); - g_signal_connect_swapped ( + g_signal_connect_object ( folder_tree, "folder-selected", G_CALLBACK (mail_shell_view_folder_tree_selected_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( folder_tree, "key-press-event", G_CALLBACK (mail_shell_view_folder_tree_key_press_event_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( folder_tree, "popup-event", G_CALLBACK (mail_shell_view_folder_tree_popup_event_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( message_list, "key-press", G_CALLBACK (mail_shell_view_message_list_key_press_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( message_list, "popup-menu", G_CALLBACK (mail_shell_view_message_list_popup_menu_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( message_list, "right-click", G_CALLBACK (mail_shell_view_message_list_right_click_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( reader, "changed", G_CALLBACK (mail_shell_view_reader_changed_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( reader, "folder-loaded", G_CALLBACK (e_mail_shell_content_update_view_instance), - shell_content); + shell_content, G_CONNECT_SWAPPED); /* Use the same callback as "changed". */ - g_signal_connect_swapped ( + g_signal_connect_object ( reader, "folder-loaded", G_CALLBACK (mail_shell_view_reader_changed_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( reader, "folder-loaded", G_CALLBACK (e_mail_shell_view_restore_state), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( tree_model, "row-changed", G_CALLBACK (e_mail_shell_view_update_search_filter), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( tree_model, "row-deleted", G_CALLBACK (e_mail_shell_view_update_search_filter), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( tree_model, "row-inserted", G_CALLBACK (e_mail_shell_view_update_search_filter), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( web_view, "key-press-event", G_CALLBACK (mail_shell_view_key_press_event_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( web_view, "popup-event", G_CALLBACK (mail_shell_view_popup_event_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); - g_signal_connect_data ( + g_signal_connect_object ( web_view, "scroll", G_CALLBACK (mail_shell_view_scroll_cb), - mail_shell_view, (GClosureNotify) NULL, + mail_shell_view, G_CONNECT_AFTER | G_CONNECT_SWAPPED); - g_signal_connect_swapped ( + g_signal_connect_object ( web_view, "status-message", G_CALLBACK (e_shell_taskbar_set_message), - shell_taskbar); + shell_taskbar, G_CONNECT_SWAPPED); /* Need to keep the handler ID so we can disconnect it in * dispose(). The shell outlives us and we don't want it * invoking callbacks on finalized shell views. */ priv->prepare_for_quit_handler_id = - g_signal_connect_swapped ( + g_signal_connect_object ( shell, "prepare-for-quit", G_CALLBACK (mail_shell_view_prepare_for_quit_cb), - mail_shell_view); + mail_shell_view, G_CONNECT_SWAPPED); e_mail_reader_init (reader); e_mail_shell_view_actions_init (mail_shell_view); |