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

no need to get fancy with finish_edit. While editing none of this can be

2001-11-03  Jody Goldberg <jgoldberg@home.com>

	* src/item-cursor.c (item_cursor_selection_event) : no need to get
	fancy with finish_edit.  While editing none of this can be called.

	* src/sheet-object-container.c (cb_user_activation_request) : return
	  value is ignored.

	* src/sheet-control-gui.c (scg_mode_edit_object) : accept any
	  pending edits.
parent caff6bd5
2001-11-03 Jody Goldberg <jgoldberg@home.com>
* src/item-cursor.c (item_cursor_selection_event) : no need to get
fancy with finish_edit. While editing none of this can be called.
* src/sheet-object-container.c (cb_user_activation_request) : return
value is ignored.
* src/sheet-control-gui.c (scg_mode_edit_object) : accept any
pending edits.
2001-11-02 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object-bonobo.c (open_cb) : support cancel.
......
2001-11-03 Jody Goldberg <jgoldberg@home.com>
* src/item-cursor.c (item_cursor_selection_event) : no need to get
fancy with finish_edit. While editing none of this can be called.
* src/sheet-object-container.c (cb_user_activation_request) : return
value is ignored.
* src/sheet-control-gui.c (scg_mode_edit_object) : accept any
pending edits.
2001-11-02 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object-bonobo.c (open_cb) : support cancel.
......
2001-11-03 Jody Goldberg <jgoldberg@home.com>
* src/item-cursor.c (item_cursor_selection_event) : no need to get
fancy with finish_edit. While editing none of this can be called.
* src/sheet-object-container.c (cb_user_activation_request) : return
value is ignored.
* src/sheet-control-gui.c (scg_mode_edit_object) : accept any
pending edits.
2001-11-02 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object-bonobo.c (open_cb) : support cancel.
......
2001-11-03 Jody Goldberg <jgoldberg@home.com>
* src/item-cursor.c (item_cursor_selection_event) : no need to get
fancy with finish_edit. While editing none of this can be called.
* src/sheet-object-container.c (cb_user_activation_request) : return
value is ignored.
* src/sheet-control-gui.c (scg_mode_edit_object) : accept any
pending edits.
2001-11-02 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object-bonobo.c (open_cb) : support cancel.
......
......@@ -747,8 +747,6 @@ item_cursor_selection_event (GnomeCanvasItem *item, GdkEvent *event)
gnome_canvas_item_ungrab (item, event->button.time);
gdk_flush ();
wbcg_edit_finish (ic->scg->wbcg, TRUE);
if (sheet_is_region_empty (sheet, &ic->pos))
return TRUE;
......@@ -853,6 +851,11 @@ item_cursor_selection_event (GnomeCanvasItem *item, GdkEvent *event)
}
case GDK_BUTTON_PRESS:
/* NOTE : this can not be called while we are editing. because
* the point routine excludes events. so we do not need to
* call wbcg_edit_finish.
*/
/* scroll wheel events dont have corresponding release events */
if (event->button.button > 3)
return FALSE;
......@@ -1302,7 +1305,6 @@ item_cursor_autofill_event (GnomeCanvasItem *item, GdkEvent *event)
gnome_canvas_item_ungrab (item, event->button.time);
gdk_flush ();
wbcg_edit_finish (ic->scg->wbcg, TRUE);
cmd_autofill (sc->wbc, sc->sheet,
event->button.state & GDK_CONTROL_MASK,
ic->base.col, ic->base.row,
......
......@@ -824,7 +824,7 @@ item_grid_button_1 (SheetControlGUI *scg, GdkEventButton *event,
/* This was a regular click on a cell on the spreadsheet. Select it.
* but only if the entered expression is valid
*/
if (wbcg_edit_finish (scg->wbcg, TRUE) == FALSE)
if (!wbcg_edit_finish (scg->wbcg, TRUE))
return 1;
if (!(event->state & (GDK_CONTROL_MASK|GDK_SHIFT_MASK)))
......
......@@ -1526,7 +1526,8 @@ scg_mode_edit_object (SheetControlGUI *scg, SheetObject *so)
g_return_if_fail (IS_SHEET_OBJECT (so));
if (scg_mode_clear (scg)) {
if (wbcg_edit_finish (scg->wbcg, TRUE) &&
scg_mode_clear (scg)) {
view = sheet_object_get_view (so, SHEET_CONTROL (scg));
scg->current_object = so;
if (SO_CLASS (so)->set_active != NULL)
......@@ -2516,6 +2517,9 @@ scg_cursor_move_to (SheetControlGUI *scg, int col, int row,
{
Sheet *sheet = ((SheetControl *) scg)->sheet;
if (!wbcg_edit_finish (scg->wbcg, TRUE))
return;
/*
* Please note that the order here is important, as
* the sheet_make_cell_visible call might scroll the
......@@ -2527,14 +2531,10 @@ scg_cursor_move_to (SheetControlGUI *scg, int col, int row,
*
* If you dont know what this means, just mail me.
*/
/* Set the cursor BEFORE making it visible to decrease flicker */
if (wbcg_edit_finish (scg->wbcg, TRUE) == FALSE)
return;
if (clear_selection)
sheet_selection_reset (sheet);
/* Set the cursor BEFORE making it visible to decrease flicker */
sheet_cursor_set (sheet, col, row, col, row, col, row, NULL);
sheet_make_cell_visible (sheet, col, row);
......
......@@ -31,15 +31,13 @@
#include <bonobo/bonobo-object-directory.h>
#include <bonobo/bonobo-exception.h>
static gint
static void
cb_user_activation_request (BonoboViewFrame *view_frame, GtkObject *so_view)
{
SheetControlGUI *scg = sheet_object_view_control (so_view);
SheetObject *so = sheet_object_view_obj (so_view);
scg_mode_edit_object (scg, so);
return FALSE;
}
static GtkObject *
......
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