Commit ad531019 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Follow convention that the manager is set when attached, and not before.


2000-11-15  Jody Goldberg <jgoldberg@home.com>

	* src/workbook-control.c (workbook_control_set_view) : Follow
	  convention that the manager is set when attached, and not before.
	* src/workbook-view.c (wb_view_attach_control) : Ditto.  Set the
	  tile on the new control.
	* src/workbook.c (workbook_attach_view) : Ditto.

2000-11-15  Jody Goldberg <jgoldberg@home.com>

	* src/command-context-corba.[ch] : This is incorrectly named and used
	  the wrong way :-( But at least it is compilable.  I'll fix this
	  later.

2000-11-15  Jody Goldberg <jgoldberg@home.com>

	* src/colrow.c (col_row_foreach) : Use ColRowSegments
	(col_row_restore_sizes) : Ditto.
	* src/sheet.c (sheet_{col,row}_add) : Ditto.
	(sheet_{col,row}_get_info) : Ditto.
	(sheet_{col,row}_get) : Ditto.
	(sheet_cell_foreach_range) : Ditto.
	(sheet_{col,row}_destroy) : Ditto.
	(sheet_regen_adjacent_spans) : Ditto.
	(colrow_move) : Ditto.
	(sheet_{col,row}_get_distance_pixels) : Ditto.
	(sheet_{col,row}_get_distance_pts) : Ditto.
	(sheet_{col,row}_set_size_pts) : Ditto.

2000-11-15  Jody Goldberg <jgoldberg@home.com>

	s/sheet-view/sheet-control-gui/

	* src/Makefile.am : Add command-context-corba.[ch] temporarily

	* configure.in : Default to non-bonobo build
parent 43c98f8e
......@@ -5,7 +5,8 @@ and longer term bugs.
Release Critical
----------------
- new wb_controls do not display
: selection string
Long term breakage
------------------
......@@ -43,11 +44,6 @@ Long term breakage
- While we're playing with those functions, lets add simple ones like inc/dec
font size and things like that.
- cell_set_value is being called from the C locale rather than the selected
locale during xml restore. This is broken because it attempts to render the
entered_text using a format. This is done in the wrong locale.
We should get rid of 'entered_text' soon and just generate it as necessary.
- Fix Borders
STF - pasting a single line should not invoke the importer
......
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control.c (workbook_control_set_view) : Follow
convention that the manager is set when attached, and not before.
* src/workbook-view.c (wb_view_attach_control) : Ditto. Set the
tile on the new control.
* src/workbook.c (workbook_attach_view) : Ditto.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/command-context-corba.[ch] : This is incorrectly named and used
the wrong way :-( But at least it is compilable. I'll fix this
later.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/colrow.c (col_row_foreach) : Use ColRowSegments
(col_row_restore_sizes) : Ditto.
* src/sheet.c (sheet_{col,row}_add) : Ditto.
(sheet_{col,row}_get_info) : Ditto.
(sheet_{col,row}_get) : Ditto.
(sheet_cell_foreach_range) : Ditto.
(sheet_{col,row}_destroy) : Ditto.
(sheet_regen_adjacent_spans) : Ditto.
(colrow_move) : Ditto.
(sheet_{col,row}_get_distance_pixels) : Ditto.
(sheet_{col,row}_get_distance_pts) : Ditto.
(sheet_{col,row}_set_size_pts) : Ditto.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
s/sheet-view/sheet-control-gui/
* src/Makefile.am : Add command-context-corba.[ch] temporarily
* configure.in : Default to non-bonobo build
2000-11-15 Michael Meeks <michael@helixcode.com>
* gnumeric.oafinfo: rename to ObjectFactory
......
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control.c (workbook_control_set_view) : Follow
convention that the manager is set when attached, and not before.
* src/workbook-view.c (wb_view_attach_control) : Ditto. Set the
tile on the new control.
* src/workbook.c (workbook_attach_view) : Ditto.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/command-context-corba.[ch] : This is incorrectly named and used
the wrong way :-( But at least it is compilable. I'll fix this
later.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/colrow.c (col_row_foreach) : Use ColRowSegments
(col_row_restore_sizes) : Ditto.
* src/sheet.c (sheet_{col,row}_add) : Ditto.
(sheet_{col,row}_get_info) : Ditto.
(sheet_{col,row}_get) : Ditto.
(sheet_cell_foreach_range) : Ditto.
(sheet_{col,row}_destroy) : Ditto.
(sheet_regen_adjacent_spans) : Ditto.
(colrow_move) : Ditto.
(sheet_{col,row}_get_distance_pixels) : Ditto.
(sheet_{col,row}_get_distance_pts) : Ditto.
(sheet_{col,row}_set_size_pts) : Ditto.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
s/sheet-view/sheet-control-gui/
* src/Makefile.am : Add command-context-corba.[ch] temporarily
* configure.in : Default to non-bonobo build
2000-11-15 Michael Meeks <michael@helixcode.com>
* gnumeric.oafinfo: rename to ObjectFactory
......
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control.c (workbook_control_set_view) : Follow
convention that the manager is set when attached, and not before.
* src/workbook-view.c (wb_view_attach_control) : Ditto. Set the
tile on the new control.
* src/workbook.c (workbook_attach_view) : Ditto.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/command-context-corba.[ch] : This is incorrectly named and used
the wrong way :-( But at least it is compilable. I'll fix this
later.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/colrow.c (col_row_foreach) : Use ColRowSegments
(col_row_restore_sizes) : Ditto.
* src/sheet.c (sheet_{col,row}_add) : Ditto.
(sheet_{col,row}_get_info) : Ditto.
(sheet_{col,row}_get) : Ditto.
(sheet_cell_foreach_range) : Ditto.
(sheet_{col,row}_destroy) : Ditto.
(sheet_regen_adjacent_spans) : Ditto.
(colrow_move) : Ditto.
(sheet_{col,row}_get_distance_pixels) : Ditto.
(sheet_{col,row}_get_distance_pts) : Ditto.
(sheet_{col,row}_set_size_pts) : Ditto.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
s/sheet-view/sheet-control-gui/
* src/Makefile.am : Add command-context-corba.[ch] temporarily
* configure.in : Default to non-bonobo build
2000-11-15 Michael Meeks <michael@helixcode.com>
* gnumeric.oafinfo: rename to ObjectFactory
......
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control.c (workbook_control_set_view) : Follow
convention that the manager is set when attached, and not before.
* src/workbook-view.c (wb_view_attach_control) : Ditto. Set the
tile on the new control.
* src/workbook.c (workbook_attach_view) : Ditto.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/command-context-corba.[ch] : This is incorrectly named and used
the wrong way :-( But at least it is compilable. I'll fix this
later.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/colrow.c (col_row_foreach) : Use ColRowSegments
(col_row_restore_sizes) : Ditto.
* src/sheet.c (sheet_{col,row}_add) : Ditto.
(sheet_{col,row}_get_info) : Ditto.
(sheet_{col,row}_get) : Ditto.
(sheet_cell_foreach_range) : Ditto.
(sheet_{col,row}_destroy) : Ditto.
(sheet_regen_adjacent_spans) : Ditto.
(colrow_move) : Ditto.
(sheet_{col,row}_get_distance_pixels) : Ditto.
(sheet_{col,row}_get_distance_pts) : Ditto.
(sheet_{col,row}_set_size_pts) : Ditto.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
s/sheet-view/sheet-control-gui/
* src/Makefile.am : Add command-context-corba.[ch] temporarily
* configure.in : Default to non-bonobo build
2000-11-15 Michael Meeks <michael@helixcode.com>
* gnumeric.oafinfo: rename to ObjectFactory
......
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control.c (workbook_control_set_view) : Follow
convention that the manager is set when attached, and not before.
* src/workbook-view.c (wb_view_attach_control) : Ditto. Set the
tile on the new control.
* src/workbook.c (workbook_attach_view) : Ditto.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/command-context-corba.[ch] : This is incorrectly named and used
the wrong way :-( But at least it is compilable. I'll fix this
later.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* src/colrow.c (col_row_foreach) : Use ColRowSegments
(col_row_restore_sizes) : Ditto.
* src/sheet.c (sheet_{col,row}_add) : Ditto.
(sheet_{col,row}_get_info) : Ditto.
(sheet_{col,row}_get) : Ditto.
(sheet_cell_foreach_range) : Ditto.
(sheet_{col,row}_destroy) : Ditto.
(sheet_regen_adjacent_spans) : Ditto.
(colrow_move) : Ditto.
(sheet_{col,row}_get_distance_pixels) : Ditto.
(sheet_{col,row}_get_distance_pts) : Ditto.
(sheet_{col,row}_set_size_pts) : Ditto.
2000-11-15 Jody Goldberg <jgoldberg@home.com>
s/sheet-view/sheet-control-gui/
* src/Makefile.am : Add command-context-corba.[ch] temporarily
* configure.in : Default to non-bonobo build
2000-11-15 Michael Meeks <michael@helixcode.com>
* gnumeric.oafinfo: rename to ObjectFactory
......
......@@ -77,6 +77,8 @@ GNUMERIC_BASE_SOURCES = \
command-context.c \
command-context.h \
command-context-priv.h \
command-context-corba.c \
command-context-corba.h \
io-context.c \
io-context.h \
io-context-priv.h \
......@@ -187,8 +189,8 @@ GNUMERIC_BASE_SOURCES = \
sheet-object-graphic.c \
sheet-object-graphic.h \
sheet-style.c \
sheet-view.c \
sheet-view.h \
sheet-control-gui.c \
sheet-control-gui.h \
solver-lp.c \
solver.h \
sort.c \
......
......@@ -9,7 +9,7 @@
#include "cell.h"
#include "sheet.h"
#include "cell-comment.h"
#include "sheet-view.h"
#include "sheet-control-gui.h"
#include "gnumeric-sheet.h"
#include <gal/widgets/e-cursors.h>
......@@ -119,7 +119,7 @@ cell_comment_realize (Cell *cell)
sheet_cell_comment_link (cell);
for (l = cell->base.sheet->sheet_views; l; l = l->next){
SheetView *sheet_view = SHEET_VIEW (l->data);
SheetControlGUI *sheet_view = SHEET_CONTROL_GUI (l->data);
GnomeCanvasItem *o;
o = sheet_view_comment_create_marker (
......@@ -209,7 +209,7 @@ cell_comment_reposition (Cell *cell)
/* FIXME : This should use the sheet_view list */
for (l = cell->comment->realized_list; l; l = l->next){
GnomeCanvasItem *o = l->data;
SheetView *sheet_view = GNUMERIC_SHEET (o->canvas)->sheet_view;
SheetControlGUI *sheet_view = GNUMERIC_SHEET (o->canvas)->sheet_view;
sheet_view_comment_relocate (sheet_view, cell->pos.col, cell->pos.row, o);
}
......
......@@ -12,7 +12,7 @@
#include "value.h"
#include "workbook.h"
#include "rendered-value.h"
#include "sheet-view.h" /* FIXME : Only for sheet_view_get_style_font */
#include "sheet-control-gui.h" /* FIXME : Only for sheet_view_get_style_font */
#include "parse-util.h"
static inline void
......
......@@ -71,7 +71,7 @@ col_row_foreach (ColRowCollection const *infos, int first, int last,
i = first;
while (i <= last) {
ColRowInfo * const * segment = COLROW_GET_SEGMENT (infos, i);
ColRowSegment const *segment = COLROW_GET_SEGMENT (infos, i);
int sub = COLROW_SUB_INDEX(i);
i += COLROW_SEGMENT_SIZE - sub;
......@@ -79,7 +79,7 @@ col_row_foreach (ColRowCollection const *infos, int first, int last,
continue;
for (; sub < COLROW_SEGMENT_SIZE; ++sub) {
ColRowInfo * info = segment[sub];
ColRowInfo *info = segment->info[sub];
if (info != NULL && (*callback)(info, user_data))
return TRUE;
}
......@@ -284,14 +284,13 @@ col_row_restore_sizes (Sheet *sheet, gboolean const is_cols,
/* Reset to the default */
if (sizes[i-first] == 0.) {
ColRowCollection *infos = is_cols ? &(sheet->cols) : &(sheet->rows);
ColRowInfo ***segment =
(ColRowInfo ***)&COLROW_GET_SEGMENT(infos, i);
ColRowSegment *segment = COLROW_GET_SEGMENT(infos, i);
int const sub = COLROW_SUB_INDEX (i);
ColRowInfo *cri = NULL;
if (*segment != NULL) {
cri = (*segment)[sub];
if (segment != NULL) {
cri = segment->info[sub];
if (cri != NULL) {
(*segment)[sub] = NULL;
segment->info[sub] = NULL;
g_free (cri);
}
}
......
......@@ -30,6 +30,21 @@ struct _ColRowCollection
GPtrArray * info;
};
/* The size, mask, and shift must be kept in sync */
#define COLROW_SEGMENT_SIZE 0x80
#define COLROW_SUB_INDEX(i) ((i) & 0x7f)
#define COLROW_SEGMENT_START(i) ((i) & ~(0x7f))
#define COLROW_SEGMENT_END(i) ((i) | 0x7f)
#define COLROW_SEGMENT_INDEX(i) ((i) >> 7)
#define COLROW_GET_SEGMENT(seg_array, i) \
(g_ptr_array_index ((seg_array)->info, COLROW_SEGMENT_INDEX(i)))
struct _ColRowSegment
{
ColRowInfo *info [COLROW_SEGMENT_SIZE];
int needs_respan [(COLROW_SEGMENT_SIZE/sizeof(int)) + 1]; /* be safe */
};
#define COL_INTERNAL_WIDTH(col) ((col)->size_pixels - ((col)->margin_b + (col)->margin_a + 1))
gboolean col_row_equal (ColRowInfo const *a, ColRowInfo const *b);
......
......@@ -4,82 +4,75 @@
* Authors:
* Jody Goldberg
* Miguel de Icaza (miguel@gnu.org)
*
*/
#include <config.h>
#include "gnumeric-type-util.h"
#include "workbook-control-priv.h"
#include "command-context-corba.h"
#include "gnumeric-util.h"
#define PARENT_TYPE command_context_get_type ()
#define CCG_CLASS(o) CMD_CONTEXT_CORBA_CLASS (GTK_OBJECT (o)->klass)
typedef struct {
CommandContext parent;
} CommandContextCorba;
WorkbookControl parent;
} WorkbookControlCorba;
typedef struct {
CommandContextClass parent_class;
} CommandContextCorbaClass;
WorkbookControlClass parent_class;
} WorkbookControlCorbaClass;
static void
ccc_error_plugin (WorkbookControl *context, char const * message)
wbcc_error_system (CommandContext *context, char const * message)
{
/* FIXME set exception */
}
static void
ccc_error_read (WorkbookControl *context, char const * message)
wbcc_error_plugin (CommandContext *context, char const * message)
{
/* FIXME set exception */
}
static void
ccc_error_save (WorkbookControl *context, char const * message)
wbcc_error_read (CommandContext *context, char const * message)
{
/* FIXME set exception */
}
static void
ccc_error_sys_err (WorkbookControl *context, char const * message)
wbcc_error_save (CommandContext *context, char const * message)
{
/* FIXME set exception */
}
static void
ccc_error_invalid (WorkbookControl *context, char const * message, char const *value)
wbcc_error_invalid (CommandContext *context, char const * message, char const *value)
{
/* FIXME set exception */
}
static void
ccc_set_progress (WorkbookControl *context, gfloat f)
wbcc_init_class (GtkObjectClass *object_class)
{
/* Ignore */
}
CommandContextClass *cc_class = (CommandContextClass *) object_class;
static void
ccc_init_class (GtkObjectClass *object_class)
{
WorkbookControlClass *cc_class = (WorkbookControlClass *) object_class;
cc_class->error_plugin = &ccc_error_plugin;
cc_class->error_read = &ccc_error_read;
cc_class->error_save = &ccc_error_save;
cc_class->error_sys_err = &ccc_error_sys_err;
cc_class->error_invalid = &ccc_error_invalid;
cc_class->set_progress = &ccc_set_progress;
cc_class->error.system = &wbcc_error_system;
cc_class->error.plugin = &wbcc_error_plugin;
cc_class->error.read = &wbcc_error_read;
cc_class->error.save = &wbcc_error_save;
cc_class->error.invalid = &wbcc_error_invalid;
}
GNUMERIC_MAKE_TYPE(command_context_corba, "WorkbookControlCorba", WorkbookControlCorba, ccc_init_class, NULL, PARENT_TYPE)
GNUMERIC_MAKE_TYPE(workbook_control_corba, "WorkbookControlCorba", WorkbookControlCorba,
wbcc_init_class, NULL, workbook_control_get_type ())
WorkbookControl *
CommandContext *
command_context_corba_new (void)
{
WorkbookControlCorba *ccg;
WorkbookControlCorba *wbcc;
ccg = gtk_type_new (command_context_corba_get_type ());
wbcc = gtk_type_new (workbook_control_corba_get_type ());
return COMMAND_CONTEXT (ccg);
return COMMAND_CONTEXT (wbcc);
}
2000-11-15 Jody Goldberg <jgoldberg@home.com>
* dialog-cell-sort.c (col_row_name) : merged from column_name, row_name.
Use the displayed text rather than the entered text.
(col_row_name_list) : merged from column_name_list, row_name_list.
2000-11-13 Jody Goldberg <jgoldberg@home.com>
* Release 0.58
......
......@@ -67,7 +67,7 @@ typedef struct {
static gchar *
column_name (Sheet *sheet, int row, int col, gboolean header)
col_row_name (Sheet *sheet, int col, int row, gboolean header, gboolean is_cols)
{
Cell *cell;
gchar *str = NULL;
......@@ -75,24 +75,9 @@ column_name (Sheet *sheet, int row, int col, gboolean header)
if (header) {
cell = sheet_cell_get (sheet, col, row);
if (cell)
str = cell_get_entered_text (cell);
else
str = cell_get_rendered_text (cell);
else if (is_cols)
str = strdup (col_name (col));
} else
str = strdup (col_name (col));
return str;
}
static gchar *
row_name (Sheet *sheet, int row, int col, gboolean header)
{
Cell *cell;
gchar *str = NULL;
if (header) {
cell = sheet_cell_get (sheet, col, row);
if (cell)
str = cell_get_entered_text (cell);
else
str = g_strdup_printf ("%d", row + 1);
} else
......@@ -101,32 +86,17 @@ row_name (Sheet *sheet, int row, int col, gboolean header)
}
static GList *
column_name_list (Sheet *sheet, int start_col, int end_col,
int row, gboolean header)
{
gchar *str;
GList *list;
int i;
list = NULL;
for (i = start_col; i <= end_col; i++) {
str = column_name (sheet, row, i, header);
list = g_list_append (list, (gpointer) str);
}
return list;
}
static GList *
row_name_list (Sheet *sheet, int start_row, int end_row,
int col, gboolean header)
col_row_name_list (Sheet *sheet, int start, int end,
int index, gboolean header, gboolean is_cols)
{
GList *list = NULL;
gchar *str;
GList *list;
int i;
list = NULL;
for (i = start_row; i <= end_row; i++) {
str = row_name (sheet, i, col, header);
for (i = start; i <= end; i++) {
str = is_cols
? col_row_name (sheet, i, index, header, TRUE)
: col_row_name (sheet, index, i, header, FALSE);
list = g_list_append (list, (gpointer) str);
}
return list;
......@@ -538,26 +508,26 @@ dialog_cell_sort (WorkbookControlGUI *wbcg, Sheet *sheet)
/* Set up the dialog information */
sort_flow.header = FALSE;
sort_flow.top = TRUE;
sort_flow.colnames_plain = column_name_list (sort_flow.sheet,
sort_flow.sel->start.col,
sort_flow.sel->end.col,
sort_flow.sel->start.row,
FALSE);
sort_flow.colnames_header = column_name_list (sort_flow.sheet,
sort_flow.sel->start.col,
sort_flow.sel->end.col,
sort_flow.sel->start.row,
TRUE);
sort_flow.rownames_plain = row_name_list (sort_flow.sheet,
sort_flow.sel->start.row,
sort_flow.sel->end.row,
sort_flow.sel->start.col,
FALSE);
sort_flow.rownames_header = row_name_list (sort_flow.sheet,
sort_flow.sel->start.row,
sort_flow.sel->end.row,
sort_flow.sel->start.col,
TRUE);
sort_flow.colnames_plain = col_row_name_list (sort_flow.sheet,
sort_flow.sel->start.col,
sort_flow.sel->end.col,
sort_flow.sel->start.row,
FALSE, TRUE);
sort_flow.colnames_header = col_row_name_list (sort_flow.sheet,
sort_flow.sel->start.col,
sort_flow.sel->end.col,
sort_flow.sel->start.row,
TRUE, TRUE);
sort_flow.rownames_plain = col_row_name_list (sort_flow.sheet,
sort_flow.sel->start.row,
sort_flow.sel->end.row,
sort_flow.sel->start.col,
FALSE, FALSE);
sort_flow.rownames_header = col_row_name_list (sort_flow.sheet,
sort_flow.sel->start.row,
sort_flow.sel->end.row,
sort_flow.sel->start.col,
TRUE, FALSE);
/* Get the dialog and check for errors */
gui = gnumeric_glade_xml_new (wbcg, GLADE_FILE);
......
......@@ -3,7 +3,7 @@
#include <bonobo/bonobo-embeddable.h>
#include "sheet-view.h"
#include "sheet-control-gui.h"
#define EMBEDDABLE_GRID_TYPE (embeddable_grid_get_type ())
#define EMBEDDABLE_GRID(o) (GTK_CHECK_CAST ((o), EMBEDDABLE_GRID_TYPE, EmbeddableGrid))
......@@ -61,7 +61,7 @@ typedef struct _GridView GridView;
struct _GridView {
BonoboView view;
SheetView *sheet_view;
SheetControlGUI *sheet_view;
EmbeddableGrid *embeddable;
};
......
......@@ -11,7 +11,7 @@
#include "item-cursor.h"
#include "item-edit.h"
#include "item-grid.h"
#include "sheet-view.h"
#include "sheet-control-gui.h"
#include "gnumeric-util.h"
#include "color.h"
#include "selection.h"
......@@ -44,7 +44,7 @@ gnumeric_sheet_destroy (GtkObject *object)
}
static GnumericSheet *
gnumeric_sheet_create (SheetView *sheet_view)
gnumeric_sheet_create (SheetControlGUI *sheet_view)
{
GnumericSheet *gsheet;
GnomeCanvas *canvas;
......@@ -303,7 +303,7 @@ start_cell_selection_at (GnumericSheet *gsheet, int col, int row)
gsheet->sel_cursor = ITEM_CURSOR (gnome_canvas_item_new (
group,
item_cursor_get_type (),
"SheetView", gsheet->sheet_view,
"SheetControlGUI", gsheet->sheet_view,
"Grid", gsheet->item_grid,
"Style", ITEM_CURSOR_ANTED, NULL));
item_cursor_set_spin_base (gsheet->sel_cursor, col, row);
......@@ -930,7 +930,7 @@ gnumeric_sheet_filenames_dropped (GtkWidget *widget,
}
GtkWidget *
gnumeric_sheet_new (SheetView *sheet_view, ItemBar *colbar, ItemBar *rowbar)
gnumeric_sheet_new (SheetControlGUI *sheet_view, ItemBar *colbar, ItemBar *rowbar)
{
GnomeCanvasItem *item;
GnumericSheet *gsheet;
......@@ -945,7 +945,7 @@ gnumeric_sheet_new (SheetView *sheet_view, ItemBar *colbar, ItemBar *rowbar)
static gint n_drag_types = sizeof (drag_types) / sizeof (drag_types [0]);
g_return_val_if_fail (sheet_view != NULL, NULL);
g_return_val_if_fail (IS_SHEET_VIEW (sheet_view), NULL);
g_return_val_if_fail (IS_SHEET_CONTROL_GUI (sheet_view), NULL);
g_return_val_if_fail (colbar != NULL, NULL);
g_return_val_if_fail (rowbar != NULL, NULL);
g_return_val_if_fail (IS_ITEM_BAR (colbar), NULL);
......@@ -970,14 +970,14 @@ gnumeric_sheet_new (SheetView *sheet_view, ItemBar *colbar, ItemBar *rowbar)
/* The grid */
item = gnome_canvas_item_new (gsheet_group,
item_grid_get_type (),
"ItemGrid::SheetView", sheet_view,
"ItemGrid::SheetControlGUI", sheet_view,
NULL);
gsheet->item_grid = ITEM_GRID (item);
/* The cursor */
item = gnome_canvas_item_new (gsheet_group,
item_cursor_get_type (),
"ItemCursor::SheetView", sheet_view,
"ItemCursor::SheetControlGUI", sheet_view,
"ItemCursor::Grid", gsheet->item_grid,
NULL);
gsheet->item_cursor = ITEM_CURSOR (item);
......
......@@ -14,7 +14,7 @@
struct _GnumericSheet {
GnomeCanvas canvas;
SheetView *sheet_view;
SheetControlGUI *sheet_view;
struct {
int first, last_full, last_visible;
......@@ -47,7 +47,7 @@ struct _GnumericSheet {
GtkType gnumeric_sheet_get_type (void);
GtkWidget *gnumeric_sheet_new (SheetView *sheet, ItemBar *colbar, ItemBar *rowbar);
GtkWidget *gnumeric_sheet_new (SheetControlGUI *sheet, ItemBar *colbar, ItemBar *rowbar);
void gnumeric_sheet_set_top_row (GnumericSheet *gsheet, int new_first_row);
void gnumeric_sheet_set_left_col (GnumericSheet *gsheet, int new_first_col);
void gnumeric_sheet_move_cursor (GnumericSheet *gsheet,
......
......@@ -11,7 +11,7 @@
#include "item-cursor.h"
#include "item-edit.h"
#include "item-grid.h"
#include "sheet-view.h"
#include "sheet-control-gui.h"
#include "gnumeric-util.h"
#include "color.h"
#include "selection.h"
......@@ -44,7 +44,7 @@ gnumeric_sheet_destroy (GtkObject *object)
}
static GnumericSheet *
gnumeric_sheet_create (SheetView *sheet_view)
gnumeric_sheet_create (SheetControlGUI *sheet_view)
{
GnumericSheet *gsheet;
GnomeCanvas *canvas;
......@@ -303,7 +303,7 @@ start_cell_selection_at (GnumericSheet *gsheet, int col, int row)
gsheet->sel_cursor = ITEM_CURSOR (gnome_canvas_item_new (
group,
item_cursor_get_type (),
"SheetView", gsheet->sheet_view,
"SheetControlGUI", gsheet->sheet_view,
"Grid", gsheet->item_grid,
"Style", ITEM_CURSOR_ANTED, NULL));
item_cursor_set_spin_base (gsheet->sel_cursor, col, row);
......@@ -930,7 +930,7 @@ gnumeric_sheet_filenames_dropped (GtkWidget *widget,
}
GtkWidget *
gnumeric_sheet_new (SheetView *sheet_view, ItemBar *colbar, ItemBar *rowbar)
gnumeric_sheet_new (SheetControlGUI *sheet_view, ItemBar *colbar, ItemBar *rowbar)
{
GnomeCanvasItem *item;
GnumericSheet *gsheet;
......@@ -945,7 +945,7 @@ gnumeric_sheet_new (SheetView *sheet_view, ItemBar *colbar, ItemBar *rowbar)
static gint n_drag_types = sizeof (drag_types) / sizeof (drag_types [0]);
g_return_val_if_fail (sheet_view != NULL, NULL);
g_return_val_if_fail (IS_SHEET_VIEW (sheet_view), NULL);
g_return_val_if_fail (IS_SHEET_CONTROL_GUI (sheet_view), NULL);
g_return_val_if_fail (colbar != NULL, NULL);
g_return_val_if_fail (rowbar != NULL, NULL);
g_return_val_if_fail (IS_ITEM_BAR (colbar), NULL);
......@@ -970,14 +970,14 @@ gnumeric_sheet_new (SheetView *sheet_view, ItemBar *colbar, ItemBar *rowbar)
/* The grid */
item = gnome_canvas_item_new (gsheet_group,
item_grid_get_type (),
"ItemGrid::SheetView", sheet_view,
"ItemGrid::SheetControlGUI", sheet_view,
NULL);
gsheet->item_grid = ITEM_GRID (item);
/* The cursor */
item = gnome_canvas_item_new (gsheet_group,