Commit 613f3562 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

disconnect the combo handlers before we destroy the state so that their

2001-10-06  Jody Goldberg <jgoldberg@home.com>

	* dialog-graph-guru.c (graph_guru_state_destroy) : disconnect the
	  combo handlers before we destroy the state so that their callbacks
	  don't trigger during destruction.
	(vector_state_set_entry) : merge back into.
	(vector_state_fill) : here.  Use the index rather than a cached
	  xmlNode *.
	(vector_state_new) : rename 'index' to 'dim_index' to be clearer.
	(graph_guru_select_plot) : store the index rather than an xmlNode *.
	(graph_guru_select_series) : store the index rather than an xmlNode *.
	(graph_guru_init_data_page) : the graph caches the spec, not us.
	(graph_guru_get_plot) : new utility.
	(cb_plot_selection_changed) : use the new utility.
	(graph_guru_get_series) : new utility.
	(cb_series_selection_changed) : use the new utility.
	(cb_series_entry_changed) : support lookup, and warn about renaming.
	(cb_plot_entry_changed) : support lookup, and warn about renaming.
	(cb_graph_guru_focus) : use graph_guru_get_series.
	(dialog_graph_guru) : init the combos to NULL in case we destroy
	  before initializing them.

2001-10-07  Jody Goldberg <jgoldberg@home.com>

	* configure.in (EXTRA_GNOME_{CFLAGS,LIBS}) : rename to something
	  clearer like GNUMERIC_{CFLAGS,LIBS})
	* **/Makefile.am : Use them in place of EXTRA_* and GNOME_INCLUDEDIR.

2001-10-06  Jody Goldberg <jgoldberg@home.com>

	* src/gnumeric-graph.c (gnm_graph_get_spec) : Add a force_update.
	(gnm_graph_series_delete) : new
	(gnm_graph_series_set_dimension) : new
	(gnm_graph_exception) : new.
	(gnm_graph_vector_from_string) : delete.
