From 602ee2f49664f532de6ba5f44b323dcb26192012 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Fri, 24 Oct 2003 17:46:27 +0000 Subject: removed repeated initialization. (calendar_component_peek): use G_STRLOC 2003-10-24 Rodrigo Moya * gui/calendar-component.c (calendar_component_class_init): removed repeated initialization. (calendar_component_peek): use G_STRLOC for g_warning's. * gui/tsaks-control.[ch] (tasks_control_activate, tasks_control_deactivate): made these 2 functions public. * gui/tasks-component.[ch]: implementation of the tasks component. * gui/Makefile.am: * gui/GNOME_Evolution_Calendar.server.in.in: added tasks component. * gui/main.c: ditto. (factory): added code to create the tasks component when requested. svn path=/trunk/; revision=23065 --- calendar/gui/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'calendar/gui/main.c') diff --git a/calendar/gui/main.c b/calendar/gui/main.c index 681417f1df..73b3705b3c 100644 --- a/calendar/gui/main.c +++ b/calendar/gui/main.c @@ -47,12 +47,14 @@ #include "control-factory.h" #include "itip-bonobo-control.h" #include "tasks-control.h" +#include "tasks-component.h" #define FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_Factory_2" #define CALENDAR_COMPONENT_ID "OAFIID:GNOME_Evolution_Calendar_Component" #define CALENDAR_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_Control" +#define TASKS_COMPONENT_ID "OAFIID:GNOME_Evolution_Tasks_Component" #define TASKS_CONTROL_ID "OAFIID:GNOME_Evolution_Tasks_Control" #define ITIP_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_iTip_Control" #define CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_ConfigControl" @@ -161,7 +163,11 @@ factory (BonoboGenericFactory *factory, return object; } else if (strcmp (component_id, CALENDAR_CONTROL_ID) == 0) return BONOBO_OBJECT (control_factory_new_control ()); - else if (strcmp (component_id, TASKS_CONTROL_ID) == 0) + else if (strcmp (component_id, TASKS_COMPONENT_ID) == 0) { + BonoboObject *object = BONOBO_OBJECT (tasks_component_peek ()); + bonobo_object_ref (object); + return object; + } else if (strcmp (component_id, TASKS_CONTROL_ID) == 0) return BONOBO_OBJECT (tasks_control_new ()); else if (strcmp (component_id, ITIP_CONTROL_ID) == 0) return BONOBO_OBJECT (itip_bonobo_control_new ()); -- cgit