From c8103848edb67dcd80653f7ba6da9dc7ac222851 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 23 Apr 2004 15:35:36 +0000 Subject: Fix the addressbook control to not crash. (Temporary fix.) * gui/component/component-factory.c (factory): Fix the addressbook control to not crash. (Temporary fix.) svn path=/trunk/; revision=25601 --- addressbook/gui/component/component-factory.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/component-factory.c b/addressbook/gui/component/component-factory.c index f8ac672d01..dff4164955 100644 --- a/addressbook/gui/component/component-factory.c +++ b/addressbook/gui/component/component-factory.c @@ -26,6 +26,7 @@ #include "addressbook.h" #include "addressbook-component.h" #include "addressbook-config.h" +#include "addressbook-view.h" #include "autocompletion-config.h" #include "eab-popup-control.h" #include "eab-vcard-control.h" @@ -57,8 +58,13 @@ factory (BonoboGenericFactory *factory, if (strcmp (component_id, VCARD_CONTROL_ID) == 0) return BONOBO_OBJECT (eab_vcard_control_new ()); - if (strcmp (component_id, ADDRESSBOOK_CONTROL_ID) == 0) - return BONOBO_OBJECT (addressbook_new_control ()); + if (strcmp (component_id, ADDRESSBOOK_CONTROL_ID) == 0) { + AddressbookView *view; + + /* FIXME: temporary hack, leaks a view */ + view = addressbook_view_new (); + return BONOBO_OBJECT (addressbook_view_peek_folder_view (view)); + } if (strcmp (component_id, COMPONENT_ID) == 0) { BonoboObject *object = BONOBO_OBJECT (addressbook_component_peek ()); bonobo_object_ref (object); -- cgit v1.2.3