Commit 684c9df2 authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Miguel de Icaza

Change NULL to CORBA_OBJECT_NIL



2000-03-13  Miguel de Icaza  <miguel@helixcode.com>

	* src/sheet-vector.c (sheet_vectors_cell_changed): Change NULL to
	CORBA_OBJECT_NIL

	* src/sheet-object-bonobo.c (sheet_object_bonobo_load_from_file):
	Use the new IDL:Bonobo interface name, not the IDL:GNOME one
	(sheet_object_bonobo_load_from_file): ditto.
	(sheet_object_bonobo_load): ditto.

	* src/sheet-object.c (sheet_set_mode_type): Temporary hack to get
	the graphics working under 1:20 hours when my battery runs out of
	power.

	* src/sheet-object-container.c
	(sheet_object_container_new_from_goadid): Renamed from
	sheet_object_container_new

	(sheet_object_container_new): Now takes a BonoboObjectClient as an
	argument.

2000-03-12  Miguel de Icaza  <miguel@helixcode.com>

	* src/sheet-vector.c (impl_vector_get_numbers): Increment idx
	here;
	(impl_vector_get_vec_values): ditto.
	(impl_vector_get_numbers): Use the proper values for the columns
	row.
	(impl_vector_get_vec_values): ditto.

	* src/clipboard.c (x_clipboard_bind_workbook): Fix memory leak.
	The problem is worse, because the warning comment there was
	completely bogus.

2000-03-12  Miguel de Icaza  <miguel@helixcode.com>

	* graphic-type.c (graphic_type_show_page): On page switch, set the
	graphics type to the first one in there.

	* graphic-context.c (data_range_new): Assing this guy.
