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

Focus current sheet also to kill any F2 editing.

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

	* src/sheet.c (sheet_accept_pending_input): Focus current sheet
	also to kill any F2 editing.

	* configure.in (bonobo): Require Bonobo 0.5

	* src/gnumeric-sheet.c (gnumeric_sheet_selection_cursor_base): New
	routine to control the "base" spinning location.

	* src/item-grid.c (item_grid_button_1): Start cell selection if
	user clicks and a selection is going on.  Reset the spin base here.

	* src/sheet.c (sheet_cancel_pending_input): Queue a recalc here,
	as we have modified the cell values.
parent ff605443
1999-10-21 Miguel de Icaza <miguel@gnu.org>
* src/sheet.c (sheet_accept_pending_input): Focus current sheet
also to kill any F2 editing.
* configure.in (bonobo): Require Bonobo 0.5
* src/gnumeric-sheet.c (gnumeric_sheet_selection_cursor_base): New
routine to control the "base" spinning location.
* src/item-grid.c (item_grid_button_1): Start cell selection if
user clicks and a selection is going on. Reset the spin base here.
* src/sheet.c (sheet_cancel_pending_input): Queue a recalc here,
as we have modified the cell values.
1999-10-20 Martin Norbck <norpan@bigfoot.com>
* gnumeric.desktop.in: Added Swedish translation
......
1999-10-21 Miguel de Icaza <miguel@gnu.org>
* src/sheet.c (sheet_accept_pending_input): Focus current sheet
also to kill any F2 editing.
* configure.in (bonobo): Require Bonobo 0.5
* src/gnumeric-sheet.c (gnumeric_sheet_selection_cursor_base): New
routine to control the "base" spinning location.
* src/item-grid.c (item_grid_button_1): Start cell selection if
user clicks and a selection is going on. Reset the spin base here.
* src/sheet.c (sheet_cancel_pending_input): Queue a recalc here,
as we have modified the cell values.
1999-10-20 Martin Norbck <norpan@bigfoot.com>
* gnumeric.desktop.in: Added Swedish translation
......
......@@ -147,12 +147,12 @@ AC_ARG_WITH(bonobo,
gnumeric_executable=gnumeric
AC_SUBST(gnumeric_executable)
if $try_bonobo; then
AC_MSG_CHECKING(for Bonobo > 0.2)
AC_MSG_CHECKING(for Bonobo > 0.4)
if gnome-config --libs bonobo > /dev/null 2>&1; then
vers=`gnome-config --modversion bonobo`
case $vers
in
bonobo-0.[01]) bonobo_ok=false ;;
bonobo-0.[01234]) bonobo_ok=false ;;
*) bonobo_ok=true ;;
esac
else
......
......@@ -31,9 +31,6 @@ colbar_map_point (ColbarDrawCtx *ctx, double point)
return (fabs (ctx->graph->low) + point) / ctx->scale;
}
FIXME
static void
graph_view_colbar_draw_nth_clustered (ColbarDrawCtx *ctx, int item)
{
......
......@@ -122,7 +122,7 @@ cell_set_formula (Cell *cell, const char *text)
} else {
cell->parsed_node = new_expr;
/* Until the value is recomputed, we put in this value. */
cell->value = value_new_error (NULL, _("Circular reference"));
cell->value = value_new_error (NULL, _("Pending recomputation"));
cell_formula_changed (cell);
}
}
......
......@@ -293,6 +293,7 @@ start_cell_selection_at (GnumericSheet *gsheet, int col, int row)
"Sheet", gsheet->sheet_view->sheet,
"Grid", gsheet->item_grid,
"Style", ITEM_CURSOR_ANTED, NULL));
item_cursor_set_spin_base (gsheet->selection, col, row);
gsheet->selection->base_col = col;
gsheet->selection->base_row = row;
item_cursor_set_bounds (ITEM_CURSOR (gsheet->selection), col, row, col, row);
......@@ -476,6 +477,21 @@ gnumeric_sheet_selection_cursor_place (GnumericSheet *gsheet, int col, int row)
selection_insert_selection_string (gsheet);
}
void
gnumeric_sheet_selection_cursor_base (GnumericSheet *gsheet, int col, int row)
{
ItemCursor *ic;
g_return_if_fail (gsheet != NULL);
g_return_if_fail (GNUMERIC_IS_SHEET (gsheet));
g_return_if_fail (gsheet->selecting_cell);
g_return_if_fail (col < SHEET_MAX_COLS);
g_return_if_fail (row < SHEET_MAX_ROWS);
ic = gsheet->selection;
item_cursor_set_spin_base (ic, col, row);
}
static void
selection_cursor_move_horizontal (GnumericSheet *gsheet, int dir, gboolean jump_to_boundaries)
{
......
......@@ -87,6 +87,8 @@ void gnumeric_sheet_start_cell_selection (GnumericSheet *gsheet,
void gnumeric_sheet_stop_cell_selection (GnumericSheet *gsheet);
void gnumeric_sheet_selection_cursor_place (GnumericSheet *gsheet,
int col, int row);
void gnumeric_sheet_selection_cursor_base (GnumericSheet *gsheet,
int col, int row);
void gnumeric_sheet_selection_extend (GnumericSheet *gsheet,
int col, int row);
void gnumeric_sheet_stop_editing (GnumericSheet *sheet);
......
......@@ -293,6 +293,7 @@ start_cell_selection_at (GnumericSheet *gsheet, int col, int row)
"Sheet", gsheet->sheet_view->sheet,
"Grid", gsheet->item_grid,
"Style", ITEM_CURSOR_ANTED, NULL));
item_cursor_set_spin_base (gsheet->selection, col, row);
gsheet->selection->base_col = col;
gsheet->selection->base_row = row;
item_cursor_set_bounds (ITEM_CURSOR (gsheet->selection), col, row, col, row);
......@@ -476,6 +477,21 @@ gnumeric_sheet_selection_cursor_place (GnumericSheet *gsheet, int col, int row)
selection_insert_selection_string (gsheet);
}
void
gnumeric_sheet_selection_cursor_base (GnumericSheet *gsheet, int col, int row)
{
ItemCursor *ic;
g_return_if_fail (gsheet != NULL);
g_return_if_fail (GNUMERIC_IS_SHEET (gsheet));
g_return_if_fail (gsheet->selecting_cell);
g_return_if_fail (col < SHEET_MAX_COLS);
g_return_if_fail (row < SHEET_MAX_ROWS);
ic = gsheet->selection;
item_cursor_set_spin_base (ic, col, row);
}
static void
selection_cursor_move_horizontal (GnumericSheet *gsheet, int dir, gboolean jump_to_boundaries)
{
......
......@@ -87,6 +87,8 @@ void gnumeric_sheet_start_cell_selection (GnumericSheet *gsheet,
void gnumeric_sheet_stop_cell_selection (GnumericSheet *gsheet);
void gnumeric_sheet_selection_cursor_place (GnumericSheet *gsheet,
int col, int row);
void gnumeric_sheet_selection_cursor_base (GnumericSheet *gsheet,
int col, int row);
void gnumeric_sheet_selection_extend (GnumericSheet *gsheet,
int col, int row);
void gnumeric_sheet_stop_editing (GnumericSheet *sheet);
......
......@@ -649,6 +649,15 @@ item_cursor_set_visibility (ItemCursor *item_cursor, int visible)
item_cursor_request_redraw (item_cursor);
}
void
item_cursor_set_spin_base (ItemCursor *item_cursor, int col, int row)
{
g_return_if_fail (IS_ITEM_CURSOR (item_cursor));
item_cursor->base_col = col;
item_cursor->base_row = row;
}
static gint
item_cursor_drag_event (GnomeCanvasItem *item, GdkEvent *event)
{
......@@ -894,3 +903,4 @@ item_cursor_get_type (void)
return item_cursor_type;
}
......@@ -59,6 +59,8 @@ typedef struct {
void item_cursor_set_bounds (ItemCursor *item_cursor,
int start_col, int start_row,
int end_col, int end_row);
void item_cursor_set_spin_base (ItemCursor *item_cursor,
int col, int row);
void item_cursor_set_visibility (ItemCursor *item_cursor,
int visible);
......
......@@ -730,13 +730,15 @@ item_grid_button_1 (Sheet *sheet, GdkEvent *event, ItemGrid *item_grid, int col,
/*
* If we were already selecting a range of cells for a formula,
* just reset the location to a new place.
* reset the location to a new place.
*/
if (gsheet->selecting_cell){
item_grid->selecting = ITEM_GRID_SELECTING_FORMULA_RANGE;
gnumeric_sheet_selection_cursor_place (gsheet, col, row);
gnumeric_sheet_selection_cursor_base (gsheet, col, row);
return 1;
}
/*
* If the user is editing a formula (gnumeric_sheet_can_move_cursor)
* then we enable the dynamic cell selection mode.
......@@ -946,7 +948,6 @@ item_grid_event (GnomeCanvasItem *item, GdkEvent *event)
item_grid->selecting = ITEM_GRID_NO_SELECTION;
gnome_canvas_item_ungrab (item, event->button.time);
return 1;
}
break;
......
......@@ -1149,6 +1149,11 @@ sheet_accept_pending_input (Sheet *sheet)
sheet_set_current_value (sheet);
/*
* If user was editing on the input line, get the focus back
*/
workbook_focus_current_sheet (sheet->workbook);
for (l = sheet->sheet_views; l; l = l->next){
GnumericSheet *gsheet = GNUMERIC_SHEET_VIEW (l->data);
......@@ -1181,6 +1186,7 @@ sheet_cancel_pending_input (Sheet *sheet)
gnumeric_sheet_destroy_editing_cursor (gsheet);
}
workbook_recalc (sheet->workbook);
}
void
......
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