Commit affafc8a authored by Jon K Hellan's avatar Jon K Hellan Committed by Jon Kåre Hellan

Call gnumeric_sheet_make_visible only if sheet widget is realized.

2000-04-04  Jon K Hellan  <hellan@acm.org>

	* src/sheet-view.c (sheet_view_set_zoom_factor): Call
	gnumeric_sheet_make_visible only if sheet widget is realized.
	(sheet_view_make_edit_pos_visible): New function: Make cell at
	edit position visible.
	(sheet_view_size_allocate): Add call to
	sheet_view_make_edit_pos_visible.

	* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Add
	comment.

	* src/xml-io.c (xml_sheet_read): Read zoom into a local variable
	before calling sheet_set_zoom_factor. Otherwise,
	sheet_set_zoom_factor would assume that it had already initialized
	this factor.

	* src/workbook.c (change_zoom_in_current_sheet_cb): No longer call
	change_displayed_zoom_cb, sheet_set_zoom_factor will call it
	indirectly.

	* src/workbook.[ch] (workbook_class_init,
	workbook_focus_current_sheet, workbook_create_standard_toobar):
	Rename "sheet_changed" signal to "sheet_entered".  Remove
	"cell_changed" signal.
	(workbook_focus_current_sheet): Rename "sheet_changed" signal to
	"sheet_entered".
	(workbook_zoom_feedback_set): New function: Update zoom combo in
	toolbar when zoom changes.

	* src/sheet.c (sheet_update_zoom_controls): New function: Update
	zoom controls when zoom changes.
	(sheet_set_zoom_factor): Use it.
	(sheet_load_cell_val): Do not emit "cell_changed".

	* src/dialogs/dialog-cell-format.c (cb_fmt_dialog_dialog_apply):
	Call sheet_update_controls to update toolbar controls.

	* src/history.c (file_history_cmd): Remove pristine workbook when
	a new one is read in. For consistency with File/Open, File/Import
	and Bonobo File/History.

	* src/dialogs/dialog-workbook-attr.c
	(cb_attr_dialog_dialog_apply): Include workbook-view.h to get
	prototype for workbook_view_pref_visibility.

	* src/border.h (style_border_print): Remove bogus const in  prototype.
	Reported by Aron Griffis.
