From 43aa02ecd418a9a898d4287aa5a29f050486d605 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 30 Jun 2000 09:32:11 +0000 Subject: Derive EvolutionShellClient from BonoboObjectClient instead of BonoboObject. svn path=/trunk/; revision=3825 --- shell/ChangeLog | 5 +++++ shell/evolution-shell-client.c | 8 +++++--- shell/evolution-shell-client.h | 6 +++--- shell/evolution-shell-component.c | 5 ++++- 4 files changed, 17 insertions(+), 7 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 4b21bb879a..a5acff39cf 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,8 @@ +2000-06-30 Ettore Perazzoli + + * evolution-shell-component.c (impl_ShellComponent_unset_owner): + NULL the owner_client. + 2000-06-30 Ettore Perazzoli * evolution-shell-client.h diff --git a/shell/evolution-shell-client.c b/shell/evolution-shell-client.c index d9cc63cec2..bf46e65eab 100644 --- a/shell/evolution-shell-client.c +++ b/shell/evolution-shell-client.c @@ -36,8 +36,8 @@ struct _EvolutionShellClientPrivate { int dummy; }; -#define PARENT_TYPE bonobo_object_get_type () -static BonoboObjectClass *parent_class = NULL; +#define PARENT_TYPE bonobo_object_client_get_type () +static BonoboObjectClientClass *parent_class = NULL; /* Easy-to-use wrapper for Evolution::user_select_folder. */ @@ -103,7 +103,7 @@ create_folder_selection_listener_interface (char **result, if (! FolderSelectionListener_vtables_initialized) init_FolderSelectionListener_vtables (); - servant = g_new (FolderSelectionListenerServant, 1); + servant = g_new0 (FolderSelectionListenerServant, 1); servant->servant.vepv = &FolderSelectionListener_vepv; servant->main_loop = main_loop; servant->uri_return = uri_return; @@ -157,6 +157,8 @@ user_select_folder (EvolutionShellClient *shell_client, corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)); + g_print ("%s -- %p\n", __FUNCTION__, corba_shell); + Evolution_Shell_user_select_folder (corba_shell, listener_interface, title, default_folder, &ev); diff --git a/shell/evolution-shell-client.h b/shell/evolution-shell-client.h index 4b5d3dd151..daf0c65e76 100644 --- a/shell/evolution-shell-client.h +++ b/shell/evolution-shell-client.h @@ -28,7 +28,7 @@ #include #endif -#include +#include #include "Evolution.h" @@ -49,13 +49,13 @@ typedef struct _EvolutionShellClientPrivate EvolutionShellClientPrivate; typedef struct _EvolutionShellClientClass EvolutionShellClientClass; struct _EvolutionShellClient { - BonoboObject parent; + BonoboObjectClient parent; EvolutionShellClientPrivate *priv; }; struct _EvolutionShellClientClass { - BonoboObjectClass parent_class; + BonoboObjectClientClass parent_class; }; diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c index 2b739b67b6..d110a424d7 100644 --- a/shell/evolution-shell-component.c +++ b/shell/evolution-shell-component.c @@ -140,6 +140,8 @@ impl_ShellComponent_set_owner (PortableServer_Servant servant, priv->owner_client = evolution_shell_client_new (shell); + g_print ("%s -- %p\n", __FUNCTION__, shell); + gtk_signal_emit (GTK_OBJECT (shell_component), signals[OWNER_SET], priv->owner_client); } @@ -155,13 +157,14 @@ impl_ShellComponent_unset_owner (PortableServer_Servant servant, shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object); priv = shell_component->priv; - if (priv->owner_client == CORBA_OBJECT_NIL) { + if (priv->owner_client == NULL) { CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Evolution_ShellComponent_NotOwned, NULL); return; } bonobo_object_unref (BONOBO_OBJECT (priv->owner_client)); + priv->owner_client = NULL; gtk_signal_emit (GTK_OBJECT (shell_component), signals[OWNER_UNSET]); } -- cgit