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

Change return type to GnumericExprEntry. (workbook_set_entry): Change type

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

	* src/workbook-edit.[ch] (workbook_get_entry,
	workbook_get_entry_logical): Change return type to
	GnumericExprEntry.
	(workbook_set_entry): Change type of entry argument to
	GnumericExprEntry.

	* src/gnumeric-sheet.c (move_cursor): Move to scg::scg_move_cursor
	(cursor_horizontal_move): Move to scg::scg_cursor_horizontal_move
	(cursor_horizontal_extend): Move to
	scg::scg_cursor_horizontal_extend
	(cursor_vertical_move): Move to scg::scg_cursor_vertical_move
	(cursor_vertical_extend): Move to scg::scg_cursor_vertical_extend
	(selection_remove_selection_string,
	selection_insert_selection_string): Remove. GnumericExprEntry
	widget now handles this.
	(start_cell_selection_at): Rename to start_range_selection_at.
	(start_cell_selection): Rename to start_range_selection.
	(gnumeric_sheet_start_cell_selection): Rename to
	gnumeric_sheet_start_range_selection.
	(gnumeric_sheet_stop_cell_selection): Rename to
	gnumeric_sheet_stop_range_selection. Remove clear_string parameter
	and selection string manipulation.
	(rangesel_horizontal_move): Make non-static, rename to
	gnumeric_sheet_rangesel_horizontal_move, remove selection string
	manipulation.
	(rangesel_vertical_move): Make non-static, rename to
	gnumeric_sheet_rangesel_vertical_move, remove selection string
	manipulation.
	(rangesel_horizontal_extend): Make non-static, rename to
	gnumeric_sheet_rangesel_horizontal_extend, remove selection string
	manipulation.
	(rangesel_vertical_extend): Make non-static, rename to
	gnumeric_sheet_rangesel_vertical_extend, remove selection string
	manipulation.
	(gnumeric_sheet_key_mode_sheet): Use movefn's from scg instead of
	from GnumericSheet.

	* src/gnumeric-sheet.h (gnumeric_sheet_start_cell_selection):
	Rename to gnumeric_sheet_start_range_selection.
	(gnumeric_sheet_stop_cell_selection): Rename to
	gnumeric_sheet_stop_range_selection. Remove clear_string
	parameter.
	(gnumeric_sheet_rangesel_horizontal_move,
	gnumeric_sheet_rangesel_vertical_move,
	gnumeric_sheet_rangesel_horizontal_extend,
	gnumeric_sheet_rangesel_vertical_extend): Declare.

	* src/gnumeric-util.[ch] (gnumeric_entry_at_subexpr_boundary_p):
	Rename to gnumeric_expr_entry_at_subexpr_boundary_p and move to
	gnumeric_expr_entry widget.

	* src/item-grid.c (item_grid_button_1, item_grid_event): Use scg
	methods instead of methods from GnumericSheet.

	* src/sheet.[ch] (sheet_stop_cell_selection): Rename to
	sheet_stop_range_selection.

	* src/sheet-control-gui.c (scg_colrow_select): Use scg methods
	instead of methods from GnumericSheet.
	(scg_stop_editing): Add call to scg_stop_cell_selection.
	(scg_range_selection_changed): New function. Notify ExprEntry that
	the expression range has changed.
	(scg_move_cursor): Moved here from GnumericSheet.
	(scg_rangesel_cursor_extend): Add call to
	scg_range_selection_changed.
	(scg_rangesel_cursor_bounds, scg_rangesel_horizontal_move,
	scg_rangesel_vertical_move, scg_rangesel_horizontal_extend,
	scg_rangesel_vertical_extend): New functions. Call GnumericSheet
	counterpart and notify ExprEntry.
	(scg_cursor_horizontal_move, scg_cursor_horizontal_extend,
	scg_cursor_vertical_move, scg_cursor_vertical_extend): Moved here
	from GnumericSheet.
	(scg_get_sel_cursor_pos): New function. Return selection cursor
	position.

	* src/sheet-control-gui.h (scg_range_selection_changed,
	scg_move_cursor, scg_rangesel_cursor_bounds,
	scg_rangesel_horizontal_move, scg_rangesel_vertical_move,
	scg_rangesel_horizontal_extend, scg_rangesel_vertical_extend,
	scg_cursor_horizontal_move, scg_cursor_vertical_move,
	scg_cursor_horizontal_extend, scg_cursor_vertical_extend,
	scg_get_sel_cursor_pos): Declare.

	* src/sheet-control-gui.[ch] (scg_stop_cell_selection): Rename to
	scg_stop_range_selection. Notify ExprEntry that range selection
	has stopped.

	* src/sheet-object-widget.c (cb_checkbox_config_focus): Call
	gnumeric_expr_entry_select_absolute.
	(sheet_widget_checkbox_user_config): Use GnumericExprEntry. Attach
	it to the scg.

	* src/workbook-control-gui.c (cb_notebook_switch_page): Use new
	function name sheet_stop_range_selection.

	* src/workbook-control-gui-priv.h (struct
	_WorkbookControlGUI::struct edit_line): entry and temp_entry are
	now GnumericExprEntries.
	(struct _WorkbookControlGUI): Remove select_abs_col,
	select_abs_row, select_full_col, select_full_row and
	select_single_cell.

	* src/workbook-control-gui.c (wbcg_finish_editing,
	wb_edit_key_pressed, cb_autofunction, workbook_setup_edit_area,
	auto_complete_matches): Entry must now be cast to GtkEntry.
	(workbook_control_gui_init): select_abs_col, select_abs_row,
	select_full_col, select_full_row and select_single_cell no longer
	exist.

	* src/workbook-edit.c (workbook_finish_editing, entry_changed,
	workbook_start_editing_at_cursor): entry must now be cast to
	GtkEntry.
	(workbook_start_editing_at_cursor): Attach scg to
	ExprEntry. wbcg->select_abs_col and select_abs_row no longer
	exist.
	(workbook_edit_select_absolute): Move to ExprEntry widget.
	(workbook_edit_toggle_absolute): New function. Probably remove it
	again.
	(workbook_edit_init): Remove redundant 'g_assert != NULL'. Use
	GnumericExprEntry widget.

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

	* src/dialogs/dialog-define-names.c (struct NameGuruState):
	Change type of expr_text to GnumericExprEntry.
	(name_guru_set_expr, name_guru_update_sensitivity,
	name_guru_set_expr, cb_name_guru_add): expr_text must now be
	cast to GTK_ENTRY.  (cb_name_guru_value_focus): Use
	gnumeric_expr_entry_set_absolute. w argument is now expected
	to be a GnumericExprEntry.  (cb_name_guru_set_focus): New
	function. Make anted selection go away when a widget other
	than expr_text receives focus.  (name_guru_init): Create a
	GnumericExprEntry and insert in the dialog. Attach it to the
	current sheet. Connect cb_name_guru_set_focus to dialog's
	set-focus signal, and remove the focus-in handler from
	name_value.

	* src/dialogs/dialog-function-wizard.c (struct ArgumentState):
	Change type of entry to GnumericExprEntry.
	(formula_guru_set_expr): Change type of new_entry to
	GnumericExprEntry. Cast to GTK_ENTRY where necessary.
	(formula_guru_set_expr, cb_formula_guru_rolled_entry_changed,
	cb_formula_guru_entry_changed, formula_guru_init):
	ArgumentState->entry must now be cast to GTK_ENTRY.
	(formula_guru_set_rolled_state): Change type of new_entry to
	GnumericExprEntry. Cast to GTK_ENTRY where necessary.
	(formula_guru_arg_new): Create a GnumericExprEntry instead of
	a GtkEntry and insert in the dialog. Attach it to the current
	sheet.  (formula_guru_init): Create a GnumericExprEntry for
	rolled_entry and insert in the dialog. Attach it to the
	current sheet.  (dialog_formula_guru): Value returned by
	workbook_get_entry must now be cast to GTK_ENTRY.

	* src/dialogs/formula-guru.glade: Remove 'rolled_entry'
	GtkEntry. A GnumericExprEntry is now added at runtime instead.

	* src/dialogs/names.glade: Remove 'expr_text' GtkEntry. A
	GnumericExprEntry is now added at runtime instead.
