diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2003-10-25 01:46:27 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-10-25 01:46:27 +0800 |
commit | 602ee2f49664f532de6ba5f44b323dcb26192012 (patch) | |
tree | 19dd7fa0562e21fc049cc46ac5c093f01b45395a /calendar/gui/main.c | |
parent | ea5a22bc0ee7a3ed18d67a750cdfdb0cfe22007d (diff) | |
download | gsoc2013-evolution-602ee2f49664f532de6ba5f44b323dcb26192012.tar gsoc2013-evolution-602ee2f49664f532de6ba5f44b323dcb26192012.tar.gz gsoc2013-evolution-602ee2f49664f532de6ba5f44b323dcb26192012.tar.bz2 gsoc2013-evolution-602ee2f49664f532de6ba5f44b323dcb26192012.tar.lz gsoc2013-evolution-602ee2f49664f532de6ba5f44b323dcb26192012.tar.xz gsoc2013-evolution-602ee2f49664f532de6ba5f44b323dcb26192012.tar.zst gsoc2013-evolution-602ee2f49664f532de6ba5f44b323dcb26192012.zip |
removed repeated initialization. (calendar_component_peek): use G_STRLOC
2003-10-24 Rodrigo Moya <rodrigo@ximian.com>
* 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
Diffstat (limited to 'calendar/gui/main.c')
-rw-r--r-- | calendar/gui/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 ()); |