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

Use a dialog box rather than a printf.

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

	* src/style.c (font_init): Use a dialog box rather than a printf.

1999-10-08  Miguel de Icaza  <miguel@gnu.org>

	* src/item-cursor.c (item_cursor_do_drop): We do not want anting
	here either.
parent bc1bca48
1999-10-12 Miguel de Icaza <miguel@gnu.org>
* src/style.c (font_init): Use a dialog box rather than a printf.
1999-10-08 Miguel de Icaza <miguel@gnu.org>
* src/item-cursor.c (item_cursor_do_drop): We do not want anting
here either.
1999-10-11 Michael Meeks <mmeeks@gnu.org>
* gnumeric.desktop: remove, its auto-generated.
......
1999-10-12 Miguel de Icaza <miguel@gnu.org>
* src/style.c (font_init): Use a dialog box rather than a printf.
1999-10-08 Miguel de Icaza <miguel@gnu.org>
* src/item-cursor.c (item_cursor_do_drop): We do not want anting
here either.
1999-10-11 Michael Meeks <mmeeks@gnu.org>
* gnumeric.desktop: remove, its auto-generated.
......
......@@ -205,6 +205,7 @@ src/Makefile
src/dialogs/Makefile
src/widgets/Makefile
src/functions/Makefile
graph/Makefile
wizards/Makefile
wizards/graphics/Makefile
doc/Makefile
......
......@@ -21,6 +21,8 @@ graph_SOURCES = \
data-source.h \
series.c \
series.h \
vector.c \
vector.h \
$(GRAPH_CORBA_GENERATED)
BUILT_SOURCES = $(GRAPH_CORBA_GENERATED)
......
......@@ -36,3 +36,9 @@ data_source_set_value (DataSource *data_source, const char *spec, int pos, 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);
}
......@@ -13,6 +13,7 @@ typedef struct {
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 {
......
......@@ -10,15 +10,41 @@
#define IS_GRAPH_VIEW(o) (GTK_CHECK_TYPE ((o), GRAPH_VIEW_TYPE))
#define IS_GRAPH_VIEW_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), GRAPH_VIEW_TYPE))
typedef struct {
#define DIRTY_BBOX 1
#define DIRTY_TYPE 2
#define DIRTY_SHAPE 4
struct _GraphView {
GnomeCanvasItem base;
} GraphView;
/*
* Display control
*/
Int dirty_flags;
int frozen;
/*
* Bounding box for the graph
*/
ArtIRect bbox;
/*
* Affine transform that applies to graph now
*/
double affine [6];
/*
* The Graphic repository
*/
Graph *graph;
};
typedef struct {
GnomeCanvasItemClass parent_class;
} GraphViewClass;
GtkType graph_view_get_type (void);
void graph_view_update (GraphView *graph_view);
GtkType graph_view_get_type (void);
void graph_view_update (GraphView *graph_view, int dirty_flags);
void graph_view_set_graph (GraphView *graph_view, Graph *graph);
#endif /* GRAPH_GRAPH_VIEW_H_ */
......@@ -55,10 +55,22 @@ impl_graph_set_chart_type (PortableServer_Servant servant, GNOME_Graph_ChartType
{
Graph *graph = graph_from_servant (servant);
if (graph->chart_type != value){
graph->chart_type = value;
graph_update (graph);
if (graph->chart_type == value)
return;
graph->chart_type = value;
switch (value){
case GNOME_Graph_CHART_TYPE_CLUSTERED:
break;
case GNOME_Graph_CHART_TYPE_STACKED:
graph_compute_series_sum_max (graph);
case GNOME_Graph_CHART_TYPE_STACKED_FULL:
}
graph_update (graph);
}
GNOME_Graph_PlotMode
......@@ -321,3 +333,15 @@ graph_get_type (void)
return type;
}
void
graph_bind_view (Graph *graph, GraphView *graph_view)
{
g_return_if_fail (graph != NULL);
g_return_if_fail (IS_GRAPH (graph));
g_return_if_fail (graph_view != NULL);
g_return_if_fail (IS_GRAPH_VIEW (graph_view));
graph_view_set_graph (graph_view, graph);
graph->views = g_slist_prepend (graph->views, graph_view);
}
......@@ -14,6 +14,8 @@ BEGIN_GNOME_DECLS
#define IS_GRAPH(o) (GTK_CHECK_TYPE ((o), GRAPH_TYPE))
#define IS_GRAPH_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), GRAPH_TYPE))
typedef struct _GraphView GraphView;
typedef struct {
GnomeObject base;
......@@ -33,13 +35,25 @@ typedef struct {
int frozen;
gboolean need_update;
/*
* Number of series we hold
*/
int n_series;
Series *series;
} Graph;
typedef struct {
GnomeObjectClass parent_class;
} GraphClass;
GtkType graph_get_type (void);
GtkType graph_get_type (void);
Graph *graph_new (void);
void graph_bind_view (Graph *graph, GraphView *graph_view);
void graph_get_n_series (Graph *graph);
Series *graph_get_series (Graph *graph, int n);
END_GNOME_DECLS
......
......@@ -24,6 +24,14 @@ module GNOME {
case VALUE_ARRAY: string array;
case VALUE_CELLRANGE: CellRange cell_range;
};
union VecValue switch (short) {
case VALUE_BOOLEAN: boolean v_bool;
case VALUE_FLOAT: double v_float;
case VALUE_INTEGER: long v_int;
case VALUE_STRING: string str;
};
};
};
......@@ -238,11 +238,11 @@ module GNOME {
// Interfaces for accessing value sets from linear arrays.
// Mainly used for graphics.
//
interface DataNotify {
interface VectorNotify {
void changed (in short pos);
};
interface Data {
interface Vector : GNOME::Unknown {
exception OutOfRange {};
/**
......@@ -251,7 +251,7 @@ module GNOME {
*
* Returns the Value at index position pos
*/
Value get (in short pos) raises (OutOfRange);
VecValue get (in short pos) raises (OutOfRange);
/**
* set:
......@@ -260,9 +260,9 @@ module GNOME {
*
* Sets the value at index position @pos to @val
*/
void set (in short pos, in Value val);
void set (in short pos, in VecValue val);
void set_notify (in DataNotify dn);
void set_notify (in VectorNotify vector_notify);
/**
* count:
......@@ -271,7 +271,6 @@ module GNOME {
*/
short count ();
};
};
};
......
......@@ -265,6 +265,7 @@ Sheet_cell_set_value (PortableServer_Servant servant,
cell = sheet_cell_fetch (sheet, col, row);
v = CORBA_Value_to_value (sheet, value);
switch (value->_d){
case GNOME_Gnumeric_VALUE_EMPTY:
v = value_new_empty ();
......
......@@ -607,6 +607,7 @@ item_cursor_do_drop (ItemCursor *item_cursor, GdkEventButton *event)
action = ACTION_MOVE_CELLS;
item_cursor_do_action (item_cursor, action, event->time);
sheet_selection_unant (item_cursor->sheet);
}
static void
......
......@@ -669,20 +669,20 @@ font_init (void)
gnumeric_default_font = style_font_new_simple (DEFAULT_FONT, DEFAULT_SIZE, 1.0, FALSE, FALSE);
if (!gnumeric_default_font) {
fprintf (stderr,
"Gnumeric failed to find a suitable default font.\n"
"\n"
"Please verify your gnome-print installation and that your fontmap file\n"
"(typically located in /usr/local/share/fonts/fontmap) is not empty or\n"
"near empty.\n"
"\n"
"If you still have no luck, please file a proper bug report (see\n"
"http://bugs.gnome.org) including the following extra items:\n"
"\n"
"1. Values of LC_ALL and LANG environment variables.\n"
"2. Your fontmap file, see above.\n"
"\n"
"Thanks -- the Gnumeric Team\n");
gnumeric_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
_("Gnumeric failed to find a suitable default font.\n"
"\n"
"Please verify your gnome-print installation and that your fontmap file\n"
"(typically located in /usr/local/share/fonts/fontmap) is not empty or\n"
"near empty.\n"
"\n"
"If you still have no luck, please file a proper bug report (see\n"
"http://bugs.gnome.org) including the following extra items:\n"
"\n"
"1. Values of LC_ALL and LANG environment variables.\n"
"2. Your fontmap file, see above.\n"
"\n"
"Thanks -- the Gnumeric Team\n"));
exit (1);
}
......
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