From 2788f38ed6cd4e82a8eda5183242457e145019d1 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 12 Feb 2002 23:49:39 +0000 Subject: Added an argument to get the model. 2002-02-12 Christopher James Lahey * gui/widgets/e-addressbook-reflow-adapter.c (addressbook_get_arg): Added an argument to get the model. * gui/widgets/e-addressbook-view.c (writable_status): Don't bother connecting to the writable_status callback on the book, simply rely on the writable_status callback on the addressbook model. * gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h (set_empty_message): Handle the case of a read only view here. svn path=/trunk/; revision=15698 --- addressbook/gui/widgets/e-addressbook-view.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'addressbook/gui/widgets/e-addressbook-view.c') diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index e89aa98691..a7e81d7c5b 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -320,13 +320,10 @@ e_addressbook_view_new (void) } static void -book_writable_cb (EBook *book, gboolean writable, EAddressbookView *eav) +writable_status (GtkObject *object, gboolean writable, EAddressbookView *eav) { eav->editable = writable; - gtk_object_set (GTK_OBJECT (eav->model), - "editable", eav->editable, - NULL); - writable_status (GTK_OBJECT(book), writable, eav); + command_state_change (eav); } #ifdef JUST_FOR_TRANSLATORS @@ -507,9 +504,6 @@ e_addressbook_view_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) if (GTK_VALUE_OBJECT(*arg)) { eav->book = E_BOOK(GTK_VALUE_OBJECT(*arg)); gtk_object_ref(GTK_OBJECT(eav->book)); - gtk_signal_connect (GTK_OBJECT (eav->book), - "writable_status", - book_writable_cb, eav); } else eav->book = NULL; @@ -1116,12 +1110,6 @@ stop_state_changed (GtkObject *object, EAddressbookView *eav) command_state_change (eav); } -static void -writable_status (GtkObject *object, gboolean writable, EAddressbookView *eav) -{ - command_state_change (eav); -} - static void command_state_change (EAddressbookView *eav) { -- cgit v1.2.3