aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/main.c')
-rw-r--r--calendar/gui/main.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index a15c0ef846..681417f1df 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -49,9 +49,9 @@
#include "tasks-control.h"
-#define FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_Factory"
+#define FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_Factory_2"
-#define CALENDAR_COMPONENT_ID "OAFIID:GNOME_Evolution_Calendar_ShellComponent"
+#define CALENDAR_COMPONENT_ID "OAFIID:GNOME_Evolution_Calendar_Component"
#define CALENDAR_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_Control"
#define TASKS_CONTROL_ID "OAFIID:GNOME_Evolution_Tasks_Control"
#define ITIP_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_iTip_Control"
@@ -155,23 +155,19 @@ factory (BonoboGenericFactory *factory,
initialized = TRUE;
}
- if (strcmp (component_id, CALENDAR_COMPONENT_ID) == 0)
- return calendar_component_get_object ();
- if (strcmp (component_id, CALENDAR_CONTROL_ID) == 0)
+ if (strcmp (component_id, CALENDAR_COMPONENT_ID) == 0) {
+ BonoboObject *object = BONOBO_OBJECT (calendar_component_peek ());
+ bonobo_object_ref (object);
+ return object;
+ } else if (strcmp (component_id, CALENDAR_CONTROL_ID) == 0)
return BONOBO_OBJECT (control_factory_new_control ());
- if (strcmp (component_id, TASKS_CONTROL_ID) == 0)
+ else if (strcmp (component_id, TASKS_CONTROL_ID) == 0)
return BONOBO_OBJECT (tasks_control_new ());
- if (strcmp (component_id, ITIP_CONTROL_ID) == 0)
+ else if (strcmp (component_id, ITIP_CONTROL_ID) == 0)
return BONOBO_OBJECT (itip_bonobo_control_new ());
- if (strcmp (component_id, CONFIG_CONTROL_ID) == 0) {
- extern EvolutionShellClient *global_shell_client; /* FIXME ugly */
-
- if (global_shell_client == NULL)
- return NULL;
- else
- return BONOBO_OBJECT (cal_prefs_dialog_new ());
- }
- if (strcmp (component_id, COMP_EDITOR_FACTORY_ID) == 0)
+ else if (strcmp (component_id, CONFIG_CONTROL_ID) == 0)
+ return BONOBO_OBJECT (cal_prefs_dialog_new ());
+ else if (strcmp (component_id, COMP_EDITOR_FACTORY_ID) == 0)
return BONOBO_OBJECT (comp_editor_factory_fn ());
g_warning (FACTORY_ID ": Don't know what to do with %s", component_id);