diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-04-22 02:52:23 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-04-22 05:07:15 +0800 |
commit | 7950d6a0c6efd6c4d48afd99c138f38952bdd1bb (patch) | |
tree | 3a8fd7957dd29441120d2db18ccb1cc23f5935f2 /modules/addressbook/e-book-shell-view-actions.c | |
parent | 397b15ff4aa5afd1d5c7e0a093a33616624401cf (diff) | |
download | gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.gz gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.zst gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.zip |
Adapt to libedataserver[ui] changes.
Diffstat (limited to 'modules/addressbook/e-book-shell-view-actions.c')
-rw-r--r-- | modules/addressbook/e-book-shell-view-actions.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c index 33c382bc4f..50834113c9 100644 --- a/modules/addressbook/e-book-shell-view-actions.c +++ b/modules/addressbook/e-book-shell-view-actions.c @@ -73,20 +73,23 @@ action_address_book_delete_cb (GtkAction *action, book_shell_sidebar = book_shell_view->priv->book_shell_sidebar; selector = e_book_shell_sidebar_get_selector (book_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); g_return_if_fail (source != NULL); response = e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "addressbook:ask-delete-addressbook", - e_source_peek_name (source), NULL); + e_source_get_display_name (source), NULL); - if (response != GTK_RESPONSE_YES) + if (response != GTK_RESPONSE_YES) { + g_object_unref (source); return; + } book = e_book_client_new (source, &error); if (error != NULL) { g_warning ("Error removing addressbook: %s", error->message); + g_object_unref (source); g_error_free (error); return; } @@ -95,6 +98,7 @@ action_address_book_delete_cb (GtkAction *action, e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "addressbook:remove-addressbook", NULL); + g_object_unref (source); g_object_unref (book); return; } @@ -107,6 +111,7 @@ action_address_book_delete_cb (GtkAction *action, e_source_list_sync (source_list, NULL); + g_object_unref (source); g_object_unref (book); } @@ -187,10 +192,10 @@ action_address_book_properties_cb (GtkAction *action, book_shell_sidebar = book_shell_view->priv->book_shell_sidebar; selector = e_book_shell_sidebar_get_selector (book_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); g_return_if_fail (source != NULL); - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); uid_to_editor = book_shell_view->priv->uid_to_editor; closure = g_hash_table_lookup (uid_to_editor, uid); @@ -213,6 +218,8 @@ action_address_book_properties_cb (GtkAction *action, } gtk_window_present (GTK_WINDOW (closure->editor)); + + g_object_unref (source); } #ifdef WITH_CONTACT_MAPS |