parent 533b50f4
2000-03-13 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (sheet_vectors_cell_changed): Change NULL to
CORBA_OBJECT_NIL
* src/sheet-object-bonobo.c (sheet_object_bonobo_load_from_file):
Use the new IDL:Bonobo interface name, not the IDL:GNOME one
(sheet_object_bonobo_load_from_file): ditto.
(sheet_object_bonobo_load): ditto.
* src/sheet-object.c (sheet_set_mode_type): Temporary hack to get
the graphics working under 1:20 hours when my battery runs out of
power.
* src/sheet-object-container.c
(sheet_object_container_new_from_goadid): Renamed from
sheet_object_container_new
(sheet_object_container_new): Now takes a BonoboObjectClient as an
argument.
2000-03-12 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (impl_vector_get_numbers): Increment idx
here;
(impl_vector_get_vec_values): ditto.
(impl_vector_get_numbers): Use the proper values for the columns
row.
(impl_vector_get_vec_values): ditto.
* src/clipboard.c (x_clipboard_bind_workbook): Fix memory leak.
The problem is worse, because the warning comment there was
completely bogus.
2000-03-14 Jon K Hellan <hellan@acm.org>
* src/workbook-view.c (workbook_view_history_update,
......@@ -407,7 +441,6 @@
* src/dialogs/dialog-plugin-manager.c (refresh_right_frame): Kill
a warning.
>>>>>>> 1.58
2000-03-03 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : Correct off by one error for
......
2000-03-13 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (sheet_vectors_cell_changed): Change NULL to
CORBA_OBJECT_NIL
* src/sheet-object-bonobo.c (sheet_object_bonobo_load_from_file):
Use the new IDL:Bonobo interface name, not the IDL:GNOME one
(sheet_object_bonobo_load_from_file): ditto.
(sheet_object_bonobo_load): ditto.
* src/sheet-object.c (sheet_set_mode_type): Temporary hack to get
the graphics working under 1:20 hours when my battery runs out of
power.
* src/sheet-object-container.c
(sheet_object_container_new_from_goadid): Renamed from
sheet_object_container_new
(sheet_object_container_new): Now takes a BonoboObjectClient as an
argument.
2000-03-12 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (impl_vector_get_numbers): Increment idx
here;
(impl_vector_get_vec_values): ditto.
(impl_vector_get_numbers): Use the proper values for the columns
row.
(impl_vector_get_vec_values): ditto.
* src/clipboard.c (x_clipboard_bind_workbook): Fix memory leak.
The problem is worse, because the warning comment there was
completely bogus.
2000-03-14 Jon K Hellan <hellan@acm.org>
* src/workbook-view.c (workbook_view_history_update,
......@@ -407,7 +441,6 @@
* src/dialogs/dialog-plugin-manager.c (refresh_right_frame): Kill
a warning.
>>>>>>> 1.58
2000-03-03 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : Correct off by one error for
......
2000-03-13 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (sheet_vectors_cell_changed): Change NULL to
CORBA_OBJECT_NIL
* src/sheet-object-bonobo.c (sheet_object_bonobo_load_from_file):
Use the new IDL:Bonobo interface name, not the IDL:GNOME one
(sheet_object_bonobo_load_from_file): ditto.
(sheet_object_bonobo_load): ditto.
* src/sheet-object.c (sheet_set_mode_type): Temporary hack to get
the graphics working under 1:20 hours when my battery runs out of
power.
* src/sheet-object-container.c
(sheet_object_container_new_from_goadid): Renamed from
sheet_object_container_new
(sheet_object_container_new): Now takes a BonoboObjectClient as an
argument.
2000-03-12 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (impl_vector_get_numbers): Increment idx
here;
(impl_vector_get_vec_values): ditto.
(impl_vector_get_numbers): Use the proper values for the columns
row.
(impl_vector_get_vec_values): ditto.
* src/clipboard.c (x_clipboard_bind_workbook): Fix memory leak.
The problem is worse, because the warning comment there was
completely bogus.
2000-03-14 Jon K Hellan <hellan@acm.org>
* src/workbook-view.c (workbook_view_history_update,
......@@ -407,7 +441,6 @@
* src/dialogs/dialog-plugin-manager.c (refresh_right_frame): Kill
a warning.
>>>>>>> 1.58
2000-03-03 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : Correct off by one error for
......
2000-03-13 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (sheet_vectors_cell_changed): Change NULL to
CORBA_OBJECT_NIL
* src/sheet-object-bonobo.c (sheet_object_bonobo_load_from_file):
Use the new IDL:Bonobo interface name, not the IDL:GNOME one
(sheet_object_bonobo_load_from_file): ditto.
(sheet_object_bonobo_load): ditto.
* src/sheet-object.c (sheet_set_mode_type): Temporary hack to get
the graphics working under 1:20 hours when my battery runs out of
power.
* src/sheet-object-container.c
(sheet_object_container_new_from_goadid): Renamed from
sheet_object_container_new
(sheet_object_container_new): Now takes a BonoboObjectClient as an
argument.
2000-03-12 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (impl_vector_get_numbers): Increment idx
here;
(impl_vector_get_vec_values): ditto.
(impl_vector_get_numbers): Use the proper values for the columns
row.
(impl_vector_get_vec_values): ditto.
* src/clipboard.c (x_clipboard_bind_workbook): Fix memory leak.
The problem is worse, because the warning comment there was
completely bogus.
2000-03-14 Jon K Hellan <hellan@acm.org>
* src/workbook-view.c (workbook_view_history_update,
......@@ -407,7 +441,6 @@
* src/dialogs/dialog-plugin-manager.c (refresh_right_frame): Kill
a warning.
>>>>>>> 1.58
2000-03-03 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : Correct off by one error for
......
2000-03-13 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (sheet_vectors_cell_changed): Change NULL to
CORBA_OBJECT_NIL
* src/sheet-object-bonobo.c (sheet_object_bonobo_load_from_file):
Use the new IDL:Bonobo interface name, not the IDL:GNOME one
(sheet_object_bonobo_load_from_file): ditto.
(sheet_object_bonobo_load): ditto.
* src/sheet-object.c (sheet_set_mode_type): Temporary hack to get
the graphics working under 1:20 hours when my battery runs out of
power.
* src/sheet-object-container.c
(sheet_object_container_new_from_goadid): Renamed from
sheet_object_container_new
(sheet_object_container_new): Now takes a BonoboObjectClient as an
argument.
2000-03-12 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (impl_vector_get_numbers): Increment idx
here;
(impl_vector_get_vec_values): ditto.
(impl_vector_get_numbers): Use the proper values for the columns
row.
(impl_vector_get_vec_values): ditto.
* src/clipboard.c (x_clipboard_bind_workbook): Fix memory leak.
The problem is worse, because the warning comment there was
completely bogus.
2000-03-14 Jon K Hellan <hellan@acm.org>
* src/workbook-view.c (workbook_view_history_update,
......@@ -407,7 +441,6 @@
* src/dialogs/dialog-plugin-manager.c (refresh_right_frame): Kill
a warning.
>>>>>>> 1.58
2000-03-03 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : Correct off by one error for
......
2000-03-13 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (sheet_vectors_cell_changed): Change NULL to
CORBA_OBJECT_NIL
* src/sheet-object-bonobo.c (sheet_object_bonobo_load_from_file):
Use the new IDL:Bonobo interface name, not the IDL:GNOME one
(sheet_object_bonobo_load_from_file): ditto.
(sheet_object_bonobo_load): ditto.
* src/sheet-object.c (sheet_set_mode_type): Temporary hack to get
the graphics working under 1:20 hours when my battery runs out of
power.
* src/sheet-object-container.c
(sheet_object_container_new_from_goadid): Renamed from
sheet_object_container_new
(sheet_object_container_new): Now takes a BonoboObjectClient as an
argument.
2000-03-12 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (impl_vector_get_numbers): Increment idx
here;
(impl_vector_get_vec_values): ditto.
(impl_vector_get_numbers): Use the proper values for the columns
row.
(impl_vector_get_vec_values): ditto.
* src/clipboard.c (x_clipboard_bind_workbook): Fix memory leak.
The problem is worse, because the warning comment there was
completely bogus.
2000-03-14 Jon K Hellan <hellan@acm.org>
* src/workbook-view.c (workbook_view_history_update,
......@@ -407,7 +441,6 @@
* src/dialogs/dialog-plugin-manager.c (refresh_right_frame): Kill
a warning.
>>>>>>> 1.58
2000-03-03 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : Correct off by one error for
......
2000-03-13 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (sheet_vectors_cell_changed): Change NULL to
CORBA_OBJECT_NIL
* src/sheet-object-bonobo.c (sheet_object_bonobo_load_from_file):
Use the new IDL:Bonobo interface name, not the IDL:GNOME one
(sheet_object_bonobo_load_from_file): ditto.
(sheet_object_bonobo_load): ditto.
* src/sheet-object.c (sheet_set_mode_type): Temporary hack to get
the graphics working under 1:20 hours when my battery runs out of
power.
* src/sheet-object-container.c
(sheet_object_container_new_from_goadid): Renamed from
sheet_object_container_new
(sheet_object_container_new): Now takes a BonoboObjectClient as an
argument.
2000-03-12 Miguel de Icaza <miguel@helixcode.com>
* src/sheet-vector.c (impl_vector_get_numbers): Increment idx
here;
(impl_vector_get_vec_values): ditto.
(impl_vector_get_numbers): Use the proper values for the columns
row.
(impl_vector_get_vec_values): ditto.
* src/clipboard.c (x_clipboard_bind_workbook): Fix memory leak.
The problem is worse, because the warning comment there was
completely bogus.
2000-03-14 Jon K Hellan <hellan@acm.org>
* src/workbook-view.c (workbook_view_history_update,
......@@ -407,7 +441,6 @@
* src/dialogs/dialog-plugin-manager.c (refresh_right_frame): Kill
a warning.
>>>>>>> 1.58
2000-03-03 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : Correct off by one error for
......
......@@ -291,3 +291,54 @@ Office 2000 and 'explorer' compatibility.
Needs to be optimized.
* Graphics component
* Scatter plots are not being scaled to the dimensions of the allocated
size for the graph inside the layout.
* Stacked, and Stacked 100% are not working for line plots.
* Need to support labels for categories (series)
* Need to support list of series plotted (little box on the right)
* Need to support all kinds of captions
* Need to support axis drawing with all their features
* Need to support pie-charts
* Need to add 3D support
* Need to add editing-facilities to each data plot type.
* Need to provide menu/toolbar merging facilities with the graph component with
Gnumeric
* Add printing support (not fun)
* Graphics Wizard
* Need to high-light current graph type on the first page
* Need to have "finish" support in the wizard
* Need to finish the wizard: manual data entry, better wizarding,
* Need to split the wizard from the Gnumeric linking stage
* Gnumeric-side graph support
* Need to save the settings for the plots. Perhaps the wizard?
* Need to restore the setting from the plots.
* Add component printing support.
* Sheet Object and Graphics support
* Handle ownership of objects: from the wizard to the "finish"
creation routine in the sheet-object.c code
* Remove the sheet_object_set_type_full thing, and simplify the API
everywhere by requiting the mode_data argument.
\ No newline at end of file
2000-03-12 Miguel de Icaza <miguel@helixcode.com>
* layout.c (impl_set_with_labels, impl_get_with_labels): New
methods to handle the setting or resetting of labels.
2000-02-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
* sample.c (create_test): UPdate to new Bonobo
......
......@@ -4,14 +4,22 @@
* Author:
* Miguel de Icaza (miguel@gnu.org).
*
* (C) 1999 Helix Code, Inc. (http://www.helixcode.com)
* (C) 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
*/
#include <config.h>
#include <math.h>
#include <stdlib.h>
#include "Graph.h"
#include "idl/Graph.h"
#include "graph-vector.h"
static POA_GNOME_Gnumeric_VectorNotify__epv *vector_notify_epv;
static void
setup_notifier (GraphVector *v)
{
if (
}
GraphVector *
graph_vector_new (GNOME_Gnumeric_Vector vector, GraphVectorChangeNotifyFn change, void *data, gboolean guess)
{
......@@ -40,15 +48,24 @@ graph_vector_new (GNOME_Gnumeric_Vector vector, GraphVectorChangeNotifyFn change
gv->u.values_vec = NULL;
}
setup_notifier (vector);
CORBA_exception_free (&ev);
return gv;
}
static void
destroy_notifier (GraphVector *vector)
{
}
void
graph_vector_destroy (GraphVector *vector)
{
CORBA_Environment ev;
destroy_notifer (vector);
CORBA_exception_init (&ev);
GNOME_Gnumeric_Vector_unref (vector->vector_object, &ev);
CORBA_exception_free (&ev);
......
......@@ -73,7 +73,7 @@ graph_view_colbar_draw_nth_clustered (ViewDrawCtx *ctx, int item)
const int col_width = (ctx->units_per_slot - (ctx->margin * 2)) / n_series;
int i;
for (i = 0; i < n_series; i++){
for (i = ctx->graph->first; i < n_series; i++){
GraphVector *vector = ctx->graph->layout->vectors [i];
setup_gc (ctx, i, item);
......@@ -98,7 +98,7 @@ graph_view_colbar_draw_nth_stacked (ViewDrawCtx *ctx, int item)
double last_neg = 0.0;
int i;
for (i = 0; i < n_series; i++){
for (i = ctx->graph->first; i < n_series; i++){
GraphVector *vector = ctx->graph->layout->vectors [i];
double v;
......@@ -139,7 +139,7 @@ graph_view_colbar_draw_nth_stacked_full (ViewDrawCtx *ctx, int item)
total_pos = total_neg = 0.0;
last_pos = last_neg = 0.0;
for (i = 0; i < n_series; i++){
for (i = ctx->graph->first; i < n_series; i++){
GraphVector *vector = ctx->graph->layout->vectors [i];
values [i] = graph_vector_get_double (vector, item);
......@@ -285,7 +285,7 @@ graph_view_line_draw_nth_clustered (ViewDrawCtx *ctx, int item, int draw_flags)
const int n_series = ctx->graph->layout->n_series;
int i;
for (i = 0; i < n_series; i++){
for (i = ctx->graph->first; i < n_series; i++){
GraphVector *vector = ctx->graph->layout->vectors [i];
Symbol sym;
......@@ -312,7 +312,8 @@ graph_view_line_draw_nth_stacked (ViewDrawCtx *ctx, int first, int last, int dra
const int col_width = (ctx->units_per_slot - (ctx->margin * 2)) / n_series;
double *series_values = g_new (double, n_series);
int i;
}
/*
......
......@@ -7,7 +7,7 @@
* Copyright 1999, 2000 Helix Code, Inc (http://www.helixcode.com)
*/
#include <config.h>
#include "Graph.h"
#include "idl/Graph.h"
#include "graph.h"
#include "graph-view.h"
#include "graph-view-scatter.h"
......
#include <config.h>
#include "Graph.h"
#include "idl/Graph.h"
#include "graph.h"
#include "graph-view.h"
#include "graph-view-stock.h"
......
......@@ -44,11 +44,7 @@ graph_view_canvas_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_pa
graph_view->affine [i] = affine [i];
}
/*
* This really must be shared with the gnumeric color set
*/
static char *default_colors [] = {
"rgb:0/0/0",
"rgb:FF/FF/FF",
"rgb:FF/0/0",
"rgb:0/FF/0",
......
......@@ -417,6 +417,24 @@ impl_graph_thaw (PortableServer_Servant servant, CORBA_Environment *ev)
graph_update (graph, 0);
}
static CORBA_boolean
impl_get_with_labels (PortableServer_Servant servant, CORBA_Environment *ev)
{
Graph *graph = graph_from_servant (servant);
return (graph->first == 1);
}
static void
impl_set_with_labels (PortableServer_Servant servant, CORBA_boolean with_labels, CORBA_Environment *ev)
{
Graph *graph = graph_from_servant (servant);
graph->first = with_labels ? 1 : 0;
graph_update (graph, DIRTY_SHAPE);
}
static void
init_graph_corba_class (void)
{
......@@ -440,6 +458,8 @@ init_graph_corba_class (void)
graph_epv._set_scatter_conn = &impl_graph_set_scatter_conn;
graph_epv._get_surface_mode = &impl_graph_get_surface_mode;
graph_epv._set_surface_mode = &impl_graph_set_surface_mode;
graph_epv._get_with_labels = &impl_get_with_labels;
graph_epv._set_with_labels = &impl_set_with_labels;
graph_epv.freeze = &impl_graph_freeze;
graph_epv.thaw = &impl_graph_thaw;
......
......@@ -4,7 +4,7 @@
#include <libgnome/gnome-defs.h>
#include <bonobo/bonobo-object.h>
#include "Graph.h"
#include "idl/Graph.h"
BEGIN_GNOME_DECLS
......@@ -37,6 +37,10 @@ struct _Graph {
GNOME_Graph_ScatterConn scatter_conn;
GNOME_Graph_SurfaceMode surface_mode;
/*
* For label on/off usage
*/
int first;
GSList *views;
int frozen;
......
......@@ -8,7 +8,7 @@
* (C) 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
*/
#include <config.h>
#include "Graph.h"
#include "idl/Graph.h"
#include "layout-view.h"
#include "graph-view.h"
......
......@@ -9,7 +9,7 @@
*/
#include <config.h>
#include <bonobo.h>
#include "Graph.h"
#include "idl/Graph.h"
#include "layout.h"
#include "layout-view.h"
......@@ -87,17 +87,22 @@ impl_add_series (PortableServer_Servant servant, GNOME_Gnumeric_Vector vector, C
layout->vectors [layout->n_series] = graph_vector_new (vector, NULL, NULL, 0);
layout->n_series++;
#if 0
GNOME_Gnumeric_Vector_set_notify ();
#endif
g_warning ("Set the notification function here");
graph_update (layout->graph, DIRTY_DATA);
}
static void
init_layout_corba_class (void)
{
layout_epv.get_chart = &impl_get_chart;
layout_epv.get_axis = &impl_get_axis;
layout_epv.reset_series = &impl_reset_series;
layout_epv.add_series = &impl_add_series;
layout_epv.get_chart = &impl_get_chart;
layout_epv.get_axis = &impl_get_axis;
layout_epv.reset_series = &impl_reset_series;
layout_epv.add_series = &impl_add_series;
layout_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv ();
layout_vepv.Bonobo_Embeddable_epv = bonobo_embeddable_get_epv ();
layout_vepv.GNOME_Graph_Layout_epv = &layout_epv;
......
......@@ -35,9 +35,7 @@ struct _Layout {
ObjDim graph_dim;
Graph *graph;
/*
* Number of series we hold
*/
/* Number of series we hold */
int n_series;
GraphVector **vectors;
};
......
......@@ -9,7 +9,7 @@
#include <config.h>
#include <bonobo.h>
#include <libgnorba/gnorba.h>
#include "Graph.h"
#include "idl/Graph.h"
#include "layout.h"
CORBA_Environment ev;
......
......@@ -2,11 +2,13 @@
* Test code for the graphics engine
*
* Miguel de Icaza (miguel@gnu.org)
*
* (C) 1999, 2000 Helix Code, Inc.
*/
#include <gnome.h>
#include <libgnorba/gnorba.h>
#include <bonobo.h>
#include "Graph.h"
#include "idl/Graph.h"
#include "vector.h"
/*
......
......@@ -4,10 +4,10 @@
* Author:
* Miguel de Icaza (miguel@kernel.org)
*
* (C) 1999 Helix Code, Inc. (http://www.helixcode.com)
* (C) 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
*/
#include <config.h>
#include "Graph.h"
#include "idl/Graph.h"
#include <bonobo/bonobo-object.h>
#include "vector.h"
......
......@@ -4,7 +4,7 @@
#include <libgnome/gnome-defs.h>
#include <bonobo/bonobo-object.h>
#include "Graph.h"
#include "idl/Graph.h"
BEGIN_GNOME_DECLS
......
......@@ -276,7 +276,7 @@ module GNOME {
// Interfaces for accessing value sets from linear arrays.
// Mainly used for graphics.
//
interface VectorNotify : Bonobo::Unknown {
interface VectorNotify {
void changed (in short low, in short high);
};
......
......@@ -276,7 +276,7 @@ module GNOME {
// Interfaces for accessing value sets from linear arrays.
// Mainly used for graphics.
//
interface VectorNotify : Bonobo::Unknown {
interface VectorNotify {
void changed (in short low, in short high);
};
......
......@@ -193,7 +193,8 @@ module GNOME {
attribute ScatterPoints scatter_mode;
attribute ScatterConn scatter_conn;
attribute SurfaceMode surface_mode;
attribute boolean with_labels;
//
// Methods for avoiding un-needed repaints.
//
......@@ -207,7 +208,6 @@ module GNOME {
//
// * The Chart
// * The titles
// * The series labels
// * The axis
// * The chart background
//
......@@ -216,7 +216,6 @@ module GNOME {
Axis get_axis (in AxisType axis);
void reset_series ();
void add_label_series (in GNOME::Gnumeric::Vector vector);
void add_series (in GNOME::Gnumeric::Vector vector, in string series_name);
};
};
......
......@@ -180,10 +180,11 @@ ms_obj_realize (MSObj *obj, ExcelWorkbook *wb, ExcelSheet *sheet)
#ifdef ENABLE_BONOBO
g_return_val_if_fail (blip->stream != NULL, FALSE);
g_return_val_if_fail (blip->reproid != NULL, FALSE);
so = sheet_object_container_new (sheet->gnum_sheet,
position[0], position[1],
position[2], position[3],
blip->reproid);
so = sheet_object_container_new_from_goadid (
sheet->gnum_sheet,
position[0], position[1],
position[2], position[3],
blip->reproid);
if (!sheet_object_bonobo_load (SHEET_OBJECT_BONOBO (so), blip->stream))
g_warning ("Failed to load '%s' from stream",
blip->reproid);
......
......@@ -598,7 +598,7 @@ x_selection_clear (GtkWidget *widget, GdkEventSelection *event, Workbook *wb)
void
x_clipboard_bind_workbook (Workbook *wb)
{
GtkTargetEntry *targets;
GtkTargetEntry targets;
wb->clipboard_paste_callback_data = NULL;
......@@ -625,16 +625,15 @@ x_clipboard_bind_workbook (Workbook *wb)
/*
* Our specific Gnumeric XML clipboard interchange type
*/
targets = g_new (GtkTargetEntry, 1);
targets.target = GNUMERIC_ATOM_NAME;
targets->target = GNUMERIC_ATOM_NAME;
targets->flags = GTK_TARGET_SAME_WIDGET; /* <- This is not useful, but we have to set it to something */
targets->info = GNUMERIC_ATOM_INFO;
/* This is not useful, but we have to set it to something: */
targets.flags = GTK_TARGET_SAME_WIDGET;
targets.info = GNUMERIC_ATOM_INFO;
/* We don't have to free targets, this will happen automatically once the 'toplevel' widget is destroyed!! */
gtk_selection_add_targets (wb->toplevel,
GDK_SELECTION_PRIMARY,
targets, 1);