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

typo.


2001-05-09  Jody Goldberg <jgoldberg@home.com>

	* src/item-cursor.c (cb_move_cursor) : typo.

	* src/cmd-edit.c (cmd_shift_cols) : correct bound if shifting right.
	(cmd_shift_rows) : correct bound if shifting down.

	* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible) : If the
	  first == last then it is likely we are uninitialized and we can
	  start the search from the first the target may be contained in the
	  current region without scrolling.

	* src/sheet-control-gui.c (scg_construct) : resize is now called when
	  attached and the zoom scg_set_zoom_factor is set.
	(scg_set_zoom_factor) : resize.

	* src/workbook-control.c (workbook_control_init_state) : cut-n-paste-o.
parent 14c66875
......@@ -8,8 +8,6 @@ release, and longer term bugs.
Release Critical
----------------
- col/row resize when zoomed
- Performance regression: navigating and (say) selecting an area in,
for example, statfuns.xls takes an embarrassingly long time.
......@@ -27,6 +25,8 @@ Long term breakage
- defining file patterns in plugin spec overrides 'has_probe' flag silently.
(Zbigniew is working on it)
- It is possible to navigate to hidden cols/rows at the start of the sheet.
Names :
: Fix XL named expr import for sheet local names
* externsheet for biff7 type=3
......
2001-05-09 Jody Goldberg <jgoldberg@home.com>
* src/item-cursor.c (cb_move_cursor) : typo.
* src/cmd-edit.c (cmd_shift_cols) : correct bound if shifting right.
(cmd_shift_rows) : correct bound if shifting down.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible) : If the
first == last then it is likely we are uninitialized and we can
start the search from the first the target may be contained in the
current region without scrolling.
* src/sheet-control-gui.c (scg_construct) : resize is now called when
attached and the zoom scg_set_zoom_factor is set.
(scg_set_zoom_factor) : resize.
* src/workbook-control.c (workbook_control_init_state) : cut-n-paste-o.
2001-05-08 Jody Goldberg <jgoldberg@home.com>
* src/selection.c (sheet_selection_set_internal) : split this out into.
......
2001-05-09 Jody Goldberg <jgoldberg@home.com>
* src/item-cursor.c (cb_move_cursor) : typo.
* src/cmd-edit.c (cmd_shift_cols) : correct bound if shifting right.
(cmd_shift_rows) : correct bound if shifting down.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible) : If the
first == last then it is likely we are uninitialized and we can
start the search from the first the target may be contained in the
current region without scrolling.
* src/sheet-control-gui.c (scg_construct) : resize is now called when
attached and the zoom scg_set_zoom_factor is set.
(scg_set_zoom_factor) : resize.
* src/workbook-control.c (workbook_control_init_state) : cut-n-paste-o.
2001-05-08 Jody Goldberg <jgoldberg@home.com>
* src/selection.c (sheet_selection_set_internal) : split this out into.
......
2001-05-09 Jody Goldberg <jgoldberg@home.com>
* src/item-cursor.c (cb_move_cursor) : typo.
* src/cmd-edit.c (cmd_shift_cols) : correct bound if shifting right.
(cmd_shift_rows) : correct bound if shifting down.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible) : If the
first == last then it is likely we are uninitialized and we can
start the search from the first the target may be contained in the
current region without scrolling.
* src/sheet-control-gui.c (scg_construct) : resize is now called when
attached and the zoom scg_set_zoom_factor is set.
(scg_set_zoom_factor) : resize.
* src/workbook-control.c (workbook_control_init_state) : cut-n-paste-o.
2001-05-08 Jody Goldberg <jgoldberg@home.com>
* src/selection.c (sheet_selection_set_internal) : split this out into.
......
2001-05-09 Jody Goldberg <jgoldberg@home.com>
* src/item-cursor.c (cb_move_cursor) : typo.
* src/cmd-edit.c (cmd_shift_cols) : correct bound if shifting right.
(cmd_shift_rows) : correct bound if shifting down.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible) : If the
first == last then it is likely we are uninitialized and we can
start the search from the first the target may be contained in the
current region without scrolling.
* src/sheet-control-gui.c (scg_construct) : resize is now called when
attached and the zoom scg_set_zoom_factor is set.
(scg_set_zoom_factor) : resize.
* src/workbook-control.c (workbook_control_init_state) : cut-n-paste-o.
2001-05-08 Jody Goldberg <jgoldberg@home.com>
* src/selection.c (sheet_selection_set_internal) : split this out into.
......
2001-05-09 Jody Goldberg <jgoldberg@home.com>
* src/item-cursor.c (cb_move_cursor) : typo.
* src/cmd-edit.c (cmd_shift_cols) : correct bound if shifting right.
(cmd_shift_rows) : correct bound if shifting down.
* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible) : If the
first == last then it is likely we are uninitialized and we can
start the search from the first the target may be contained in the
current region without scrolling.
* src/sheet-control-gui.c (scg_construct) : resize is now called when
attached and the zoom scg_set_zoom_factor is set.
(scg_set_zoom_factor) : resize.
* src/workbook-control.c (workbook_control_init_state) : cut-n-paste-o.
2001-05-08 Jody Goldberg <jgoldberg@home.com>
* src/selection.c (sheet_selection_set_internal) : split this out into.
......
......@@ -394,6 +394,8 @@ cmd_shift_rows (WorkbookControl *wbc, Sheet *sheet,
rinfo.origin.start.col = col;
rinfo.origin.end.row = end_row;
rinfo.origin.end.col = SHEET_MAX_COLS-1;
if (count > 0)
rinfo.origin.end.col -= count;
desc = (start_row != end_row)
? g_strdup_printf (_("Shift rows %d:%d"), start_row+1, end_row+1)
......@@ -429,10 +431,11 @@ cmd_shift_cols (WorkbookControl *wbc, Sheet *sheet,
rinfo.origin.start.row = row;
rinfo.origin.end.col = end_col;
rinfo.origin.end.row = SHEET_MAX_ROWS-1;
if (count > 0)
rinfo.origin.end.row -= count;
desc = (start_col != end_col)
? g_strdup_printf (_("Shift columns %s"), cols_name (start_col, end_col))
: g_strdup_printf (_("Shift column %s"), col_name (start_col));
cmd_paste_cut (wbc, &rinfo, FALSE, desc);
}
......@@ -1002,9 +1002,10 @@ gnumeric_sheet_make_cell_visible (GnumericSheet *gsheet, int col, int row,
new_first_col = col;
} else if (col > gsheet->col.last_full) {
int width = GTK_WIDGET (canvas)->allocation.width;
int first_col;
int first_col = (gsheet->col.last_visible == gsheet->col.first)
? gsheet->col.first : col;
for (first_col = col; first_col > 0; --first_col) {
for (; first_col > 0; --first_col) {
ColRowInfo const * const ci = sheet_col_get_info (sheet, first_col);
if (ci->visible) {
width -= ci->size_pixels;
......@@ -1021,9 +1022,10 @@ gnumeric_sheet_make_cell_visible (GnumericSheet *gsheet, int col, int row,
new_first_row = row;
} else if (row > gsheet->row.last_full) {
int height = GTK_WIDGET (canvas)->allocation.height;
int first_row;
int first_row = (gsheet->row.last_visible == gsheet->row.first)
? gsheet->row.first : row;
for (first_row = row; first_row > 0; --first_row) {
for (; first_row > 0; --first_row) {
ColRowInfo const * const ri = sheet_row_get_info (sheet, first_row);
if (ri->visible) {
height -= ri->size_pixels;
......
......@@ -1002,9 +1002,10 @@ gnumeric_sheet_make_cell_visible (GnumericSheet *gsheet, int col, int row,
new_first_col = col;
} else if (col > gsheet->col.last_full) {
int width = GTK_WIDGET (canvas)->allocation.width;
int first_col;
int first_col = (gsheet->col.last_visible == gsheet->col.first)
? gsheet->col.first : col;
for (first_col = col; first_col > 0; --first_col) {
for (; first_col > 0; --first_col) {
ColRowInfo const * const ci = sheet_col_get_info (sheet, first_col);
if (ci->visible) {
width -= ci->size_pixels;
......@@ -1021,9 +1022,10 @@ gnumeric_sheet_make_cell_visible (GnumericSheet *gsheet, int col, int row,
new_first_row = row;
} else if (row > gsheet->row.last_full) {
int height = GTK_WIDGET (canvas)->allocation.height;
int first_row;
int first_row = (gsheet->row.last_visible == gsheet->row.first)
? gsheet->row.first : row;
for (first_row = row; first_row > 0; --first_row) {
for (; first_row > 0; --first_row) {
ColRowInfo const * const ri = sheet_row_get_info (sheet, first_row);
if (ri->visible) {
height -= ri->size_pixels;
......
......@@ -1063,16 +1063,15 @@ cb_move_cursor (SheetControlGUI *scg, int col, int row, gpointer user_data)
corner.row = SHEET_MAX_ROWS - h - 1;
#if 0
/*
* Leave this disabled until GtkLayout correctly handles
* Windows with SaveUnder set. (Speak to quartic for details).
/* Leave this disabled until GtkLayout correctly handles
* Windows with SaveUnder set. (Speak to federico for details).
*/
item_cursor_tip_setlabel (item_cursor);
#endif
/* Make target cell visible, and adjust the cursor size */
item_cursor_set_bounds_visibly (item_cursor, col, row, &corner,
corner.row + w, corner.row + h);
corner.col + w, corner.row + h);
return FALSE;
}
......
......@@ -752,7 +752,7 @@ item_grid_button_1 (SheetControlGUI *scg, GdkEventButton *event,
if (scg->rangesel.active) {
ig->selecting = ITEM_GRID_SELECTING_FORMULA_RANGE;
if (event->state & GDK_SHIFT_MASK)
scg_rangesel_cursor_extend (scg, col, row);
scg_rangesel_extend_to (scg, col, row);
else
scg_rangesel_cursor_bounds (scg, col, row, col, row);
gnome_canvas_item_grab (item,
......@@ -842,7 +842,7 @@ cb_extend_cell_range (SheetControlGUI *scg, int col, int row, gpointer ignored)
static gboolean
cb_extend_expr_range (SheetControlGUI *scg, int col, int row, gpointer ignored)
{
scg_rangesel_cursor_extend (scg, col, row);
scg_rangesel_extend_to (scg, col, row);
return TRUE;
}
......@@ -938,7 +938,7 @@ item_grid_event (GnomeCanvasItem *item, GdkEvent *event)
return 1;
if (ig->selecting == ITEM_GRID_SELECTING_FORMULA_RANGE){
scg_rangesel_cursor_extend (ig->scg, col, row);
scg_rangesel_extend_to (ig->scg, col, row);
return 1;
}
......
......@@ -14,6 +14,7 @@
#include "item-debug.h"
#include "gnumeric-sheet.h"
#include "sheet.h"
#include "sheet-merge.h"
#include "workbook.h"
#include "workbook-view.h"
#include "workbook-edit.h"
......@@ -197,7 +198,7 @@ scg_update_cursor_pos (SheetControlGUI *scg)
/**
* scg_resize :
*
* @scg :
*/
void
scg_resize (SheetControlGUI *scg)
......@@ -430,12 +431,12 @@ scg_colrow_select (SheetControlGUI *scg, gboolean is_cols,
if (modifiers & GDK_SHIFT_MASK) {
if (is_cols) {
if (rangesel)
scg_rangesel_cursor_extend (scg, index, -1);
scg_rangesel_extend_to (scg, index, -1);
else
sheet_selection_extend_to (sheet, index, -1);
} else {
if (rangesel)
scg_rangesel_cursor_extend (scg, -1, index);
scg_rangesel_extend_to (scg, -1, index);
else
sheet_selection_extend_to (sheet, -1, index);
}
......@@ -618,7 +619,6 @@ scg_construct (SheetControlGUI *scg)
while (i-- > 0)
scg->control_points[i] = NULL;
scg_resize (scg);
scg_ant (scg);
}
......@@ -2195,7 +2195,7 @@ scg_cursor_move_to (SheetControlGUI *scg, int col, int row,
}
void
scg_rangesel_cursor_extend (SheetControlGUI *scg, int col, int row)
scg_rangesel_extend_to (SheetControlGUI *scg, int col, int row)
{
int base_col, base_row;
......
......@@ -129,7 +129,7 @@ void scg_stop_editing (SheetControlGUI *scg);
gboolean scg_rangesel_possible (SheetControlGUI const *scg);
void scg_rangesel_start (SheetControlGUI *scg, int col, int row);
void scg_rangesel_stop (SheetControlGUI *scg, gboolean clear_str);
void scg_rangesel_cursor_extend (SheetControlGUI *scg, int col, int row);
void scg_rangesel_extend_to (SheetControlGUI *scg, int col, int row);
void scg_rangesel_cursor_bounds (SheetControlGUI *scg,
int base_col, int base_row,
int move_col, int move_row);
......
......@@ -547,6 +547,7 @@ wbcg_sheet_add (WorkbookControl *wbc, Sheet *sheet)
for (ptr = sheet->sheet_objects; ptr != NULL ; ptr = ptr->next)
sheet_object_new_view (ptr->data, scg);
scg_adjust_preferences (scg);
scg_set_zoom_factor (scg);
}
static void
......
......@@ -246,6 +246,6 @@ workbook_control_init_state (WorkbookControl *wbc)
g_list_free (sheets);
wbc_class = WBC_CLASS (wbc);
if (wbc_class != NULL && wbc_class->control_new != NULL)
if (wbc_class != NULL && wbc_class->init_state != NULL)
wbc_class->init_state (wbc);
}
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