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/ChangeLog | 5 +++++ addressbook/gui/component/component-factory.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 3f0a7de6c3..84dab3bf04 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,8 @@ +2004-04-23 Dan Winship + + * gui/component/component-factory.c (factory): Fix the addressbook + control to not crash. (Temporary fix.) + 2004-04-23 Chris Toshok * gui/widgets/eab-gui-util.c (added_cb): this signal takes an 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