diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-06-30 15:44:19 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-06-30 15:44:19 +0800 |
commit | d35b129e063edd30eec44a31e3818df57916effe (patch) | |
tree | 4930f195c6186a155b5edff4c08e2602a4fdbab7 /calendar/gui | |
parent | 08d1bc1329686dc7efa99c3685b720dbf705d7f5 (diff) | |
download | gsoc2013-evolution-d35b129e063edd30eec44a31e3818df57916effe.tar gsoc2013-evolution-d35b129e063edd30eec44a31e3818df57916effe.tar.gz gsoc2013-evolution-d35b129e063edd30eec44a31e3818df57916effe.tar.bz2 gsoc2013-evolution-d35b129e063edd30eec44a31e3818df57916effe.tar.lz gsoc2013-evolution-d35b129e063edd30eec44a31e3818df57916effe.tar.xz gsoc2013-evolution-d35b129e063edd30eec44a31e3818df57916effe.tar.zst gsoc2013-evolution-d35b129e063edd30eec44a31e3818df57916effe.zip |
Make calendar die when evolution quits.
2000-06-29 Christopher James Lahey <clahey@helixcode.com>
* gui/component-factory.c: Make calendar die when evolution quits.
svn path=/trunk/; revision=3822
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/calendar-component.c | 16 | ||||
-rw-r--r-- | calendar/gui/component-factory.c | 16 |
2 files changed, 30 insertions, 2 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 5ca51772b9..4e92055619 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -67,12 +67,24 @@ create_view (EvolutionShellComponent *shell_component, return EVOLUTION_SHELL_COMPONENT_OK; } +static gint owner_count = 0; + static void owner_set_cb (EvolutionShellComponent *shell_component, + Evolution_Shell shell_interface) +{ + owner_count ++; +} + +static void +owner_unset_cb (EvolutionShellComponent *shell_component, + Evolution_Shell shell_interface) EvolutionShellClient shell_client, void *data) { - g_print ("evolution-calendar: Yeeeh! We have an owner!\n"); /* FIXME */ + owner_count --; + if (owner_count <= 0) + gtk_main_quit(); } @@ -88,6 +100,8 @@ factory_fn (BonoboGenericFactory *factory, gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", GTK_SIGNAL_FUNC (owner_set_cb), NULL); + gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset", + GTK_SIGNAL_FUNC (owner_unset_cb), NULL); return BONOBO_OBJECT (shell_component); } diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c index 5ca51772b9..4e92055619 100644 --- a/calendar/gui/component-factory.c +++ b/calendar/gui/component-factory.c @@ -67,12 +67,24 @@ create_view (EvolutionShellComponent *shell_component, return EVOLUTION_SHELL_COMPONENT_OK; } +static gint owner_count = 0; + static void owner_set_cb (EvolutionShellComponent *shell_component, + Evolution_Shell shell_interface) +{ + owner_count ++; +} + +static void +owner_unset_cb (EvolutionShellComponent *shell_component, + Evolution_Shell shell_interface) EvolutionShellClient shell_client, void *data) { - g_print ("evolution-calendar: Yeeeh! We have an owner!\n"); /* FIXME */ + owner_count --; + if (owner_count <= 0) + gtk_main_quit(); } @@ -88,6 +100,8 @@ factory_fn (BonoboGenericFactory *factory, gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", GTK_SIGNAL_FUNC (owner_set_cb), NULL); + gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset", + GTK_SIGNAL_FUNC (owner_unset_cb), NULL); return BONOBO_OBJECT (shell_component); } |