Commit cf47b02a authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa

Create the corba context here. (workbook_corba_shutdown): Destroy it here.

1999-12-31  Miguel de Icaza  <miguel@gnu.org>

	* src/corba-workbook.c (workbook_corba_setup): Create the corba
	context here.
	(workbook_corba_shutdown): Destroy it here.
	(command_context_corba): Return it here.
parent 06eb9b72
1999-12-31 Miguel de Icaza <miguel@gnu.org>
* src/corba-workbook.c (workbook_corba_setup): Create the corba
context here.
(workbook_corba_shutdown): Destroy it here.
(command_context_corba): Return it here.
* src/corba-sheet.c: Use properly the command_context_corba,
passing a workbook argument in all functions.
......
1999-12-31 Miguel de Icaza <miguel@gnu.org>
* src/corba-workbook.c (workbook_corba_setup): Create the corba
context here.
(workbook_corba_shutdown): Destroy it here.
(command_context_corba): Return it here.
* src/corba-sheet.c: Use properly the command_context_corba,
passing a workbook argument in all functions.
......
......@@ -13,6 +13,8 @@
#include "Gnumeric.h"
#include "xml-io.h"
#include "corba.h"
#include "command-context-corba.h"
#include "workbook-private.h"
typedef struct {
POA_GNOME_Gnumeric_Workbook servant;
......@@ -225,6 +227,7 @@ workbook_corba_setup (Workbook *workbook)
CORBA_free (objid);
workbook->corba_server = PortableServer_POA_servant_to_reference (gnumeric_poa, ws, &ev);
workbook->priv->corba_context = command_context_corba_new (workbook);
CORBA_exception_free (&ev);
}
......@@ -238,9 +241,17 @@ workbook_corba_shutdown (Workbook *wb)
g_warning ("Should release all the corba resources here");
gtk_object_destroy (GTK_OBJECT (wb->priv->corba_context));
CORBA_exception_init (&ev);
PortableServer_POA_deactivate_object (gnumeric_poa, wb->corba_server, &ev);
CORBA_exception_free (&ev);
}
CommandContext *
command_context_corba (Workbook *wb)
{
return wb->priv->corba_context;
}
......@@ -4,4 +4,6 @@
extern PortableServer_POA gnumeric_poa;
gboolean WorkbookFactory_init (void);
CommandContext *command_context_corba (Workbook *wb);
#endif
......@@ -37,7 +37,7 @@ struct _WorkbookPrivate {
/*
* GUI command context
*/
CommandContext *gui_context;
CommandContext *gui_context, *corba_context;
};
#endif /* GNUMERIC_WORKBOOK_PRIVATE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment