From 222645151f9ba0c906ce50af6e969d79a480f66a Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 7 Nov 2002 22:47:47 +0000 Subject: Initial port of gui/ subdir to GNOME 2 2002-11-07 JP Rosevear * Initial port of gui/ subdir to GNOME 2 svn path=/trunk/; revision=18648 --- calendar/gui/control-factory.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'calendar/gui/control-factory.c') diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c index a17790f197..3e723a5bb3 100644 --- a/calendar/gui/control-factory.c +++ b/calendar/gui/control-factory.c @@ -22,15 +22,15 @@ */ #include +#include #include #include #include #include #include +#include #include -#include - #include #include #include @@ -174,22 +174,26 @@ calendar_properties_init (GnomeCalendar *gcal, BonoboControl *control) _("The type of view to show"), 0); - bonobo_control_set_properties (control, pbag); + bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (pbag)), NULL); bonobo_object_unref (BONOBO_OBJECT (pbag)); } /* Callback factory function for calendar controls */ static BonoboObject * -control_factory_fn (BonoboGenericFactory *Factory, void *data) +control_factory_fn (BonoboGenericFactory *Factory, const char *id, void *data) { BonoboControl *control; - control = control_factory_new_control (); - - if (control) - return BONOBO_OBJECT (control); - else + if (strcmp (id, CONTROL_FACTORY_ID) == 0) { + control = control_factory_new_control (); + if (control) + return BONOBO_OBJECT (control); + else + return NULL; + } else { + g_warning ("Unknown ID in calendar control factory -- %s", id); return NULL; + } } -- cgit v1.2.3