parent ae8a15cd
......@@ -10,7 +10,8 @@ Release Critical
- Add an idle handler at start up to check for availablity of
evo and guppi. They should only be enabled if they are available.
- config check for xml-i18n-tool version
- config check for xml-i18n-tool version (or should it be
intltool ?)
Pending Patches
---------------
......@@ -18,6 +19,8 @@ Pending Patches
Long term breakage
------------------
- Consistent capitalization of labels.
- Need to figure out accelerators and pixmaps for Search.
- can_try_save_to uses access(). That's bogus in a number of ways: (a) it
......
2001-10-07 Jody Goldberg <jgoldberg@home.com>
* configure.in (EXTRA_GNOME_{CFLAGS,LIBS}) : rename to something
clearer like GNUMERIC_{CFLAGS,LIBS})
* **/Makefile.am : Use them in place of EXTRA_* and GNOME_INCLUDEDIR.
2001-10-06 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-graph.c (gnm_graph_get_spec) : Add a force_update.
(gnm_graph_series_delete) : new
(gnm_graph_series_set_dimension) : new
(gnm_graph_exception) : new.
(gnm_graph_vector_from_string) : delete.
2001-10-06 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-stf-preview.c (stf_preview_new) : Use
......
......@@ -68,6 +68,9 @@ Wayne Schuller:
* Support gray scale patterns when printing.
* Improve Header/Footer page for printer setup.
Yukihiro Nakai:
* Improve font handling for multi-byte environments.
Zbigniew:
* Support for translations in plugin.xml files using xml-i18n-tools
(modified xml file structure a bit).
......
2001-10-07 Jody Goldberg <jgoldberg@home.com>
* configure.in (EXTRA_GNOME_{CFLAGS,LIBS}) : rename to something
clearer like GNUMERIC_{CFLAGS,LIBS})
* **/Makefile.am : Use them in place of EXTRA_* and GNOME_INCLUDEDIR.
2001-10-06 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-graph.c (gnm_graph_get_spec) : Add a force_update.
(gnm_graph_series_delete) : new
(gnm_graph_series_set_dimension) : new
(gnm_graph_exception) : new.
(gnm_graph_vector_from_string) : delete.
2001-10-06 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-stf-preview.c (stf_preview_new) : Use
......
2001-10-07 Jody Goldberg <jgoldberg@home.com>
* configure.in (EXTRA_GNOME_{CFLAGS,LIBS}) : rename to something
clearer like GNUMERIC_{CFLAGS,LIBS})
* **/Makefile.am : Use them in place of EXTRA_* and GNOME_INCLUDEDIR.
2001-10-06 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-graph.c (gnm_graph_get_spec) : Add a force_update.
(gnm_graph_series_delete) : new
(gnm_graph_series_set_dimension) : new
(gnm_graph_exception) : new.
(gnm_graph_vector_from_string) : delete.
2001-10-06 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-stf-preview.c (stf_preview_new) : Use
......
2001-10-07 Jody Goldberg <jgoldberg@home.com>
* configure.in (EXTRA_GNOME_{CFLAGS,LIBS}) : rename to something
clearer like GNUMERIC_{CFLAGS,LIBS})
* **/Makefile.am : Use them in place of EXTRA_* and GNOME_INCLUDEDIR.
2001-10-06 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-graph.c (gnm_graph_get_spec) : Add a force_update.
(gnm_graph_series_delete) : new
(gnm_graph_series_set_dimension) : new
(gnm_graph_exception) : new.
(gnm_graph_vector_from_string) : delete.
2001-10-06 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-stf-preview.c (stf_preview_new) : Use
......
......@@ -672,10 +672,10 @@ AM_CONDITIONAL(WITH_GDA, $have_gda)
AC_SUBST(GDA_CFLAGS)
AC_SUBST(GDA_LIBS)
EXTRA_GNOME_LIBS=`gnome-config --libs gnomeui print libglade $bonobo libole2 gal`
EXTRA_GNOME_CFLAGS=`gnome-config --cflags gnomeui print libglade $bonobo libole2 gal`
AC_SUBST(EXTRA_GNOME_LIBS)
AC_SUBST(EXTRA_GNOME_CFLAGS)
GNUMERIC_LIBS=`gnome-config --libs gnomeui print libglade $bonobo libole2 gal`
GNUMERIC_CFLAGS=`gnome-config --cflags gnomeui print libglade $bonobo libole2 gal`
AC_SUBST(GNUMERIC_LIBS)
AC_SUBST(GNUMERIC_CFLAGS)
AM_CONDITIONAL(LIBOLE2_PUBLIC_LIBRARY, false)
......
Makefile
Makefile.in
.deps
.libs
graph
Graph-stubs.c
Graph-skels.c
Graph-common.c
Graph.h
my_graph_idl
graph-bonobo
graph.oafinfo
sample
2001-06-28 Jody Goldberg <jgoldberg@home>
* Release 0.67
2000-12-17 Jody Goldberg <jgoldberg@home.com>
* Release 0.61
2000-12-7 Jody Goldberg <jgoldberg@home.com>
* Release 0.60
2000-11-18 Jody Goldberg <jgoldberg@home.com>
* Release 0.59
2000-11-13 Jody Goldberg <jgoldberg@home.com>
* Release 0.58
2000-10-10 Jody Goldberg <jgoldberg@home.com>
* Release 0.57
2000-07-04 Jody Goldberg <jgoldberg@home.com>
* graph-view-util.h (ADJUST_X) : new macro.
(MAP_X) : Use ADJUST_X.
* graph-view-scatter.c (graph_view_scatter_plot) : Remove the debug
printout.
2000-06-18 Jody Goldberg <jgoldberg@home.com>
* Release 0.56
2000-06-18 Jody Goldberg <jgoldberg@home.com>
* Release 0.55
2000-05-20 Jody Goldberg <jgoldberg@home.com>
* Release 0.54
2000-05-09 Jody Goldberg <jgoldberg@home.com>
* Release 0.53
2000-05-02 Michael Meeks <michael@helixcode.com>
* main.c (layout_factory_init): update for oaf.
* sample.c (create_test): nicer activation.
2000-05-01 Jody Goldberg <jgoldberg@home.com>
* main.c : include popt-gnome.h to define POPT_AUTOHELP so that
oaf_popt_options is gets declared.
2000-05-01 Michael Meeks <michael@helixcode.com>
* graph.oafinfo.in: kill the uuid == version idea, it was
truly bad it seems; add version attribute.
2000-05-01 Michael Meeks <michael@helixcode.com>
* sample.c (create_test): Update object_activate.
* Makefile.am: handle the oaf.
* graph.oafinfo.in: add.
* sample.c (main): oafize.
* Makefile.am (-DGNUMERIC_GLADEDIR): kill.
* main.c (init_server_factory): update for oaf.
2000-04-06 Jody Goldberg <jgoldberg@home.com>
* graph.c (graph_compute_scatter_dimensions) : Minor patch to avoid
crashing on empty selection.
* graph-view-scatter.c (graph_view_scatter_plot) : Ditto.
(graph_view_line_plot) : Ditto.
2000-03-23 Miguel de Icaza <miguel@helixcode.com>
* graph-view.c (graph_view_update): Also handle DIRTY_DATA here.
* graph-vector.c (impl_changed): Implement vector cache flushing
on changes.
2000-03-21 Miguel de Icaza <miguel@helixcode.com>
* graph-vector.c (destroy_notifier, setup_notifier): Added
notifier support to the vectors.
(graph_vector_new): Memory leak fix; Duplicate the vector value on
receiving.
* layout.c (impl_add_series): Set the notifier here.
2000-03-17 Michael Meeks <michael@helixcode.com>
* graph-vector.c (graph_vector_destroy): fix to notifier.
(setup_notifier): emit a nasty warning.
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
2000-02-10 Miguel de Icaza <miguel@gnu.org>
* graph-view-colbar.c (graph_view_colbar_draw): Pass a "last
field" flags.
(la_draw): Drive the plotting with flags.
Use MAP_Y routines to map coordinates.
(graph_view_line_draw_nth_clustered): Do not map Y coordinates here.
2000-02-09 Miguel de Icaza <miguel@gnu.org>
* graph-view-colbar.c (graph_view_line_draw_nth_clustered): Added
new graphics mode for column/bar mode (this actually implements
"Lines" and "Areas" from Excel.
(la_draw): Draws lines and areas
(column_draw): Fix to draw correctly on exposes.
(graph_view_colbar_draw): For now render everything, the code that
chose begin/end was broken.
2000-01-30 Miguel de Icaza <miguel@gnu.org>
* graph-view-scatter.c (graph_view_scatter_plot): Pass the proper
GC to the init routine.
* graph-view-util.c (setup_view_ctx): New function, replaces the
old SETUP_VIEW_CTX macro.
2000-01-06 Miguel de Icaza <miguel@gnu.org>
* vector.c (init_vector_corba_class): Use new convention for EPV
construction.
* layout.c (init_layout_corba_class): Use new convention for EPV
construction.
* graph.c (init_graph_corba_class): Use new convention for EPV
construction.
1999-11-09 Michael Meeks <mmeeks@gnu.org>
* Makefile.am: Fixup graph.gnorba install
1999-11-07 Miguel de Icaza <miguel@gnu.org>
* graph-view-scatter.c: Wrote most of this file.
* graph.c (graph_compute_stacked_dimensions): Initialize len here.
* graph-view-colbar.c (column_draw): Add support for plotting
columns and bars.
Fixed the drawing order.
(setup_gc): Picks a color for now, we need to make this consult
the properties.
(graph_view_colbar_draw_nth_clustered): Fix for negatives.
* layout-view.c (layout_view_new): Use graph_bind_view here.
* graph-view.c (graph_view_alloc_colors): Allocate a bunch of
colors.
* graph-view-colbar.c (setup_gc): Assign a color to plot with.
* vector.c (vector_new): Store the user data.
* vector.h, vector.c: All callback functions now receive a
Vector * argument.
1999-10-22 Miguel de Icaza <miguel@gnu.org>
* Makefile.am ($(GRAPH_CORBA_GENERATED)): Do not use BUILT_SOURCES
as suggested by Tom.
1999-09-30 Miguel de Icaza <miguel@gnu.org>
* New ChangeLog file.
INCLUDES = \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGNUMERIC_GLADEDIR=\""$(gladedir)"\" \
-DGNUMERIC_ICONDIR=\""$(iconsdir)"\" \
-I$(includedir) \
-I$(top_srcdir) \
$(EXTRA_GNOME_CFLAGS)
if BONOBO
bin_PROGRAMS = graph-bonobo
noinst_PROGRAMS = sample
endif
graph_bonobo_SOURCES = \
graph.c \
graph.h \
graph-vector.c \
graph-vector.h \
graph-view.c \
graph-view.h \
graph-view-colbar.c \
graph-view-colbar.h \
graph-view-plot.c \
graph-view-plot.h \
graph-view-scatter.c \
graph-view-scatter.h \
graph-view-stock.c \
graph-view-stock.h \
graph-view-util.c \
graph-view-util.h \
layout.c \
layout.h \
layout-view.c \
layout-view.h \
main.c \
vector.c \
vector.h
graph_bonobo_LDADD = \
$(EXTRA_GNOME_LIBS) \
../idl/libGnumeric.a \
../idl/libGraph.a \
$(INTLLIBS)
sample_SOURCES = \
sample.c \
vector.c \
vector.h
sample_LDADD = \
$(EXTRA_GNOME_LIBS) \
../idl/libGnumeric.a \
../idl/libGraph.a \
$(INTLLIBS)
gnorbadir = $(sysconfdir)/CORBA/servers
oafdir = $(datadir)/oaf
gnorba_DATA = graph.gnorba
oaf_DATA = graph.oafinfo
EXTRA_DIST = graph.gnorba graph.oafinfo.in
This is a roadmap of the files that compose the GNOME Graphics
component.
The Graph component is a Bonobo component that implements the
GNOME::Embeddable interface for being embedded.
The main entry point is the GNOME::Graph::Layout interface, this is an
interface that enables the user to control the various visual elements
of a graphic.
Separate interfaces are used for the different components of the user
interface.
* Graph.idl:
CORBA interfaces for the Graphic module. Includes the
Gnumeric.idl interfaces.
* layout.c, layout.h:
Contains the implementation of the GNOME::Graph::Layout
interface. This object implements a GNOME::Embeddable and it
is the repository for the various elements of a plot.
The object is a derivative of a GnomeEmbeddable Bonobo object.
* layout-view.c, layout-view.h:
These implement the Bonobo views for the Layout embeddable
component. They are GnomeCanvas derivatives and they take
care of laying out the various visual elements that compose
the plot.
* graph.c, graph.h:
These implement a plain GnomeObject that controls the actual
plotting engine. The graphic is manipulated trough CORBA by
changing the different attributes exposed by the interface.
Common operations for all the graphic types are done here,
like computing the ranges of the information to be plotted.
* graph-view.h, graph-view.c:
These are the views of the Graph model. The views are
implemented as GnomeCanvasItems. They are created by the
LayoutView object.
This file implements the "dispatching" of the actual rendering
to rendering routines implemented in the various other
modules.
* vector.c, vector.h
Vectors represent a one-dimension array that can contain
VecValues (strings or doubles). Sometimes the plotting engine
does not care about the string, so it requests that any string
found is converted to a double value.
Vectors are GnomeObjects and are intended to be instantiated
for each series being plotted in the container applications.
The Vector object implementation uses callbacks to simplify
testing and prototyping. The Gnumeric version might just hook
up directly into Gnumeric.
Vectors are transfered to the Layout using the the add_series
method in the Layout.
* graph-vector.c, graph-vector.h:
These files implement the access to the remote Vector object
and are intended to provide a basic "cache" mechanism for the
actual data.
/*
* Data Source abstract class
*
* Author:
* Miguel de Icaza (miguel@kernel.org)
*
* (C) 1999 Helix Code, Inc (http://www.helixcode.com)
*/
#include <config.h>
#include "data-source.h"
#include "util.h"
static DataSourceClass *dsc;
static void
data_source_init (GtkObject *object)
{
}
static void
data_source_class_init (GtkObjectClass *object_class)
{
dsc = gtk_type_class (data_source_get_type ());
}
DEFINE_TYPE(DataSource,"DataSource",gtk_object,data_source);
Value *
data_source_get_value (DataSource *data_source, const char *spec, int pos)
{
return (*dsc->get_value)(data_source, spec, pos);
}
gboolean
data_source_set_value (DataSource *data_source, const char *spec, int pos, Value *value)
{
return (*dsc->set_value)(data_source, spec, pos, value);
}
int
data_source_len (DataSource *data_source, const char *spec)
{
return (*dsc->len) (data_source, spec);
}
#ifndef DATA_SOURCE_H
#define DATA_SOURCE_H
#include <gtk/gtkobject.h>
#include "src/value.h"
typedef struct {
GtkObject parent;
} DataSource;
typedef struct {
GtkObjectClass parent_class;
Value *(*get_value)(DataSource *source, const char *spec, int pos);
gboolean (*set_value)(DataSource *source, const char *spec, int pos, Value *value);
int (*len) (DataSource *source, const char *spec);
} DataSourceClass;
typedef enum {
DATA_SET_OK,
DATA_SET_ERROR
} DataResult;
GtkType data_source_get_type (void);
Value *data_source_get_value (DataSource *source, const char *spec, int pos);
gboolean data_source_set_value (DataSource *source, const char *spec, int pos, Value *value);
#endif /* DATA_SOURCE_H */
/*
* Graph component-side vector representation
*
* Author:
* Miguel de Icaza (miguel@gnu.org).
*
* (C) 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
*/
#include <config.h>
#include <math.h>
#include <stdlib.h>
#include <bonobo/bonobo-main.h>
#include "idl/Graph.h"
#include "graph-vector.h"
static POA_GNOME_Gnumeric_VectorNotify__vepv vector_notify_vepv;
static POA_GNOME_Gnumeric_VectorNotify__epv vector_notify_epv;
static void
impl_changed (PortableServer_Servant servant,
const CORBA_short low, const CORBA_short high,
CORBA_Environment *ev)
{
NotifierServer *ns = (NotifierServer *) servant;
GraphVector *gv = ns->graph_vector;
gboolean only_numbers;
GNOME_Gnumeric_Vector vector = gv->vector_object;
CORBA_Environment myev;
CORBA_exception_init (&myev);
/*
* Find out if the vector still contains only numbers
*/
only_numbers = GNOME_Gnumeric_Vector_only_numbers (vector, &myev);
if (ev->_major != CORBA_NO_EXCEPTION){
CORBA_exception_free (&myev);
return;
}
/*
* Process according to the current vector state
*/
if (gv->contains_numbers){
if (only_numbers){
GNOME_Gnumeric_DoubleVec *vals;
int j, i;
/*
* Reload the changed range
*/
vals = GNOME_Gnumeric_Vector_get_numbers (vector, low, high, &myev);
if (ev->_major != CORBA_NO_EXCEPTION){
CORBA_exception_free (&myev);
return;
}
for (i = low, j = 0; i < high; i++, j++)
gv->u.double_vec->_buffer [i] = vals->_buffer [j];
CORBA_free (vals);
} else {
/*
* The vector no longer contains only numbers, flush it.
*
* FIXME: We could be smarter and convert our array to the
* VecValue manually, and just reload the [low,high] set of values.
*/
GNOME_Gnumeric_VecValueVec *vals;
vals = GNOME_Gnumeric_Vector_get_vec_values (vector, 0, -1, &myev);
if (ev->_major != CORBA_NO_EXCEPTION){
CORBA_exception_free (&myev);
return;
}
CORBA_free (gv->u.double_vec);
gv->u.values_vec = vals;
gv->contains_numbers = FALSE;
}
} else {
if (only_numbers){
/*
* The vector now only contains numbers, flush the values,
* and load the numbers.
*
* FIXME: We could be smarter and convert our array to the
* DoubleVec manually, and just reload the [low,high] set of values.
*/
GNOME_Gnumeric_DoubleVec *vals;
vals = GNOME_Gnumeric_Vector_get_numbers (vector, 0, -1, &myev);
if (ev->_major != CORBA_NO_EXCEPTION){
CORBA_exception_free (&myev);
return;
}
CORBA_free (gv->u.values_vec);
gv->contains_numbers = TRUE;
gv->u.double_vec = vals;
} else {
GNOME_Gnumeric_VecValueVec *vals;
int j, i;
/*
* Reload the changed range
*/
vals = GNOME_Gnumeric_Vector_get_vec_values (vector, low, high, &myev);
if (ev->_major != CORBA_NO_EXCEPTION){
CORBA_exception_free (&myev);
return;
}
for (i = low, j = 0; i < high; i++, j++){
if (gv->u.values_vec->_buffer [i]._d == GNOME_Gnumeric_VALUE_STRING){
CORBA_free (gv->u.values_vec->_buffer [i]._u.str);
}
gv->u.values_vec->_buffer [i]._d = vals->_buffer [j]._d;
if (vals->_buffer [j]._d == GNOME_Gnumeric_VALUE_STRING){
gv->u.values_vec->_buffer [i]._u.str =
CORBA_string_dup (vals->_buffer [j]._u.str);
} else {
gv->u.values_vec->_buffer [i]._u.v_float =
vals->_buffer [j]._u.v_float;
}
}
CORBA_free (vals);
}
}
(*gv->change)(gv, low, high, gv->change_data);
CORBA_exception_free (&myev);
}
/*
* This creates a CORBA server for the VectorNotify interface, and activates
* it. This one is invoked when the data changes on the spreadsheet
*/
static gboolean
setup_notifier (GraphVector *v)
{
CORBA_Environment ev;
vector_notify_epv.changed = impl_changed;
vector_notify_vepv.GNOME_Gnumeric_VectorNotify_epv = &vector_notify_epv;
v->notifier_server = g_new0 (NotifierServer, 1);
v->notifier_server->corba_server.vepv = &vector_notify_vepv;
v->notifier_server->graph_vector = v;
CORBA_exception_init (&ev);
POA_GNOME_Gnumeric_VectorNotify__init ((PortableServer_Servant) v->notifier_server, &ev);
if (ev._major != CORBA_NO_EXCEPTION){
g_free (v->notifier_server);
CORBA_exception_free (&ev);
return FALSE;
}
CORBA_free (PortableServer_POA_activate_object (
bonobo_poa (), v->notifier_server, &ev));
v->corba_object_reference = PortableServer_POA_servant_to_reference (
bonobo_poa(), v->notifier_server, &ev);
CORBA_exception_free (&ev);
return TRUE;
}
static void
destroy_notifier (GraphVector *vector)
{
CORBA_Environment ev;
PortableServer_ObjectId *oid;
if (!vector->notifier_server)
return;
CORBA_exception_init (&ev);
CORBA_Object_release (vector->vector_object, &ev);
oid = PortableServer_POA_servant_to_id (bonobo_poa(), vector->notifier_server, &ev);
PortableServer_POA_deactivate_object (bonobo_poa (), oid, &ev);
CORBA_Object_release (vector->corba_object_reference, &ev);
POA_GNOME_Gnumeric_VectorNotify__fini (vector->notifier_server, &ev);
CORBA_free(oid);
CORBA_exception_free (&ev);
}
GraphVector *
graph_vector_new (GNOME_Gnumeric_Vector vector, GraphVectorChangeNotifyFn change, void *data, gboolean guess)
{
GraphVector *gv