diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2003-01-14 05:15:25 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2003-01-14 05:15:25 +0800 |
commit | 3c89e1aa0252c6f558cf1573b39ab3a366cd4516 (patch) | |
tree | d6a3fa36c60ef5beef62f75e10f0021a20677fb5 /calendar/gui/calendar-component.c | |
parent | 8b75a400feebc8b524424d4d5e4ce9001d44003a (diff) | |
download | gsoc2013-evolution-3c89e1aa0252c6f558cf1573b39ab3a366cd4516.tar.gz gsoc2013-evolution-3c89e1aa0252c6f558cf1573b39ab3a366cd4516.tar.zst gsoc2013-evolution-3c89e1aa0252c6f558cf1573b39ab3a366cd4516.zip |
Removed. Removed.
* gui/config-control-factory.h: Removed.
* gui/config-control-factory.c: Removed.
* gui/itip-bonobo-control.c: Renamed from itip-control-factory.c.
(itip_bonobo_control_new): New.
(itip_control_factory_init): Removed.
* gui/itip-bonobo-control.h: Renamed from itip-control-factory.h.
* gui/tasks-control-factory.c: Removed.
* gui/tasks-control-factory.h: Removed.
* gui/control-factory.c (control_factory_init): Removed.
* gui/Makefile.am: Updated to build everything as
libevolution-calendar.so and install in the COMPONENTDIR.
* gui/GNOME_Evolution_Calendar.server.in.in: Updated to build the
component as a shared library.
* gui/main.c (main): Removed.
* gui/calendar-component.c (calendar_component_get_object): New.
(owner_set_cb): Do not store the shell pointer in shells.
(owner_unset_cb): Do not remove the shell pointer from shells;
instead, just set global_shell_client to NULL.
* gui/calendar-component.h: Renamed from component-factory.h.
* gui/calendar-component.c: Renamed from component-factory.c.
svn path=/trunk/; revision=19430
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r-- | calendar/gui/calendar-component.c | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index ff13791617..9d64b2db67 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -1,8 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* component-factory.c * - * Copyright (C) 2000 Ximian, Inc. - * Copyright (C) 2000 Ximian, Inc. + * Copyright (C) 2000, 2001, 2002, 2003 Ximian, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public @@ -34,11 +33,11 @@ #include <bonobo/bonobo-generic-factory.h> #include <bonobo/bonobo-context.h> #include <bonobo/bonobo-exception.h> + #include "evolution-shell-component.h" #include "calendar-offline-handler.h" -#include "component-factory.h" -#include "tasks-control-factory.h" -#include "config-control-factory.h" +#include "calendar-component.h" +#include "tasks-control.h" #include "control-factory.h" #include "calendar-config.h" #include "tasks-control.h" @@ -502,8 +501,6 @@ request_quit (EvolutionShellComponent *shell_component, void *closure) return e_comp_editor_registry_close_all (comp_editor_registry); } -static GList *shells = NULL; - static void owner_set_cb (EvolutionShellComponent *shell_component, EvolutionShellClient *shell_client, @@ -519,21 +516,14 @@ owner_set_cb (EvolutionShellComponent *shell_component, migrated = TRUE; } - shells = g_list_append (shells, shell_component); - global_shell_client = shell_client; - - config_control_factory_register (evolution_shell_client_corba_objref (shell_client)); } static void owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data) { - shells = g_list_remove (shells, shell_component); - - if (g_list_length (shells) == 0) - bonobo_main_quit (); + global_shell_client = NULL; } /* Computes the final URI for a calendar component */ @@ -772,16 +762,17 @@ create_object (void) } -void -component_factory_init (void) +BonoboObject * +calendar_component_get_object (void) { - BonoboObject *object; - Bonobo_RegistrationResult result; - - object = create_object (); + static BonoboObject *object = NULL; - result = bonobo_activation_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (object)); + if (object != NULL) { + bonobo_object_ref (BONOBO_OBJECT (object)); + } else { + object = create_object (); + g_object_add_weak_pointer (G_OBJECT (object), (void *) &object); + } - if (result != Bonobo_ACTIVATION_REG_SUCCESS) - g_error ("Cannot initialize Evolution's calendar component."); + return object; } |