parent b7c58c38
2000-04-04 Jon K Hellan <hellan@acm.org>
* src/sheet-view.c (sheet_view_set_zoom_factor): Call
gnumeric_sheet_make_visible only if sheet widget is realized.
(sheet_view_make_edit_pos_visible): New function: Make the cell at
the edit position visible.
(sheet_view_size_allocate): Add call to
sheet_view_make_edit_pos_visible.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Add
comment.
* src/xml-io.c (xml_sheet_read): Read zoom into a local variable
before calling sheet_set_zoom_factor. Otherwise,
sheet_set_zoom_factor would assume that it had already initialized
this factor.
* src/workbook.c (change_zoom_in_current_sheet_cb): No longer call
change_displayed_zoom_cb, sheet_set_zoom_factor will call it
indirectly.
* src/workbook.[ch] (workbook_class_init,
workbook_focus_current_sheet, workbook_create_standard_toobar):
Rename "sheet_changed" signal to "sheet_entered". Remove
"cell_changed" signal.
(workbook_focus_current_sheet): Rename "sheet_changed" signal to
"sheet_entered".
(workbook_zoom_feedback_set): New function: Update zoom combo in
toolbar when zoom changes.
* src/sheet.c (sheet_update_zoom_controls): New function: Update
zoom controls when zoom changes.
(sheet_set_zoom_factor): Use it.
(sheet_load_cell_val): Do not emit "cell_changed".
* src/dialogs/dialog-cell-format.c (cb_fmt_dialog_dialog_apply):
Call sheet_update_controls to update toolbar controls.
* src/history.c (file_history_cmd): Remove pristine workbook when
a new one is read in. For consistency with File/Open, File/Import
and Bonobo File/History.
* src/dialogs/dialog-workbook-attr.c
(cb_attr_dialog_dialog_apply): Include workbook-view.h to get
prototype for workbook_view_pref_visibility.
* src/border.h (style_border_print): Remove bogus const in prototype.
Reported by Aron Griffis.
2000-04-02 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (entry_changed) : Call scan_for_range here.
......
2000-04-04 Jon K Hellan <hellan@acm.org>
* src/sheet-view.c (sheet_view_set_zoom_factor): Call
gnumeric_sheet_make_visible only if sheet widget is realized.
(sheet_view_make_edit_pos_visible): New function: Make the cell at
the edit position visible.
(sheet_view_size_allocate): Add call to
sheet_view_make_edit_pos_visible.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Add
comment.
* src/xml-io.c (xml_sheet_read): Read zoom into a local variable
before calling sheet_set_zoom_factor. Otherwise,
sheet_set_zoom_factor would assume that it had already initialized
this factor.
* src/workbook.c (change_zoom_in_current_sheet_cb): No longer call
change_displayed_zoom_cb, sheet_set_zoom_factor will call it
indirectly.
* src/workbook.[ch] (workbook_class_init,
workbook_focus_current_sheet, workbook_create_standard_toobar):
Rename "sheet_changed" signal to "sheet_entered". Remove
"cell_changed" signal.
(workbook_focus_current_sheet): Rename "sheet_changed" signal to
"sheet_entered".
(workbook_zoom_feedback_set): New function: Update zoom combo in
toolbar when zoom changes.
* src/sheet.c (sheet_update_zoom_controls): New function: Update
zoom controls when zoom changes.
(sheet_set_zoom_factor): Use it.
(sheet_load_cell_val): Do not emit "cell_changed".
* src/dialogs/dialog-cell-format.c (cb_fmt_dialog_dialog_apply):
Call sheet_update_controls to update toolbar controls.
* src/history.c (file_history_cmd): Remove pristine workbook when
a new one is read in. For consistency with File/Open, File/Import
and Bonobo File/History.
* src/dialogs/dialog-workbook-attr.c
(cb_attr_dialog_dialog_apply): Include workbook-view.h to get
prototype for workbook_view_pref_visibility.
* src/border.h (style_border_print): Remove bogus const in prototype.
Reported by Aron Griffis.
2000-04-02 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (entry_changed) : Call scan_for_range here.
......
2000-04-04 Jon K Hellan <hellan@acm.org>
* src/sheet-view.c (sheet_view_set_zoom_factor): Call
gnumeric_sheet_make_visible only if sheet widget is realized.
(sheet_view_make_edit_pos_visible): New function: Make the cell at
the edit position visible.
(sheet_view_size_allocate): Add call to
sheet_view_make_edit_pos_visible.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Add
comment.
* src/xml-io.c (xml_sheet_read): Read zoom into a local variable
before calling sheet_set_zoom_factor. Otherwise,
sheet_set_zoom_factor would assume that it had already initialized
this factor.
* src/workbook.c (change_zoom_in_current_sheet_cb): No longer call
change_displayed_zoom_cb, sheet_set_zoom_factor will call it
indirectly.
* src/workbook.[ch] (workbook_class_init,
workbook_focus_current_sheet, workbook_create_standard_toobar):
Rename "sheet_changed" signal to "sheet_entered". Remove
"cell_changed" signal.
(workbook_focus_current_sheet): Rename "sheet_changed" signal to
"sheet_entered".
(workbook_zoom_feedback_set): New function: Update zoom combo in
toolbar when zoom changes.
* src/sheet.c (sheet_update_zoom_controls): New function: Update
zoom controls when zoom changes.
(sheet_set_zoom_factor): Use it.
(sheet_load_cell_val): Do not emit "cell_changed".
* src/dialogs/dialog-cell-format.c (cb_fmt_dialog_dialog_apply):
Call sheet_update_controls to update toolbar controls.
* src/history.c (file_history_cmd): Remove pristine workbook when
a new one is read in. For consistency with File/Open, File/Import
and Bonobo File/History.
* src/dialogs/dialog-workbook-attr.c
(cb_attr_dialog_dialog_apply): Include workbook-view.h to get
prototype for workbook_view_pref_visibility.
* src/border.h (style_border_print): Remove bogus const in prototype.
Reported by Aron Griffis.
2000-04-02 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (entry_changed) : Call scan_for_range here.
......
2000-04-04 Jon K Hellan <hellan@acm.org>
* src/sheet-view.c (sheet_view_set_zoom_factor): Call
gnumeric_sheet_make_visible only if sheet widget is realized.
(sheet_view_make_edit_pos_visible): New function: Make the cell at
the edit position visible.
(sheet_view_size_allocate): Add call to
sheet_view_make_edit_pos_visible.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Add
comment.
* src/xml-io.c (xml_sheet_read): Read zoom into a local variable
before calling sheet_set_zoom_factor. Otherwise,
sheet_set_zoom_factor would assume that it had already initialized
this factor.
* src/workbook.c (change_zoom_in_current_sheet_cb): No longer call
change_displayed_zoom_cb, sheet_set_zoom_factor will call it
indirectly.
* src/workbook.[ch] (workbook_class_init,
workbook_focus_current_sheet, workbook_create_standard_toobar):
Rename "sheet_changed" signal to "sheet_entered". Remove
"cell_changed" signal.
(workbook_focus_current_sheet): Rename "sheet_changed" signal to
"sheet_entered".
(workbook_zoom_feedback_set): New function: Update zoom combo in
toolbar when zoom changes.
* src/sheet.c (sheet_update_zoom_controls): New function: Update
zoom controls when zoom changes.
(sheet_set_zoom_factor): Use it.
(sheet_load_cell_val): Do not emit "cell_changed".
* src/dialogs/dialog-cell-format.c (cb_fmt_dialog_dialog_apply):
Call sheet_update_controls to update toolbar controls.
* src/history.c (file_history_cmd): Remove pristine workbook when
a new one is read in. For consistency with File/Open, File/Import
and Bonobo File/History.
* src/dialogs/dialog-workbook-attr.c
(cb_attr_dialog_dialog_apply): Include workbook-view.h to get
prototype for workbook_view_pref_visibility.
* src/border.h (style_border_print): Remove bogus const in prototype.
Reported by Aron Griffis.
2000-04-02 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (entry_changed) : Call scan_for_range here.
......
2000-04-04 Jon K Hellan <hellan@acm.org>
* src/sheet-view.c (sheet_view_set_zoom_factor): Call
gnumeric_sheet_make_visible only if sheet widget is realized.
(sheet_view_make_edit_pos_visible): New function: Make the cell at
the edit position visible.
(sheet_view_size_allocate): Add call to
sheet_view_make_edit_pos_visible.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Add
comment.
* src/xml-io.c (xml_sheet_read): Read zoom into a local variable
before calling sheet_set_zoom_factor. Otherwise,
sheet_set_zoom_factor would assume that it had already initialized
this factor.
* src/workbook.c (change_zoom_in_current_sheet_cb): No longer call
change_displayed_zoom_cb, sheet_set_zoom_factor will call it
indirectly.
* src/workbook.[ch] (workbook_class_init,
workbook_focus_current_sheet, workbook_create_standard_toobar):
Rename "sheet_changed" signal to "sheet_entered". Remove
"cell_changed" signal.
(workbook_focus_current_sheet): Rename "sheet_changed" signal to
"sheet_entered".
(workbook_zoom_feedback_set): New function: Update zoom combo in
toolbar when zoom changes.
* src/sheet.c (sheet_update_zoom_controls): New function: Update
zoom controls when zoom changes.
(sheet_set_zoom_factor): Use it.
(sheet_load_cell_val): Do not emit "cell_changed".
* src/dialogs/dialog-cell-format.c (cb_fmt_dialog_dialog_apply):
Call sheet_update_controls to update toolbar controls.
* src/history.c (file_history_cmd): Remove pristine workbook when
a new one is read in. For consistency with File/Open, File/Import
and Bonobo File/History.
* src/dialogs/dialog-workbook-attr.c
(cb_attr_dialog_dialog_apply): Include workbook-view.h to get
prototype for workbook_view_pref_visibility.
* src/border.h (style_border_print): Remove bogus const in prototype.
Reported by Aron Griffis.
2000-04-02 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (entry_changed) : Call scan_for_range here.
......
2000-04-04 Jon K Hellan <hellan@acm.org>
* src/sheet-view.c (sheet_view_set_zoom_factor): Call
gnumeric_sheet_make_visible only if sheet widget is realized.
(sheet_view_make_edit_pos_visible): New function: Make the cell at
the edit position visible.
(sheet_view_size_allocate): Add call to
sheet_view_make_edit_pos_visible.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Add
comment.
* src/xml-io.c (xml_sheet_read): Read zoom into a local variable
before calling sheet_set_zoom_factor. Otherwise,
sheet_set_zoom_factor would assume that it had already initialized
this factor.
* src/workbook.c (change_zoom_in_current_sheet_cb): No longer call
change_displayed_zoom_cb, sheet_set_zoom_factor will call it
indirectly.
* src/workbook.[ch] (workbook_class_init,
workbook_focus_current_sheet, workbook_create_standard_toobar):
Rename "sheet_changed" signal to "sheet_entered". Remove
"cell_changed" signal.
(workbook_focus_current_sheet): Rename "sheet_changed" signal to
"sheet_entered".
(workbook_zoom_feedback_set): New function: Update zoom combo in
toolbar when zoom changes.
* src/sheet.c (sheet_update_zoom_controls): New function: Update
zoom controls when zoom changes.
(sheet_set_zoom_factor): Use it.
(sheet_load_cell_val): Do not emit "cell_changed".
* src/dialogs/dialog-cell-format.c (cb_fmt_dialog_dialog_apply):
Call sheet_update_controls to update toolbar controls.
* src/history.c (file_history_cmd): Remove pristine workbook when
a new one is read in. For consistency with File/Open, File/Import
and Bonobo File/History.
* src/dialogs/dialog-workbook-attr.c
(cb_attr_dialog_dialog_apply): Include workbook-view.h to get
prototype for workbook_view_pref_visibility.
* src/border.h (style_border_print): Remove bogus const in prototype.
Reported by Aron Griffis.
2000-04-02 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (entry_changed) : Call scan_for_range here.
......
2000-04-04 Jon K Hellan <hellan@acm.org>
* src/sheet-view.c (sheet_view_set_zoom_factor): Call
gnumeric_sheet_make_visible only if sheet widget is realized.
(sheet_view_make_edit_pos_visible): New function: Make the cell at
the edit position visible.
(sheet_view_size_allocate): Add call to
sheet_view_make_edit_pos_visible.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Add
comment.
* src/xml-io.c (xml_sheet_read): Read zoom into a local variable
before calling sheet_set_zoom_factor. Otherwise,
sheet_set_zoom_factor would assume that it had already initialized
this factor.
* src/workbook.c (change_zoom_in_current_sheet_cb): No longer call
change_displayed_zoom_cb, sheet_set_zoom_factor will call it
indirectly.
* src/workbook.[ch] (workbook_class_init,
workbook_focus_current_sheet, workbook_create_standard_toobar):
Rename "sheet_changed" signal to "sheet_entered". Remove
"cell_changed" signal.
(workbook_focus_current_sheet): Rename "sheet_changed" signal to
"sheet_entered".
(workbook_zoom_feedback_set): New function: Update zoom combo in
toolbar when zoom changes.
* src/sheet.c (sheet_update_zoom_controls): New function: Update
zoom controls when zoom changes.
(sheet_set_zoom_factor): Use it.
(sheet_load_cell_val): Do not emit "cell_changed".
* src/dialogs/dialog-cell-format.c (cb_fmt_dialog_dialog_apply):
Call sheet_update_controls to update toolbar controls.
* src/history.c (file_history_cmd): Remove pristine workbook when
a new one is read in. For consistency with File/Open, File/Import
and Bonobo File/History.
* src/dialogs/dialog-workbook-attr.c
(cb_attr_dialog_dialog_apply): Include workbook-view.h to get
prototype for workbook_view_pref_visibility.
* src/border.h (style_border_print): Remove bogus const in prototype.
Reported by Aron Griffis.
2000-04-02 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (entry_changed) : Call scan_for_range here.
......
......@@ -58,7 +58,7 @@ GdkGC *style_border_get_gc (MStyleBorder *border, GdkWindow *window);
void style_border_draw (MStyleBorder const * const st, MStyleElementType const t,
GdkDrawable * const drawable,
int const x1, int const y1, int const x2, int const y2,
int x1, int y1, int x2, int y2,
MStyleBorder const * const extend_begin,
MStyleBorder const * const extend_end);
void style_border_print (MStyleBorder const * const border, MStyleElementType const t,
......
......@@ -1905,6 +1905,7 @@ cb_fmt_dialog_dialog_apply (GtkObject *w, int page, FormatState *state)
cell_thaw_redraws ();
mstyle_unref (state->result);
sheet_update_controls (state->sheet);
/* Get a fresh style to accumulate results in */
state->result = mstyle_new ();
......
......@@ -24,6 +24,7 @@
#include "mstyle.h"
#include "application.h"
#include "workbook.h"
#include "workbook-view.h"
#include "commands.h"
#define GLADE_FILE "workbook-attr.glade"
......
......@@ -1201,6 +1201,20 @@ gnumeric_sheet_set_left_col (GnumericSheet *gsheet, int new_first_col)
}
}
/*
* gnumeric_sheet_make_cell_visible
* @gsheet sheet widget
* @col column
* @row row
* @force_scroll force a scroll
*
* Ensure that cell (col, row) is visible.
* Sheet is scrolled if cell is outside viewport.
*
* Avoid calling this before the canvas is realized:
* We do not know the visible area, and would unconditionally scroll the cell
* to the top left of the viewport.
*/
void
gnumeric_sheet_make_cell_visible (GnumericSheet *gsheet, int col, int row,
gboolean const force_scroll)
......
......@@ -1201,6 +1201,20 @@ gnumeric_sheet_set_left_col (GnumericSheet *gsheet, int new_first_col)
}
}
/*
* gnumeric_sheet_make_cell_visible
* @gsheet sheet widget
* @col column
* @row row
* @force_scroll force a scroll
*
* Ensure that cell (col, row) is visible.
* Sheet is scrolled if cell is outside viewport.
*
* Avoid calling this before the canvas is realized:
* We do not know the visible area, and would unconditionally scroll the cell
* to the top left of the viewport.
*/
void
gnumeric_sheet_make_cell_visible (GnumericSheet *gsheet, int col, int row,
gboolean const force_scroll)
......
......@@ -27,8 +27,12 @@ file_history_cmd (GtkWidget *widget, Workbook *wb)
new_wb = workbook_read (workbook_command_context_gui (wb), filename);
if (new_wb != NULL)
if (new_wb != NULL) {
gtk_widget_show (new_wb->toplevel);
if (workbook_is_pristine (wb))
gtk_object_unref (GTK_OBJECT (wb));
}
}
#else
......
......@@ -241,11 +241,13 @@ sheet_view_set_zoom_factor (SheetView *sheet_view, double factor)
gsheet->row_offset.first =
sheet_row_get_distance_pixels (sheet_view->sheet, 0, gsheet->row.first);
/* Ensure that the current cell remains visible when we zoom */
gnumeric_sheet_make_cell_visible (gsheet,
sheet_view->sheet->cursor.edit_pos.col,
sheet_view->sheet->cursor.edit_pos.row,
TRUE);
if (GTK_WIDGET_REALIZED (gsheet))
/* Ensure that the current cell remains visible when we zoom */
gnumeric_sheet_make_cell_visible
(gsheet,
sheet_view->sheet->cursor.edit_pos.col,
sheet_view->sheet->cursor.edit_pos.row,
TRUE);
/* Repsition the cursor */
item_cursor_reposition (gsheet->item_cursor);
......@@ -318,9 +320,32 @@ sheet_view_scrollbar_config (SheetView const *sheet_view)
gtk_adjustment_changed (ha);
}
/*
* sheet_view_make_edit_pos_visible
* @sheet_view Sheet view
*
* Make the cell at the edit position visible.
*
* To be called from the "size_allocate" signal handler when the geometry of a
* new sheet view has been configured.
*/
static void
sheet_view_make_edit_pos_visible (SheetView const *sheet_view)
{
GnumericSheet *gsheet = GNUMERIC_SHEET (sheet_view->sheet_view);
gnumeric_sheet_make_cell_visible
(gsheet,
sheet_view->sheet->cursor.edit_pos.col,
sheet_view->sheet->cursor.edit_pos.row,
TRUE);
}
static void
sheet_view_size_allocate (GtkWidget *widget, GtkAllocation *alloc, SheetView *sheet_view)
{
sheet_view_make_edit_pos_visible (sheet_view);
sheet_view_scrollbar_config (sheet_view);
}
......
......@@ -241,11 +241,13 @@ sheet_view_set_zoom_factor (SheetView *sheet_view, double factor)
gsheet->row_offset.first =
sheet_row_get_distance_pixels (sheet_view->sheet, 0, gsheet->row.first);
/* Ensure that the current cell remains visible when we zoom */
gnumeric_sheet_make_cell_visible (gsheet,
sheet_view->sheet->cursor.edit_pos.col,
sheet_view->sheet->cursor.edit_pos.row,
TRUE);
if (GTK_WIDGET_REALIZED (gsheet))
/* Ensure that the current cell remains visible when we zoom */
gnumeric_sheet_make_cell_visible
(gsheet,
sheet_view->sheet->cursor.edit_pos.col,
sheet_view->sheet->cursor.edit_pos.row,
TRUE);
/* Repsition the cursor */
item_cursor_reposition (gsheet->item_cursor);
......@@ -318,9 +320,32 @@ sheet_view_scrollbar_config (SheetView const *sheet_view)
gtk_adjustment_changed (ha);
}
/*
* sheet_view_make_edit_pos_visible
* @sheet_view Sheet view
*
* Make the cell at the edit position visible.
*
* To be called from the "size_allocate" signal handler when the geometry of a
* new sheet view has been configured.
*/
static void
sheet_view_make_edit_pos_visible (SheetView const *sheet_view)
{
GnumericSheet *gsheet = GNUMERIC_SHEET (sheet_view->sheet_view);
gnumeric_sheet_make_cell_visible
(gsheet,
sheet_view->sheet->cursor.edit_pos.col,
sheet_view->sheet->cursor.edit_pos.row,
TRUE);
}
static void
sheet_view_size_allocate (GtkWidget *widget, GtkAllocation *alloc, SheetView *sheet_view)
{
sheet_view_make_edit_pos_visible (sheet_view);
sheet_view_scrollbar_config (sheet_view);
}
......
......@@ -43,6 +43,8 @@
#define COLROW_GET_SEGMENT(seg_array, i) \
(g_ptr_array_index ((seg_array)->info, COLROW_SEGMENT_INDEX(i)))
static void sheet_update_zoom_controls (Sheet *sheet);
void
sheet_adjust_preferences (Sheet const *sheet)
{
......@@ -324,6 +326,8 @@ sheet_set_zoom_factor (Sheet *sheet, double const f)
*/
g_hash_table_foreach (sheet->cell_hash,
cb_cell_recalc_dimension, NULL);
sheet_update_zoom_controls (sheet);
}
ColRowInfo *
......@@ -943,12 +947,6 @@ sheet_load_cell_val (Sheet *sheet)
gtk_entry_set_text (entry, text);
/* FIXME : Nothing uses this ???? */
gtk_signal_emit_by_name (GTK_OBJECT (sheet->workbook), "cell_changed",
sheet, text,
sheet->cursor.edit_pos.col,
sheet->cursor.edit_pos.row);
g_free (text);
}
......@@ -973,6 +971,24 @@ sheet_update_controls (Sheet *sheet)
mstyle_unref (mstyle);
}
/**
* sheet_update_zoom_controls:
*
* This routine is run every time the zoom has changed. It checks
* what the status of various toolbar feedback controls should be
*
* FIXME: This will at some point become a sheet view function.
*/
static void
sheet_update_zoom_controls (Sheet *sheet)
{
g_return_if_fail (sheet != NULL);
if (sheet == sheet->workbook->current_sheet)
workbook_zoom_feedback_set (sheet->workbook,
sheet->last_zoom_factor_used);
}
int
sheet_col_selection_type (Sheet const *sheet, int col)
{
......
......@@ -58,7 +58,7 @@ GdkGC *style_border_get_gc (MStyleBorder *border, GdkWindow *window);
void style_border_draw (MStyleBorder const * const st, MStyleElementType const t,
GdkDrawable * const drawable,
int const x1, int const y1, int const x2, int const y2,
int x1, int y1, int x2, int y2,
MStyleBorder const * const extend_begin,
MStyleBorder const * const extend_end);
void style_border_print (MStyleBorder const * const border, MStyleElementType const t,
......
......@@ -138,9 +138,7 @@ typedef struct {
#endif
/* Signals */
void (*sheet_changed) (Sheet *sheet);
void (*cell_changed) (Sheet *sheet, char *contents,
int col, int row);
void (*sheet_entered) (Sheet *sheet);
} WorkbookClass;
GtkType workbook_get_type (void);
......@@ -220,6 +218,7 @@ typedef enum {
} WorkbookFeedbackType;
void workbook_feedback_set (Workbook *, MStyle *style);
void workbook_zoom_feedback_set (Workbook *, double zoom_factor);
/*
* Hooks for CORBA bootstrap: they create the
......
......@@ -69,13 +69,13 @@ static WORKBOOK_PARENT_CLASS *workbook_parent_class;
/* Workbook signals */
enum {
SHEET_CHANGED,
CELL_CHANGED,
SHEET_ENTERED,
CELL_ENTERED,
LAST_SIGNAL
};
static gint workbook_signals [LAST_SIGNAL] = {
0, /* SHEET_CHANGED, CELL_CHANGED */
0, /* SHEET_ENTERED, CELL_ENTERED */
};
static void workbook_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
......@@ -1297,7 +1297,6 @@ static GnomeUIInfo workbook_menu_format_sheet [] = {
GNOMEUIINFO_ITEM_NONE(N_("Re-_Order Sheets"),
NULL,