parent 41739096
2001-04-18 Jon K Hellan <hellan@acm.org>
* src/workbook-edit.[ch] (workbook_get_entry,
workbook_get_entry_logical): Change return type to
GnumericExprEntry.
(workbook_set_entry): Change type of entry argument to
GnumericExprEntry.
* src/gnumeric-sheet.c (move_cursor): Move to scg::scg_move_cursor
(cursor_horizontal_move): Move to scg::scg_cursor_horizontal_move
(cursor_horizontal_extend): Move to
scg::scg_cursor_horizontal_extend
(cursor_vertical_move): Move to scg::scg_cursor_vertical_move
(cursor_vertical_extend): Move to scg::scg_cursor_vertical_extend
(selection_remove_selection_string,
selection_insert_selection_string): Remove. GnumericExprEntry
widget now handles this.
(start_cell_selection_at): Rename to start_range_selection_at.
(start_cell_selection): Rename to start_range_selection.
(gnumeric_sheet_start_cell_selection): Rename to
gnumeric_sheet_start_range_selection.
(gnumeric_sheet_stop_cell_selection): Rename to
gnumeric_sheet_stop_range_selection. Remove clear_string parameter
and selection string manipulation.
(rangesel_horizontal_move): Make non-static, rename to
gnumeric_sheet_rangesel_horizontal_move, remove selection string
manipulation.
(rangesel_vertical_move): Make non-static, rename to
gnumeric_sheet_rangesel_vertical_move, remove selection string
manipulation.
(rangesel_horizontal_extend): Make non-static, rename to
gnumeric_sheet_rangesel_horizontal_extend, remove selection string
manipulation.
(rangesel_vertical_extend): Make non-static, rename to
gnumeric_sheet_rangesel_vertical_extend, remove selection string
manipulation.
(gnumeric_sheet_key_mode_sheet): Use movefn's from scg instead of
from GnumericSheet.
* src/gnumeric-sheet.h (gnumeric_sheet_start_cell_selection):
Rename to gnumeric_sheet_start_range_selection.
(gnumeric_sheet_stop_cell_selection): Rename to
gnumeric_sheet_stop_range_selection. Remove clear_string
parameter.
(gnumeric_sheet_rangesel_horizontal_move,
gnumeric_sheet_rangesel_vertical_move,
gnumeric_sheet_rangesel_horizontal_extend,
gnumeric_sheet_rangesel_vertical_extend): Declare.
* src/gnumeric-util.[ch] (gnumeric_entry_at_subexpr_boundary_p):
Rename to gnumeric_expr_entry_at_subexpr_boundary_p and move to
gnumeric_expr_entry widget.
* src/item-grid.c (item_grid_button_1, item_grid_event): Use scg
methods instead of methods from GnumericSheet.
* src/sheet.[ch] (sheet_stop_cell_selection): Rename to
sheet_stop_range_selection.
* src/sheet-control-gui.c (scg_colrow_select): Use scg methods
instead of methods from GnumericSheet.
(scg_stop_editing): Add call to scg_stop_cell_selection.
(scg_range_selection_changed): New function. Notify ExprEntry that
the expression range has changed.
(scg_move_cursor): Moved here from GnumericSheet.
(scg_rangesel_cursor_extend): Add call to
scg_range_selection_changed.
(scg_rangesel_cursor_bounds, scg_rangesel_horizontal_move,
scg_rangesel_vertical_move, scg_rangesel_horizontal_extend,
scg_rangesel_vertical_extend): New functions. Call GnumericSheet
counterpart and notify ExprEntry.
(scg_cursor_horizontal_move, scg_cursor_horizontal_extend,
scg_cursor_vertical_move, scg_cursor_vertical_extend): Moved here
from GnumericSheet.
(scg_get_sel_cursor_pos): New function. Return selection cursor
position.
* src/sheet-control-gui.h (scg_range_selection_changed,
scg_move_cursor, scg_rangesel_cursor_bounds,
scg_rangesel_horizontal_move, scg_rangesel_vertical_move,
scg_rangesel_horizontal_extend, scg_rangesel_vertical_extend,
scg_cursor_horizontal_move, scg_cursor_vertical_move,
scg_cursor_horizontal_extend, scg_cursor_vertical_extend,
scg_get_sel_cursor_pos): Declare.
* src/sheet-control-gui.[ch] (scg_stop_cell_selection): Rename to
scg_stop_range_selection. Notify ExprEntry that range selection
has stopped.
* src/sheet-object-widget.c (cb_checkbox_config_focus): Call
gnumeric_expr_entry_select_absolute.
(sheet_widget_checkbox_user_config): Use GnumericExprEntry. Attach
it to the scg.
* src/workbook-control-gui.c (cb_notebook_switch_page): Use new
function name sheet_stop_range_selection.
* src/workbook-control-gui-priv.h (struct
_WorkbookControlGUI::struct edit_line): entry and temp_entry are
now GnumericExprEntries.
(struct _WorkbookControlGUI): Remove select_abs_col,
select_abs_row, select_full_col, select_full_row and
select_single_cell.
* src/workbook-control-gui.c (wbcg_finish_editing,
wb_edit_key_pressed, cb_autofunction, workbook_setup_edit_area,
auto_complete_matches): Entry must now be cast to GtkEntry.
(workbook_control_gui_init): select_abs_col, select_abs_row,
select_full_col, select_full_row and select_single_cell no longer
exist.
* src/workbook-edit.c (workbook_finish_editing, entry_changed,
workbook_start_editing_at_cursor): entry must now be cast to
GtkEntry.
(workbook_start_editing_at_cursor): Attach scg to
ExprEntry. wbcg->select_abs_col and select_abs_row no longer
exist.
(workbook_edit_select_absolute): Move to ExprEntry widget.
(workbook_edit_toggle_absolute): New function. Probably remove it
again.
(workbook_edit_init): Remove redundant 'g_assert != NULL'. Use
GnumericExprEntry widget.
2001-04-17 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (wbcg_init_state) : implement.
......
2001-04-18 Jon K Hellan <hellan@acm.org>
* src/workbook-edit.[ch] (workbook_get_entry,
workbook_get_entry_logical): Change return type to
GnumericExprEntry.
(workbook_set_entry): Change type of entry argument to
GnumericExprEntry.
* src/gnumeric-sheet.c (move_cursor): Move to scg::scg_move_cursor
(cursor_horizontal_move): Move to scg::scg_cursor_horizontal_move
(cursor_horizontal_extend): Move to
scg::scg_cursor_horizontal_extend
(cursor_vertical_move): Move to scg::scg_cursor_vertical_move
(cursor_vertical_extend): Move to scg::scg_cursor_vertical_extend
(selection_remove_selection_string,
selection_insert_selection_string): Remove. GnumericExprEntry
widget now handles this.
(start_cell_selection_at): Rename to start_range_selection_at.
(start_cell_selection): Rename to start_range_selection.
(gnumeric_sheet_start_cell_selection): Rename to
gnumeric_sheet_start_range_selection.
(gnumeric_sheet_stop_cell_selection): Rename to
gnumeric_sheet_stop_range_selection. Remove clear_string parameter
and selection string manipulation.
(rangesel_horizontal_move): Make non-static, rename to
gnumeric_sheet_rangesel_horizontal_move, remove selection string
manipulation.
(rangesel_vertical_move): Make non-static, rename to
gnumeric_sheet_rangesel_vertical_move, remove selection string
manipulation.
(rangesel_horizontal_extend): Make non-static, rename to
gnumeric_sheet_rangesel_horizontal_extend, remove selection string
manipulation.
(rangesel_vertical_extend): Make non-static, rename to
gnumeric_sheet_rangesel_vertical_extend, remove selection string
manipulation.
(gnumeric_sheet_key_mode_sheet): Use movefn's from scg instead of
from GnumericSheet.
* src/gnumeric-sheet.h (gnumeric_sheet_start_cell_selection):
Rename to gnumeric_sheet_start_range_selection.
(gnumeric_sheet_stop_cell_selection): Rename to
gnumeric_sheet_stop_range_selection. Remove clear_string
parameter.
(gnumeric_sheet_rangesel_horizontal_move,
gnumeric_sheet_rangesel_vertical_move,
gnumeric_sheet_rangesel_horizontal_extend,
gnumeric_sheet_rangesel_vertical_extend): Declare.
* src/gnumeric-util.[ch] (gnumeric_entry_at_subexpr_boundary_p):
Rename to gnumeric_expr_entry_at_subexpr_boundary_p and move to
gnumeric_expr_entry widget.
* src/item-grid.c (item_grid_button_1, item_grid_event): Use scg
methods instead of methods from GnumericSheet.
* src/sheet.[ch] (sheet_stop_cell_selection): Rename to
sheet_stop_range_selection.
* src/sheet-control-gui.c (scg_colrow_select): Use scg methods
instead of methods from GnumericSheet.
(scg_stop_editing): Add call to scg_stop_cell_selection.
(scg_range_selection_changed): New function. Notify ExprEntry that
the expression range has changed.
(scg_move_cursor): Moved here from GnumericSheet.
(scg_rangesel_cursor_extend): Add call to
scg_range_selection_changed.
(scg_rangesel_cursor_bounds, scg_rangesel_horizontal_move,
scg_rangesel_vertical_move, scg_rangesel_horizontal_extend,
scg_rangesel_vertical_extend): New functions. Call GnumericSheet
counterpart and notify ExprEntry.
(scg_cursor_horizontal_move, scg_cursor_horizontal_extend,
scg_cursor_vertical_move, scg_cursor_vertical_extend): Moved here
from GnumericSheet.
(scg_get_sel_cursor_pos): New function. Return selection cursor
position.
* src/sheet-control-gui.h (scg_range_selection_changed,
scg_move_cursor, scg_rangesel_cursor_bounds,
scg_rangesel_horizontal_move, scg_rangesel_vertical_move,
scg_rangesel_horizontal_extend, scg_rangesel_vertical_extend,
scg_cursor_horizontal_move, scg_cursor_vertical_move,
scg_cursor_horizontal_extend, scg_cursor_vertical_extend,
scg_get_sel_cursor_pos): Declare.
* src/sheet-control-gui.[ch] (scg_stop_cell_selection): Rename to
scg_stop_range_selection. Notify ExprEntry that range selection
has stopped.
* src/sheet-object-widget.c (cb_checkbox_config_focus): Call
gnumeric_expr_entry_select_absolute.
(sheet_widget_checkbox_user_config): Use GnumericExprEntry. Attach
it to the scg.
* src/workbook-control-gui.c (cb_notebook_switch_page): Use new
function name sheet_stop_range_selection.
* src/workbook-control-gui-priv.h (struct
_WorkbookControlGUI::struct edit_line): entry and temp_entry are
now GnumericExprEntries.
(struct _WorkbookControlGUI): Remove select_abs_col,
select_abs_row, select_full_col, select_full_row and
select_single_cell.
* src/workbook-control-gui.c (wbcg_finish_editing,
wb_edit_key_pressed, cb_autofunction, workbook_setup_edit_area,
auto_complete_matches): Entry must now be cast to GtkEntry.
(workbook_control_gui_init): select_abs_col, select_abs_row,
select_full_col, select_full_row and select_single_cell no longer
exist.
* src/workbook-edit.c (workbook_finish_editing, entry_changed,
workbook_start_editing_at_cursor): entry must now be cast to
GtkEntry.
(workbook_start_editing_at_cursor): Attach scg to
ExprEntry. wbcg->select_abs_col and select_abs_row no longer
exist.
(workbook_edit_select_absolute): Move to ExprEntry widget.
(workbook_edit_toggle_absolute): New function. Probably remove it
again.
(workbook_edit_init): Remove redundant 'g_assert != NULL'. Use
GnumericExprEntry widget.
2001-04-17 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (wbcg_init_state) : implement.
......
2001-04-18 Jon K Hellan <hellan@acm.org>
* src/workbook-edit.[ch] (workbook_get_entry,
workbook_get_entry_logical): Change return type to
GnumericExprEntry.
(workbook_set_entry): Change type of entry argument to
GnumericExprEntry.
* src/gnumeric-sheet.c (move_cursor): Move to scg::scg_move_cursor
(cursor_horizontal_move): Move to scg::scg_cursor_horizontal_move
(cursor_horizontal_extend): Move to
scg::scg_cursor_horizontal_extend
(cursor_vertical_move): Move to scg::scg_cursor_vertical_move
(cursor_vertical_extend): Move to scg::scg_cursor_vertical_extend
(selection_remove_selection_string,
selection_insert_selection_string): Remove. GnumericExprEntry
widget now handles this.
(start_cell_selection_at): Rename to start_range_selection_at.
(start_cell_selection): Rename to start_range_selection.
(gnumeric_sheet_start_cell_selection): Rename to
gnumeric_sheet_start_range_selection.
(gnumeric_sheet_stop_cell_selection): Rename to
gnumeric_sheet_stop_range_selection. Remove clear_string parameter
and selection string manipulation.
(rangesel_horizontal_move): Make non-static, rename to
gnumeric_sheet_rangesel_horizontal_move, remove selection string
manipulation.
(rangesel_vertical_move): Make non-static, rename to
gnumeric_sheet_rangesel_vertical_move, remove selection string
manipulation.
(rangesel_horizontal_extend): Make non-static, rename to
gnumeric_sheet_rangesel_horizontal_extend, remove selection string
manipulation.
(rangesel_vertical_extend): Make non-static, rename to
gnumeric_sheet_rangesel_vertical_extend, remove selection string
manipulation.
(gnumeric_sheet_key_mode_sheet): Use movefn's from scg instead of
from GnumericSheet.
* src/gnumeric-sheet.h (gnumeric_sheet_start_cell_selection):
Rename to gnumeric_sheet_start_range_selection.
(gnumeric_sheet_stop_cell_selection): Rename to
gnumeric_sheet_stop_range_selection. Remove clear_string
parameter.
(gnumeric_sheet_rangesel_horizontal_move,
gnumeric_sheet_rangesel_vertical_move,
gnumeric_sheet_rangesel_horizontal_extend,
gnumeric_sheet_rangesel_vertical_extend): Declare.
* src/gnumeric-util.[ch] (gnumeric_entry_at_subexpr_boundary_p):
Rename to gnumeric_expr_entry_at_subexpr_boundary_p and move to
gnumeric_expr_entry widget.
* src/item-grid.c (item_grid_button_1, item_grid_event): Use scg
methods instead of methods from GnumericSheet.
* src/sheet.[ch] (sheet_stop_cell_selection): Rename to
sheet_stop_range_selection.
* src/sheet-control-gui.c (scg_colrow_select): Use scg methods
instead of methods from GnumericSheet.
(scg_stop_editing): Add call to scg_stop_cell_selection.
(scg_range_selection_changed): New function. Notify ExprEntry that
the expression range has changed.
(scg_move_cursor): Moved here from GnumericSheet.
(scg_rangesel_cursor_extend): Add call to
scg_range_selection_changed.
(scg_rangesel_cursor_bounds, scg_rangesel_horizontal_move,
scg_rangesel_vertical_move, scg_rangesel_horizontal_extend,
scg_rangesel_vertical_extend): New functions. Call GnumericSheet
counterpart and notify ExprEntry.
(scg_cursor_horizontal_move, scg_cursor_horizontal_extend,
scg_cursor_vertical_move, scg_cursor_vertical_extend): Moved here
from GnumericSheet.
(scg_get_sel_cursor_pos): New function. Return selection cursor
position.
* src/sheet-control-gui.h (scg_range_selection_changed,
scg_move_cursor, scg_rangesel_cursor_bounds,
scg_rangesel_horizontal_move, scg_rangesel_vertical_move,
scg_rangesel_horizontal_extend, scg_rangesel_vertical_extend,
scg_cursor_horizontal_move, scg_cursor_vertical_move,
scg_cursor_horizontal_extend, scg_cursor_vertical_extend,
scg_get_sel_cursor_pos): Declare.
* src/sheet-control-gui.[ch] (scg_stop_cell_selection): Rename to
scg_stop_range_selection. Notify ExprEntry that range selection
has stopped.
* src/sheet-object-widget.c (cb_checkbox_config_focus): Call
gnumeric_expr_entry_select_absolute.
(sheet_widget_checkbox_user_config): Use GnumericExprEntry. Attach
it to the scg.
* src/workbook-control-gui.c (cb_notebook_switch_page): Use new
function name sheet_stop_range_selection.
* src/workbook-control-gui-priv.h (struct
_WorkbookControlGUI::struct edit_line): entry and temp_entry are
now GnumericExprEntries.
(struct _WorkbookControlGUI): Remove select_abs_col,
select_abs_row, select_full_col, select_full_row and
select_single_cell.
* src/workbook-control-gui.c (wbcg_finish_editing,
wb_edit_key_pressed, cb_autofunction, workbook_setup_edit_area,
auto_complete_matches): Entry must now be cast to GtkEntry.
(workbook_control_gui_init): select_abs_col, select_abs_row,
select_full_col, select_full_row and select_single_cell no longer
exist.
* src/workbook-edit.c (workbook_finish_editing, entry_changed,
workbook_start_editing_at_cursor): entry must now be cast to
GtkEntry.
(workbook_start_editing_at_cursor): Attach scg to
ExprEntry. wbcg->select_abs_col and select_abs_row no longer
exist.
(workbook_edit_select_absolute): Move to ExprEntry widget.
(workbook_edit_toggle_absolute): New function. Probably remove it
again.
(workbook_edit_init): Remove redundant 'g_assert != NULL'. Use
GnumericExprEntry widget.
2001-04-17 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (wbcg_init_state) : implement.
......
2001-04-18 Jon K Hellan <hellan@acm.org>
* src/workbook-edit.[ch] (workbook_get_entry,
workbook_get_entry_logical): Change return type to
GnumericExprEntry.
(workbook_set_entry): Change type of entry argument to
GnumericExprEntry.
* src/gnumeric-sheet.c (move_cursor): Move to scg::scg_move_cursor
(cursor_horizontal_move): Move to scg::scg_cursor_horizontal_move
(cursor_horizontal_extend): Move to
scg::scg_cursor_horizontal_extend
(cursor_vertical_move): Move to scg::scg_cursor_vertical_move
(cursor_vertical_extend): Move to scg::scg_cursor_vertical_extend
(selection_remove_selection_string,
selection_insert_selection_string): Remove. GnumericExprEntry
widget now handles this.
(start_cell_selection_at): Rename to start_range_selection_at.
(start_cell_selection): Rename to start_range_selection.
(gnumeric_sheet_start_cell_selection): Rename to
gnumeric_sheet_start_range_selection.
(gnumeric_sheet_stop_cell_selection): Rename to
gnumeric_sheet_stop_range_selection. Remove clear_string parameter
and selection string manipulation.
(rangesel_horizontal_move): Make non-static, rename to
gnumeric_sheet_rangesel_horizontal_move, remove selection string
manipulation.
(rangesel_vertical_move): Make non-static, rename to
gnumeric_sheet_rangesel_vertical_move, remove selection string
manipulation.
(rangesel_horizontal_extend): Make non-static, rename to
gnumeric_sheet_rangesel_horizontal_extend, remove selection string
manipulation.
(rangesel_vertical_extend): Make non-static, rename to
gnumeric_sheet_rangesel_vertical_extend, remove selection string
manipulation.
(gnumeric_sheet_key_mode_sheet): Use movefn's from scg instead of
from GnumericSheet.
* src/gnumeric-sheet.h (gnumeric_sheet_start_cell_selection):
Rename to gnumeric_sheet_start_range_selection.
(gnumeric_sheet_stop_cell_selection): Rename to
gnumeric_sheet_stop_range_selection. Remove clear_string
parameter.
(gnumeric_sheet_rangesel_horizontal_move,
gnumeric_sheet_rangesel_vertical_move,
gnumeric_sheet_rangesel_horizontal_extend,
gnumeric_sheet_rangesel_vertical_extend): Declare.
* src/gnumeric-util.[ch] (gnumeric_entry_at_subexpr_boundary_p):
Rename to gnumeric_expr_entry_at_subexpr_boundary_p and move to
gnumeric_expr_entry widget.
* src/item-grid.c (item_grid_button_1, item_grid_event): Use scg
methods instead of methods from GnumericSheet.
* src/sheet.[ch] (sheet_stop_cell_selection): Rename to
sheet_stop_range_selection.
* src/sheet-control-gui.c (scg_colrow_select): Use scg methods
instead of methods from GnumericSheet.
(scg_stop_editing): Add call to scg_stop_cell_selection.
(scg_range_selection_changed): New function. Notify ExprEntry that
the expression range has changed.
(scg_move_cursor): Moved here from GnumericSheet.
(scg_rangesel_cursor_extend): Add call to
scg_range_selection_changed.
(scg_rangesel_cursor_bounds, scg_rangesel_horizontal_move,
scg_rangesel_vertical_move, scg_rangesel_horizontal_extend,
scg_rangesel_vertical_extend): New functions. Call GnumericSheet
counterpart and notify ExprEntry.
(scg_cursor_horizontal_move, scg_cursor_horizontal_extend,
scg_cursor_vertical_move, scg_cursor_vertical_extend): Moved here
from GnumericSheet.
(scg_get_sel_cursor_pos): New function. Return selection cursor
position.
* src/sheet-control-gui.h (scg_range_selection_changed,
scg_move_cursor, scg_rangesel_cursor_bounds,
scg_rangesel_horizontal_move, scg_rangesel_vertical_move,
scg_rangesel_horizontal_extend, scg_rangesel_vertical_extend,
scg_cursor_horizontal_move, scg_cursor_vertical_move,
scg_cursor_horizontal_extend, scg_cursor_vertical_extend,
scg_get_sel_cursor_pos): Declare.
* src/sheet-control-gui.[ch] (scg_stop_cell_selection): Rename to
scg_stop_range_selection. Notify ExprEntry that range selection
has stopped.
* src/sheet-object-widget.c (cb_checkbox_config_focus): Call
gnumeric_expr_entry_select_absolute.
(sheet_widget_checkbox_user_config): Use GnumericExprEntry. Attach
it to the scg.
* src/workbook-control-gui.c (cb_notebook_switch_page): Use new
function name sheet_stop_range_selection.
* src/workbook-control-gui-priv.h (struct
_WorkbookControlGUI::struct edit_line): entry and temp_entry are
now GnumericExprEntries.
(struct _WorkbookControlGUI): Remove select_abs_col,
select_abs_row, select_full_col, select_full_row and
select_single_cell.
* src/workbook-control-gui.c (wbcg_finish_editing,
wb_edit_key_pressed, cb_autofunction, workbook_setup_edit_area,
auto_complete_matches): Entry must now be cast to GtkEntry.
(workbook_control_gui_init): select_abs_col, select_abs_row,
select_full_col, select_full_row and select_single_cell no longer
exist.
* src/workbook-edit.c (workbook_finish_editing, entry_changed,
workbook_start_editing_at_cursor): entry must now be cast to
GtkEntry.
(workbook_start_editing_at_cursor): Attach scg to
ExprEntry. wbcg->select_abs_col and select_abs_row no longer
exist.
(workbook_edit_select_absolute): Move to ExprEntry widget.
(workbook_edit_toggle_absolute): New function. Probably remove it
again.
(workbook_edit_init): Remove redundant 'g_assert != NULL'. Use
GnumericExprEntry widget.
2001-04-17 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (wbcg_init_state) : implement.
......
2001-04-18 Jon K Hellan <hellan@acm.org>
* src/workbook-edit.[ch] (workbook_get_entry,
workbook_get_entry_logical): Change return type to
GnumericExprEntry.
(workbook_set_entry): Change type of entry argument to
GnumericExprEntry.
* src/gnumeric-sheet.c (move_cursor): Move to scg::scg_move_cursor
(cursor_horizontal_move): Move to scg::scg_cursor_horizontal_move
(cursor_horizontal_extend): Move to
scg::scg_cursor_horizontal_extend
(cursor_vertical_move): Move to scg::scg_cursor_vertical_move
(cursor_vertical_extend): Move to scg::scg_cursor_vertical_extend
(selection_remove_selection_string,
selection_insert_selection_string): Remove. GnumericExprEntry
widget now handles this.
(start_cell_selection_at): Rename to start_range_selection_at.
(start_cell_selection): Rename to start_range_selection.
(gnumeric_sheet_start_cell_selection): Rename to
gnumeric_sheet_start_range_selection.
(gnumeric_sheet_stop_cell_selection): Rename to
gnumeric_sheet_stop_range_selection. Remove clear_string parameter
and selection string manipulation.
(rangesel_horizontal_move): Make non-static, rename to
gnumeric_sheet_rangesel_horizontal_move, remove selection string
manipulation.
(rangesel_vertical_move): Make non-static, rename to
gnumeric_sheet_rangesel_vertical_move, remove selection string
manipulation.
(rangesel_horizontal_extend): Make non-static, rename to
gnumeric_sheet_rangesel_horizontal_extend, remove selection string
manipulation.
(rangesel_vertical_extend): Make non-static, rename to
gnumeric_sheet_rangesel_vertical_extend, remove selection string
manipulation.
(gnumeric_sheet_key_mode_sheet): Use movefn's from scg instead of
from GnumericSheet.
* src/gnumeric-sheet.h (gnumeric_sheet_start_cell_selection):
Rename to gnumeric_sheet_start_range_selection.
(gnumeric_sheet_stop_cell_selection): Rename to
gnumeric_sheet_stop_range_selection. Remove clear_string
parameter.
(gnumeric_sheet_rangesel_horizontal_move,
gnumeric_sheet_rangesel_vertical_move,
gnumeric_sheet_rangesel_horizontal_extend,
gnumeric_sheet_rangesel_vertical_extend): Declare.
* src/gnumeric-util.[ch] (gnumeric_entry_at_subexpr_boundary_p):
Rename to gnumeric_expr_entry_at_subexpr_boundary_p and move to
gnumeric_expr_entry widget.
* src/item-grid.c (item_grid_button_1, item_grid_event): Use scg
methods instead of methods from GnumericSheet.
* src/sheet.[ch] (sheet_stop_cell_selection): Rename to
sheet_stop_range_selection.
* src/sheet-control-gui.c (scg_colrow_select): Use scg methods
instead of methods from GnumericSheet.
(scg_stop_editing): Add call to scg_stop_cell_selection.
(scg_range_selection_changed): New function. Notify ExprEntry that
the expression range has changed.
(scg_move_cursor): Moved here from GnumericSheet.
(scg_rangesel_cursor_extend): Add call to
scg_range_selection_changed.
(scg_rangesel_cursor_bounds, scg_rangesel_horizontal_move,
scg_rangesel_vertical_move, scg_rangesel_horizontal_extend,
scg_rangesel_vertical_extend): New functions. Call GnumericSheet
counterpart and notify ExprEntry.
(scg_cursor_horizontal_move, scg_cursor_horizontal_extend,
scg_cursor_vertical_move, scg_cursor_vertical_extend): Moved here
from GnumericSheet.
(scg_get_sel_cursor_pos): New function. Return selection cursor
position.
* src/sheet-control-gui.h (scg_range_selection_changed,
scg_move_cursor, scg_rangesel_cursor_bounds,
scg_rangesel_horizontal_move, scg_rangesel_vertical_move,
scg_rangesel_horizontal_extend, scg_rangesel_vertical_extend,
scg_cursor_horizontal_move, scg_cursor_vertical_move,
scg_cursor_horizontal_extend, scg_cursor_vertical_extend,
scg_get_sel_cursor_pos): Declare.
* src/sheet-control-gui.[ch] (scg_stop_cell_selection): Rename to
scg_stop_range_selection. Notify ExprEntry that range selection
has stopped.
* src/sheet-object-widget.c (cb_checkbox_config_focus): Call
gnumeric_expr_entry_select_absolute.
(sheet_widget_checkbox_user_config): Use GnumericExprEntry. Attach
it to the scg.
* src/workbook-control-gui.c (cb_notebook_switch_page): Use new
function name sheet_stop_range_selection.
* src/workbook-control-gui-priv.h (struct
_WorkbookControlGUI::struct edit_line): entry and temp_entry are
now GnumericExprEntries.
(struct _WorkbookControlGUI): Remove select_abs_col,
select_abs_row, select_full_col, select_full_row and
select_single_cell.
* src/workbook-control-gui.c (wbcg_finish_editing,
wb_edit_key_pressed, cb_autofunction, workbook_setup_edit_area,
auto_complete_matches): Entry must now be cast to GtkEntry.
(workbook_control_gui_init): select_abs_col, select_abs_row,
select_full_col, select_full_row and select_single_cell no longer
exist.
* src/workbook-edit.c (workbook_finish_editing, entry_changed,
workbook_start_editing_at_cursor): entry must now be cast to
GtkEntry.
(workbook_start_editing_at_cursor): Attach scg to
ExprEntry. wbcg->select_abs_col and select_abs_row no longer
exist.
(workbook_edit_select_absolute): Move to ExprEntry widget.
(workbook_edit_toggle_absolute): New function. Probably remove it
again.
(workbook_edit_init): Remove redundant 'g_assert != NULL'. Use
GnumericExprEntry widget.
2001-04-17 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (wbcg_init_state) : implement.
......
2001-04-18 Jon K Hellan <hellan@acm.org>
* dialog-define-names.c (struct NameGuruState): Change type of
expr_text to GnumericExprEntry.
(name_guru_set_expr, name_guru_update_sensitivity,
name_guru_set_expr, cb_name_guru_add): expr_text must now be cast
to GTK_ENTRY.
(cb_name_guru_value_focus): Use
gnumeric_expr_entry_set_absolute. w argument is now expected to be
a GnumericExprEntry.
(cb_name_guru_set_focus): New function. Make anted selection go
away when a widget other than expr_text receives focus.
(name_guru_init): Create a GnumericExprEntry and insert in the
dialog. Attach it to the current sheet. Connect
cb_name_guru_set_focus to dialog's set-focus signal, and remove
the focus-in handler from name_value.
* dialog-function-wizard.c (struct ArgumentState): Change type of
entry to GnumericExprEntry.
(formula_guru_set_expr): Change type of new_entry to
GnumericExprEntry. Cast to GTK_ENTRY where necessary.
(formula_guru_set_expr, cb_formula_guru_rolled_entry_changed,
cb_formula_guru_entry_changed, formula_guru_init):
ArgumentState->entry must now be cast to GTK_ENTRY.
(formula_guru_set_rolled_state): Change type of new_entry to
GnumericExprEntry. Cast to GTK_ENTRY where necessary.
(formula_guru_arg_new): Create a GnumericExprEntry instead of a
GtkEntry and insert in the dialog. Attach it to the current sheet.
(formula_guru_init): Create a GnumericExprEntry for rolled_entry
and insert in the dialog. Attach it to the current sheet.
(dialog_formula_guru): Value returned by workbook_get_entry must
now be cast to GTK_ENTRY.
* formula-guru.glade: Remove 'rolled_entry' GtkEntry. A
GnumericExprEntry is now added at runtime instead.
* names.glade: Remove 'expr_text' GtkEntry. A GnumericExprEntry is
now added at runtime instead.
2001-04-14 Almer S. Tigelaar <almer@gnome.org>
* dialog-autoformat.c (previews_load) : Create previewgrid and
......
......@@ -21,6 +21,7 @@
#include "workbook-edit.h"
#include "gnumeric-util.h"
#include "parse-util.h"
#include "widgets/gnumeric-expr-entry.h"
#define LIST_KEY "name_list_data"
......@@ -34,7 +35,7 @@ typedef struct {
GtkWidget *dialog;
GtkList *list;
GtkEntry *name;
GtkEntry *expr_text;
GnumericExprEntry *expr_text;
GtkCombo *scope;
GList *expr_names;
NamedExpression *cur_name;
......@@ -177,11 +178,11 @@ name_guru_set_expr (NameGuruState *state, NamedExpression *expr_name)
/* Display the expr_text */
txt = expr_name_value (expr_name);
gtk_entry_set_text (state->expr_text, txt);
gtk_entry_set_text (GTK_ENTRY (state->expr_text), txt);
g_free (txt);
} else {
gtk_entry_set_text (state->name, "");
gtk_entry_set_text (state->expr_text, "");
gtk_entry_set_text (GTK_ENTRY (state->expr_text), "");
}
/* unblock them */
......@@ -264,7 +265,7 @@ name_guru_update_sensitivity (NameGuruState *state, gboolean update_entries)
return;
name = gtk_entry_get_text (state->name);
expr_text = gtk_entry_get_text (state->expr_text);
expr_text = gtk_entry_get_text (GTK_ENTRY (state->expr_text));
/** Add is active if :
* - We have a name in the entry to add
......@@ -439,7 +440,7 @@ cb_name_guru_add (NameGuruState *state)
g_return_val_if_fail (state != NULL, FALSE);
expr_text = gtk_entry_get_text (state->expr_text);
expr_text = gtk_entry_get_text (GTK_ENTRY (state->expr_text));
name = gtk_entry_get_text (state->name);
if (!name || (name[0] == '\0'))
......@@ -494,11 +495,10 @@ cb_name_guru_add (NameGuruState *state)
static void
cb_name_guru_value_focus (GtkWidget *w, GdkEventFocus *ev, NameGuruState *state)
{
GtkEntry *entry = GTK_ENTRY (w);
if (entry == state->expr_text) {
if (w == GTK_WIDGET (state->expr_text)) {
workbook_set_entry (state->wbcg, state->expr_text);
workbook_edit_select_absolute (state->wbcg);
gnumeric_expr_entry_set_absolute (state->expr_text);
} else
workbook_set_entry (state->wbcg, NULL);
}
......@@ -567,10 +567,23 @@ cb_name_guru_destroy (GtkObject *w, NameGuruState *state)
return FALSE;
}
static void
cb_name_guru_set_focus (GtkWidget *window, GtkWidget *focus_widget,
NameGuruState *state)
{
if (GNUMERIC_IS_EXPR_ENTRY (focus_widget)) {
workbook_set_entry (state->wbcg,