aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-shell-component-client.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-05-19 23:29:19 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-05-19 23:29:19 +0800
commit3e519c4e1469b93c8fc6684b6aae53779d4ff270 (patch)
tree2a68b052adcd371aa3c2308d0ce2282546dfb64b /shell/evolution-shell-component-client.c
parent0b11ddccb9aa109b28f69fefb790453b558a096c (diff)
downloadgsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar.gz
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar.bz2
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar.lz
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar.xz
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar.zst
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.zip
Renamed the "NewWindow" verb into "OpenFolderInNewWindow". Got the
`File -> Folder -> Open in New Window' menu item to work. svn path=/trunk/; revision=9893
Diffstat (limited to 'shell/evolution-shell-component-client.c')
-rw-r--r--shell/evolution-shell-component-client.c128
1 files changed, 65 insertions, 63 deletions
diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c
index f8e00de066..02a2fc7400 100644
--- a/shell/evolution-shell-component-client.c
+++ b/shell/evolution-shell-component-client.c
@@ -90,48 +90,6 @@ corba_exception_to_result (const CORBA_Environment *ev)
}
}
-static void
-dispatch_callback (EvolutionShellComponentClient *shell_component_client,
- EvolutionShellComponentResult result)
-{
- EvolutionShellComponentClientPrivate *priv;
- EvolutionShellComponentClientCallback callback;
- PortableServer_ObjectId *oid;
- void *callback_data;
- CORBA_Environment ev;
-
- priv = shell_component_client->priv;
-
- g_return_if_fail (priv->callback != NULL);
- g_return_if_fail (priv->listener_servant != NULL);
-
- /* Notice that we destroy the interface and reset the callback information before
- dispatching the callback so that the callback can generate another request. */
-
- CORBA_exception_init (&ev);
-
- oid = PortableServer_POA_servant_to_id (bonobo_poa (), priv->listener_servant, &ev);
- PortableServer_POA_deactivate_object (bonobo_poa (), oid, &ev);
- POA_GNOME_Evolution_ShellComponentListener__fini (priv->listener_servant, &ev);
- CORBA_free (oid);
-
- CORBA_Object_release (priv->listener_interface, &ev);
- free_ShellComponentListener_servant (priv->listener_servant);
-
- CORBA_exception_free (&ev);
-
- priv->listener_servant = NULL;
- priv->listener_interface = CORBA_OBJECT_NIL;
-
- callback = priv->callback;
- callback_data = priv->callback_data;
-
- priv->callback = NULL;
- priv->callback_data = NULL;
-
- (* callback) (shell_component_client, result, callback_data);
-}
-
static EvolutionShellComponentResult
shell_component_result_from_corba_exception (const CORBA_Environment *ev)
{
@@ -150,12 +108,35 @@ static POA_GNOME_Evolution_ShellComponentListener__epv ShellComponentListener_e
static POA_GNOME_Evolution_ShellComponentListener__vepv ShellComponentListener_vepv;
static gboolean ShellComponentListener_vepv_initialized = FALSE;
+static void ShellComponentListener_vepv_initialize (void);
+
struct _ShellComponentListenerServant {
POA_GNOME_Evolution_ShellComponentListener servant;
EvolutionShellComponentClient *component_client;
};
typedef struct _ShellComponentListenerServant ShellComponentListenerServant;
+static PortableServer_Servant *
+create_ShellComponentListener_servant (EvolutionShellComponentClient *component_client)
+{
+ ShellComponentListenerServant *servant;
+
+ if (! ShellComponentListener_vepv_initialized)
+ ShellComponentListener_vepv_initialize ();
+
+ servant = g_new0 (ShellComponentListenerServant, 1);
+ servant->servant.vepv = &ShellComponentListener_vepv;
+ servant->component_client = component_client;
+
+ return (PortableServer_Servant) servant;
+}
+
+static void
+free_ShellComponentListener_servant (PortableServer_Servant servant)
+{
+ g_free (servant);
+}
+
static EvolutionShellComponentClient *
component_client_from_ShellComponentListener_servant (PortableServer_Servant servant)
{
@@ -189,6 +170,48 @@ result_from_async_corba_result (GNOME_Evolution_ShellComponentListener_Result as
}
static void
+dispatch_callback (EvolutionShellComponentClient *shell_component_client,
+ EvolutionShellComponentResult result)
+{
+ EvolutionShellComponentClientPrivate *priv;
+ EvolutionShellComponentClientCallback callback;
+ PortableServer_ObjectId *oid;
+ void *callback_data;
+ CORBA_Environment ev;
+
+ priv = shell_component_client->priv;
+
+ g_return_if_fail (priv->callback != NULL);
+ g_return_if_fail (priv->listener_servant != NULL);
+
+ /* Notice that we destroy the interface and reset the callback information before
+ dispatching the callback so that the callback can generate another request. */
+
+ CORBA_exception_init (&ev);
+
+ oid = PortableServer_POA_servant_to_id (bonobo_poa (), priv->listener_servant, &ev);
+ PortableServer_POA_deactivate_object (bonobo_poa (), oid, &ev);
+ POA_GNOME_Evolution_ShellComponentListener__fini (priv->listener_servant, &ev);
+ CORBA_free (oid);
+
+ CORBA_Object_release (priv->listener_interface, &ev);
+ free_ShellComponentListener_servant (priv->listener_servant);
+
+ CORBA_exception_free (&ev);
+
+ priv->listener_servant = NULL;
+ priv->listener_interface = CORBA_OBJECT_NIL;
+
+ callback = priv->callback;
+ callback_data = priv->callback_data;
+
+ priv->callback = NULL;
+ priv->callback_data = NULL;
+
+ (* callback) (shell_component_client, result, callback_data);
+}
+
+static void
impl_ShellComponentListener_report_result (PortableServer_Servant servant,
const GNOME_Evolution_ShellComponentListener_Result result,
CORBA_Environment *ev)
@@ -214,27 +237,6 @@ ShellComponentListener_vepv_initialize (void)
ShellComponentListener_vepv_initialized = TRUE;
}
-static PortableServer_Servant *
-create_ShellComponentListener_servant (EvolutionShellComponentClient *component_client)
-{
- ShellComponentListenerServant *servant;
-
- if (! ShellComponentListener_vepv_initialized)
- ShellComponentListener_vepv_initialize ();
-
- servant = g_new0 (ShellComponentListenerServant, 1);
- servant->servant.vepv = &ShellComponentListener_vepv;
- servant->component_client = component_client;
-
- return (PortableServer_Servant) servant;
-}
-
-static void
-free_ShellComponentListener_servant (PortableServer_Servant servant)
-{
- g_free (servant);
-}
-
static void
create_listener_interface (EvolutionShellComponentClient *shell_component_client)
{