Commit 3b188483 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Do not duplicate the container_add it is already done in the


2000-09-28  Jody Goldberg <jgoldberg@home.com>

	* src/dialogs/dialog-graph-guru.c (cb_graph_guru_clicked) : Do not
	  duplicate the container_add it is already done in the
	  client_site_new.

	* src/sheet-object-container.c (view_destroyed) : delete.
	(sheet_object_container_destroy) : Use bonobo_object_unref.
	(sheet_object_container_new_view) : No need for the magic view
	  destruction handler.  That is handled when the sheet object unrefs
	  the ClientSite.

	* idl/Makefile.am (idl_DATA) : Install in a version specific location.

	* src/dialogs/dialog-graph-guru.c (graph_guru_state_destroy) : Use
	  bonobo_object_unref rather than bonobo_object_client_unref.
	(cb_graph_guru_clicked) : On success clear the State's pointer to the
	  manager so that it does not get deleted.
	(graph_manager_destroy) : new routine to clear out the remote manager.
	(graph_guru_init_manager) : Use it.

	* src/workbook.c (cut_cmd) : Delete the object explicitly.
	* src/sheet-object.c (sheet_object_remove_cb) : Ditto.

	* src/sheet-object-container.c (view_destroyed) : rename from
	  item_destroy to clarify its function.

	* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_object) : Add
	  KP_Delete.  There is no need to change the mode and clear anything.
	  The sheet_object destructor takes care of it.
