aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-10-11 16:31:29 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-10-11 16:31:29 +0800
commit81c256ebc1597ccce365adca9861dd96822cf4cd (patch)
treeadfae342966cf08286f9453e97e789f190654dd0 /addressbook/backend
parent4e40ea7c7fe9c469706b23414b1dbe0884e5f267 (diff)
downloadgsoc2013-evolution-81c256ebc1597ccce365adca9861dd96822cf4cd.tar.gz
gsoc2013-evolution-81c256ebc1597ccce365adca9861dd96822cf4cd.tar.zst
gsoc2013-evolution-81c256ebc1597ccce365adca9861dd96822cf4cd.zip
Check that view->view != NULL. (save_contact_cb): Check that view->view !=
2001-10-11 Jon Trowbridge <trow@ximian.com> * gui/component/addressbook.c (new_contact_cb): Check that view->view != NULL. (save_contact_cb): Check that view->view != NULL. (search_cb): Check that view->view != NULL. (delete_contact_cb): Check that view->view != NULL. (print_cb): Check that view->view != NULL. (print_preview_cb): Check that view->view != NULL. (stop_loading_cb): Check that view->view != NULL. (cut_contacts_cb): Check that view->view != NULL. (copy_contacts_cb): Check that view->view != NULL. (paste_contacts_cb): Check that view->view != NULL. (select_all_contacts_cb): Check that view->view != NULL. (send_contact_cb): Check that view->view != NULL. (send_contact_to_cb): Check that view->view != NULL. (update_command_state): Check that view->view != NULL. Hold a reference to the AddressbookView for the duration of the function, in case we exit during bonobo-reentrancy. (addressbook_view_ref): Added. (addressbook_view_unref): Added. Simple ref counting for AddressbookView objects. (addressbook_view_clear): Zero out an AddressbookView. This is now separated from the deallocation of the AddressbookView object, so that we don't leave a dangling pointer if we exit during bonobo-reentrancy in update_command_state. (Which often seems to happen if we exit while addressbook operations are going on.) (destroy_callback): Replace previous call to addressbook_view_free with addressbook_view_clear/addressbook_view_unref calls. (addressbook_factory_new_control): Initialize the reference count in the AddressbookView object. * gui/widgets/e-addressbook-view.c (e_addressbook_view_destroy): Carefully zero out our destroyed object. (command_state_change): Hold a reference to ourselves during the signal emission. (get_selected_cards): Ref cards as we add them to the list. (e_addressbook_view_stop): Check for view != NULL. (e_addressbook_view_can_create): Check for view != NULL. (e_addressbook_view_can_print): Check for view != NULL. (e_addressbook_view_can_save_as): Check for view != NULL. (e_addressbook_view_can_send): Check for view != NULL. (e_addressbook_view_can_send_to): Check for view != NULL. (e_addressbook_view_can_delete): Check for view != NULL. (e_addressbook_view_can_cut): Check for view != NULL. (e_addressbook_view_can_copy): Check for view != NULL. (e_addressbook_view_can_paste): Check for view != NULL. (e_addressbook_view_can_select_all): Check for view != NULL. (e_addressbook_view_can_stop): Check for view != NULL. * gui/widgets/e-addressbook-model.c (addressbook_destroy): Be careful about zeroing out our destroyed object. * backend/ebook/e-book-view.c (e_book_view_stop): Added. Stops event processing in the underlying listener. svn path=/trunk/; revision=13578
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/ebook/e-book-view.c8
-rw-r--r--addressbook/backend/ebook/e-book-view.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-book-view.c b/addressbook/backend/ebook/e-book-view.c
index e56c7e90bc..1af893bcd6 100644
--- a/addressbook/backend/ebook/e-book-view.c
+++ b/addressbook/backend/ebook/e-book-view.c
@@ -207,6 +207,14 @@ e_book_view_set_book (EBookView *book_view, EBook *book)
gtk_object_ref (GTK_OBJECT (book));
}
+void
+e_book_view_stop (EBookView *book_view)
+{
+ g_return_if_fail (book_view && E_IS_BOOK_VIEW (book_view));
+ if (book_view->priv->listener)
+ e_book_view_listener_stop (book_view->priv->listener);
+}
+
static void
e_book_view_init (EBookView *book_view)
{
diff --git a/addressbook/backend/ebook/e-book-view.h b/addressbook/backend/ebook/e-book-view.h
index 5e576d6642..86326ca5b7 100644
--- a/addressbook/backend/ebook/e-book-view.h
+++ b/addressbook/backend/ebook/e-book-view.h
@@ -49,6 +49,8 @@ GtkType e_book_view_get_type (void);
void e_book_view_set_book (EBookView *book_view, struct _EBook *book);
+void e_book_view_stop (EBookView *book_view);
+
#define E_BOOK_VIEW_TYPE (e_book_view_get_type ())
#define E_BOOK_VIEW(o) (GTK_CHECK_CAST ((o), E_BOOK_VIEW_TYPE, EBookView))
#define E_BOOK_VIEW_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_BOOK_VIEW_TYPE, EBookViewClass))