aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/addressbook/e-book-shell-view-private.c56
-rw-r--r--modules/addressbook/e-book-shell-view.c7
2 files changed, 36 insertions, 27 deletions
diff --git a/modules/addressbook/e-book-shell-view-private.c b/modules/addressbook/e-book-shell-view-private.c
index 746a11c4e7..a9b64a39d8 100644
--- a/modules/addressbook/e-book-shell-view-private.c
+++ b/modules/addressbook/e-book-shell-view-private.c
@@ -139,6 +139,9 @@ contact_changed (EBookShellView *book_shell_view,
EBookShellContent *book_shell_content;
EContact *contact;
+ g_return_if_fail (E_IS_SHELL_VIEW (book_shell_view));
+ g_return_if_fail (book_shell_view->priv != NULL);
+
book_shell_content = book_shell_view->priv->book_shell_content;
contact = e_addressbook_model_contact_at (model, index);
@@ -158,6 +161,9 @@ contacts_removed (EBookShellView *book_shell_view,
EBookShellContent *book_shell_content;
EContact *preview_contact;
+ g_return_if_fail (E_IS_SHELL_VIEW (book_shell_view));
+ g_return_if_fail (book_shell_view->priv != NULL);
+
book_shell_content = book_shell_view->priv->book_shell_content;
preview_contact =
@@ -259,22 +265,22 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view,
hash_table, g_strdup (uid),
g_object_ref (widget));
- g_signal_connect_swapped (
- widget, "open-contact",
- G_CALLBACK (open_contact), book_shell_view);
+ g_signal_connect_object (
+ widget, "open-contact", G_CALLBACK (open_contact),
+ book_shell_view, G_CONNECT_SWAPPED);
- g_signal_connect_swapped (
- widget, "popup-event",
- G_CALLBACK (popup_event), book_shell_view);
+ g_signal_connect_object (
+ widget, "popup-event", G_CALLBACK (popup_event),
+ book_shell_view, G_CONNECT_SWAPPED);
- g_signal_connect_swapped (
+ g_signal_connect_object (
widget, "command-state-change",
G_CALLBACK (e_shell_view_update_actions),
- book_shell_view);
+ book_shell_view, G_CONNECT_SWAPPED);
- g_signal_connect_swapped (
- widget, "selection-change",
- G_CALLBACK (selection_change), book_shell_view);
+ g_signal_connect_object (
+ widget, "selection-change", G_CALLBACK (selection_change),
+ book_shell_view, G_CONNECT_SWAPPED);
book = e_book_new (source, NULL);
view = E_ADDRESSBOOK_VIEW (widget);
@@ -284,13 +290,13 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view,
model = e_addressbook_view_get_model (view);
- g_signal_connect_swapped (
- model, "contact-changed",
- G_CALLBACK (contact_changed), book_shell_view);
+ g_signal_connect_object (
+ model, "contact-changed", G_CALLBACK (contact_changed),
+ book_shell_view, G_CONNECT_SWAPPED);
- g_signal_connect_swapped (
- model, "contacts-removed",
- G_CALLBACK (contacts_removed), book_shell_view);
+ g_signal_connect_object (
+ model, "contacts-removed", G_CALLBACK (contacts_removed),
+ book_shell_view, G_CONNECT_SWAPPED);
}
e_book_shell_content_set_current_view (
@@ -478,25 +484,25 @@ e_book_shell_view_private_constructed (EBookShellView *book_shell_view)
selector = e_book_shell_sidebar_get_selector (
E_BOOK_SHELL_SIDEBAR (shell_sidebar));
- g_signal_connect_swapped (
+ g_signal_connect_object (
selector, "button-press-event",
G_CALLBACK (book_shell_view_selector_button_press_event_cb),
- book_shell_view);
+ book_shell_view, G_CONNECT_SWAPPED);
- g_signal_connect_swapped (
+ g_signal_connect_object (
selector, "key-press-event",
G_CALLBACK (book_shell_view_selector_key_press_event_cb),
- book_shell_view);
+ book_shell_view, G_CONNECT_SWAPPED);
- g_signal_connect_swapped (
+ g_signal_connect_object (
selector, "popup-menu",
G_CALLBACK (book_shell_view_selector_popup_menu_cb),
- book_shell_view);
+ book_shell_view, G_CONNECT_SWAPPED);
- g_signal_connect_swapped (
+ g_signal_connect_object (
selector, "primary-selection-changed",
G_CALLBACK (book_shell_view_activate_selected_source),
- book_shell_view);
+ book_shell_view, G_CONNECT_SWAPPED);
e_categories_add_change_hook (
(GHookFunc) e_book_shell_view_update_search_filter,
diff --git a/modules/addressbook/e-book-shell-view.c b/modules/addressbook/e-book-shell-view.c
index e7b1c7b0b0..2ac5d98968 100644
--- a/modules/addressbook/e-book-shell-view.c
+++ b/modules/addressbook/e-book-shell-view.c
@@ -33,6 +33,9 @@ book_shell_view_source_list_changed_cb (EBookShellView *book_shell_view,
EShellView *shell_view;
GList *keys, *iter;
+ g_return_if_fail (E_IS_SHELL_VIEW (book_shell_view));
+ g_return_if_fail (book_shell_view->priv != NULL);
+
shell_view = E_SHELL_VIEW (book_shell_view);
book_shell_content = book_shell_view->priv->book_shell_content;
@@ -114,10 +117,10 @@ book_shell_view_constructed (GObject *object)
book_shell_backend = book_shell_view->priv->book_shell_backend;
source_list = e_book_shell_backend_get_source_list (book_shell_backend);
- g_signal_connect_swapped (
+ g_signal_connect_object (
source_list, "changed",
G_CALLBACK (book_shell_view_source_list_changed_cb),
- book_shell_view);
+ book_shell_view, G_CONNECT_SWAPPED);
}
static void