parent 1332ca89
2000-09-28 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-graph-guru.c (cb_graph_guru_clicked) : Do not
duplicate the container_add it is already done in the
client_site_new.
* src/sheet-object-container.c (view_destroyed) : delete.
(sheet_object_container_destroy) : Use bonobo_object_unref.
(sheet_object_container_new_view) : No need for the magic view
destruction handler. That is handled when the sheet object unrefs
the ClientSite.
* idl/Makefile.am (idl_DATA) : Install in a version specific location.
* src/dialogs/dialog-graph-guru.c (graph_guru_state_destroy) : Use
bonobo_object_unref rather than bonobo_object_client_unref.
(cb_graph_guru_clicked) : On success clear the State's pointer to the
......
2000-09-28 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-graph-guru.c (cb_graph_guru_clicked) : Do not
duplicate the container_add it is already done in the
client_site_new.
* src/sheet-object-container.c (view_destroyed) : delete.
(sheet_object_container_destroy) : Use bonobo_object_unref.
(sheet_object_container_new_view) : No need for the magic view
destruction handler. That is handled when the sheet object unrefs
the ClientSite.
* idl/Makefile.am (idl_DATA) : Install in a version specific location.
* src/dialogs/dialog-graph-guru.c (graph_guru_state_destroy) : Use
bonobo_object_unref rather than bonobo_object_client_unref.
(cb_graph_guru_clicked) : On success clear the State's pointer to the
......
2000-09-28 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-graph-guru.c (cb_graph_guru_clicked) : Do not
duplicate the container_add it is already done in the
client_site_new.
* src/sheet-object-container.c (view_destroyed) : delete.
(sheet_object_container_destroy) : Use bonobo_object_unref.
(sheet_object_container_new_view) : No need for the magic view
destruction handler. That is handled when the sheet object unrefs
the ClientSite.
* idl/Makefile.am (idl_DATA) : Install in a version specific location.
* src/dialogs/dialog-graph-guru.c (graph_guru_state_destroy) : Use
bonobo_object_unref rather than bonobo_object_client_unref.
(cb_graph_guru_clicked) : On success clear the State's pointer to the
......
2000-09-28 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-graph-guru.c (cb_graph_guru_clicked) : Do not
duplicate the container_add it is already done in the
client_site_new.
* src/sheet-object-container.c (view_destroyed) : delete.
(sheet_object_container_destroy) : Use bonobo_object_unref.
(sheet_object_container_new_view) : No need for the magic view
destruction handler. That is handled when the sheet object unrefs
the ClientSite.
* idl/Makefile.am (idl_DATA) : Install in a version specific location.
* src/dialogs/dialog-graph-guru.c (graph_guru_state_destroy) : Use
bonobo_object_unref rather than bonobo_object_client_unref.
(cb_graph_guru_clicked) : On success clear the State's pointer to the
......
2000-09-28 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-graph-guru.c (cb_graph_guru_clicked) : Do not
duplicate the container_add it is already done in the
client_site_new.
* src/sheet-object-container.c (view_destroyed) : delete.
(sheet_object_container_destroy) : Use bonobo_object_unref.
(sheet_object_container_new_view) : No need for the magic view
destruction handler. That is handled when the sheet object unrefs
the ClientSite.
* idl/Makefile.am (idl_DATA) : Install in a version specific location.
* src/dialogs/dialog-graph-guru.c (graph_guru_state_destroy) : Use
bonobo_object_unref rather than bonobo_object_client_unref.
(cb_graph_guru_clicked) : On success clear the State's pointer to the
......
2000-09-28 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-graph-guru.c (cb_graph_guru_clicked) : Do not
duplicate the container_add it is already done in the
client_site_new.
* src/sheet-object-container.c (view_destroyed) : delete.
(sheet_object_container_destroy) : Use bonobo_object_unref.
(sheet_object_container_new_view) : No need for the magic view
destruction handler. That is handled when the sheet object unrefs
the ClientSite.
* idl/Makefile.am (idl_DATA) : Install in a version specific location.
* src/dialogs/dialog-graph-guru.c (graph_guru_state_destroy) : Use
bonobo_object_unref rather than bonobo_object_client_unref.
(cb_graph_guru_clicked) : On success clear the State's pointer to the
......
2000-09-28 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-graph-guru.c (cb_graph_guru_clicked) : Do not
duplicate the container_add it is already done in the
client_site_new.
* src/sheet-object-container.c (view_destroyed) : delete.
(sheet_object_container_destroy) : Use bonobo_object_unref.
(sheet_object_container_new_view) : No need for the magic view
destruction handler. That is handled when the sheet object unrefs
the ClientSite.
* idl/Makefile.am (idl_DATA) : Install in a version specific location.
* src/dialogs/dialog-graph-guru.c (graph_guru_state_destroy) : Use
bonobo_object_unref rather than bonobo_object_client_unref.
(cb_graph_guru_clicked) : On success clear the State's pointer to the
......
......@@ -31,7 +31,7 @@ $(GNUMERIC_GRAPHS_CORBA_GENERATED): $(srcdir)/gnumeric-graphs.idl
orbit-idl $(IDL_FLAGS) -I$(srcdir) $(srcdir)/gnumeric-graphs.idl
touch my_gnumeric_graphs_idl
idldir = $(datadir)/idl
idldir = $(gnumeric_datadir)idl
idl_DATA = gnumeric-graphs.idl Gnumeric.idl
EXTRA_DIST = $(idl_DATA)
......
......@@ -190,18 +190,12 @@ cb_graph_guru_clicked (GtkWidget *button, GraphGuruState *state)
/* Configure our container */
client_site = bonobo_client_site_new (state->wb->priv->bonobo_container);
bonobo_item_container_add (state->wb->priv->bonobo_container,
BONOBO_OBJECT (client_site));
if (bonobo_client_site_bind_embeddable (client_site, state->manager_client)) {
Sheet *sheet = state->wb->current_sheet;
sheet_mode_create_object (
sheet_object_container_new_bonobo (sheet,
client_site));
SheetObject *so = sheet_object_container_new_bonobo (
state->wb->current_sheet, client_site);
sheet_mode_create_object (so);
}
/* Clear the manager to avoid destroying it when the dialog is removed */
state->manager_client = NULL;
}
gtk_object_destroy (GTK_OBJECT(state->dialog));
......@@ -279,7 +273,7 @@ graph_guru_init (GraphGuruState *state)
}
static void
graph_manager_destroy (BonoboObjectClient *manager_client, gpointer ignored)
cb_graph_manager_destroy (BonoboObjectClient *manager_client, gpointer ignored)
{
printf ("GNUMERIC : unref the manager\n");
bonobo_object_client_unref (manager_client, NULL);
......@@ -304,7 +298,7 @@ graph_guru_init_manager (GraphGuruState *state)
/* Catch destroy so that we can unref the remote object */
gtk_signal_connect (
GTK_OBJECT (state->manager_client), "destroy",
GTK_SIGNAL_FUNC (graph_manager_destroy), NULL);
GTK_SIGNAL_FUNC (cb_graph_manager_destroy), NULL);
state->manager = bonobo_object_query_interface (
BONOBO_OBJECT (state->manager_client),
......
......@@ -103,30 +103,14 @@ view_activated_cb (BonoboViewFrame *view_frame, gboolean activated, SheetObject
return FALSE;
}
/*
* Invoked when a view has been destroyed
*/
static void
view_destroyed (GnomeCanvasItem *item, BonoboViewFrame *view_frame)
{
if (view_frame)
bonobo_object_unref (BONOBO_OBJECT (view_frame));
}
static void
sheet_object_container_destroy (GtkObject *object)
{
SheetObjectBonobo *sob = SHEET_OBJECT_BONOBO (object);
if (sob != NULL && sob->object_server != NULL) {
CORBA_Environment ev;
CORBA_exception_init (&ev);
bonobo_object_release_unref (
bonobo_object_corba_objref (BONOBO_OBJECT (sob->object_server)),
&ev);
CORBA_exception_free (&ev);
if (sob != NULL && sob->client_site != NULL) {
bonobo_object_unref (BONOBO_OBJECT (sob->client_site));
sob->client_site = NULL;
sob->object_server = NULL;
}
......@@ -137,7 +121,6 @@ static GnomeCanvasItem *
sheet_object_container_new_view (SheetObject *so, SheetView *sheet_view)
{
SheetObjectContainer *soc;
GnomeCanvasItem *i;
BonoboViewFrame *view_frame;
GtkWidget *view_widget;
......@@ -156,21 +139,9 @@ sheet_object_container_new_view (SheetObject *so, SheetView *sheet_view)
GTK_SIGNAL_FUNC (user_activation_request_cb), so);
gtk_signal_connect (GTK_OBJECT (view_frame), "activated",
GTK_SIGNAL_FUNC (view_activated_cb), so);
/*
* We need somehow to grab events from the wrapper in order to be able to
* move the component around easily.
*
* gtk_signal_connect (GTK_OBJECT (bonobo_view_frame_get_wrapper (view_frame)),
* "event",
* GTK_SIGNAL_FUNC (sheet_object_event), so);
*/
view_widget = bonobo_view_frame_get_wrapper (view_frame);
i = make_container_item (so, sheet_view, view_widget);
gtk_signal_connect (GTK_OBJECT (i), "destroy",
GTK_SIGNAL_FUNC (view_destroyed), view_frame);
return i;
return make_container_item (so, sheet_view, view_widget);
}
/*
......
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