From 7912355008d54df720894d1334313801f594c8f2 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sun, 17 Sep 2000 16:55:16 +0000 Subject: Fixed the paths of some .h #includes. 2000-09-15 Christopher James Lahey * contact-editor/e-contact-editor.h, contact-editor/e-contact-save-as.h, gui/widgets/e-addressbook-model.h, gui/widgets/e-minicard-view-widget.h, gui/widgets/e-minicard-view.h, gui/widgets/e-minicard.c, gui/widgets/e-minicard.h: Fixed the paths of some .h #includes. * gui/component/addressbook.c: Removed all of the code to actually create and display the correct view of the addressbook and moved it to the new class gui/widgets/e-addressbook-view.c. * gui/widgets/Makefile.am: Added everything necessary for e-addressbook-view.c and e-addressbook-view.h. * gui/widgets/e-addressbook-view.c, gui/widgets/e-addressbook-view.h: New class to deal with actual display of addresses and switching between card view and table view. * gui/widgets/e-minicard-view-widget.c: Made this deal more gracefully with having the book set to NULL. svn path=/trunk/; revision=5475 --- addressbook/gui/widgets/e-minicard-view-widget.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'addressbook/gui/widgets/e-minicard-view-widget.c') diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c index cd1a999f14..3cf1add096 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.c +++ b/addressbook/gui/widgets/e-minicard-view-widget.c @@ -122,9 +122,12 @@ e_minicard_view_widget_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) case ARG_BOOK: if (emvw->book) gtk_object_unref(GTK_OBJECT(emvw->book)); - emvw->book = E_BOOK(GTK_VALUE_OBJECT (*arg)); - if (emvw->book) - gtk_object_ref(GTK_OBJECT(emvw->book)); + if (GTK_VALUE_OBJECT (*arg)) { + emvw->book = E_BOOK(GTK_VALUE_OBJECT (*arg)); + if (emvw->book) + gtk_object_ref(GTK_OBJECT(emvw->book)); + } else + emvw->book = NULL; if (emvw->emv) gtk_object_set(GTK_OBJECT(emvw->emv), "book", emvw->book, @@ -243,7 +246,7 @@ e_minicard_view_widget_reflow(ECanvas *canvas) "width", &width, NULL); width = MAX(width, GTK_WIDGET(canvas)->allocation.width); - gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas), 0, 0, width - 1, GTK_WIDGET(canvas)->allocation.width - 1); + gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas), 0, 0, width - 1, GTK_WIDGET(canvas)->allocation.height - 1); gnome_canvas_item_set( view->rect, "x2", (double) width, "y2", (double) GTK_WIDGET(canvas)->allocation.height, -- cgit