Commit 4ded61c3 authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Arturo Espinosa

Add base_col and base_row arguments. Move cursor to that location, so that

1998-10-07  Jakub Jelinek  <jj@ultra.penguin.cz>

	* src/sheet.c (sheet_cursor_set): Add base_col and
	base_row arguments. Move cursor to that location, so
	that it really reflects base of the selection.

	* src/sheet.h (sheet_cursor_set): Ditto.

	* src/clipboard.c (x_selection_received): Callers changed.

	* src/gnumeric-sheet.c (gnumeric_sheet_set_selection): Ditto.
	(move_cursor): Ditto.

	* src/item-cursor.c (item_cursor_autofill_event): Ditto.
	(item_cursor_init): Fix a typo.
parent 02f2688e
1998-10-07 Jakub Jelinek <jj@ultra.penguin.cz>
* src/sheet.c (sheet_cursor_set): Add base_col and
base_row arguments. Move cursor to that location, so
that it really reflects base of the selection.
* src/sheet.h (sheet_cursor_set): Ditto.
* src/clipboard.c (x_selection_received): Callers changed.
* src/gnumeric-sheet.c (gnumeric_sheet_set_selection): Ditto.
(move_cursor): Ditto.
* src/item-cursor.c (item_cursor_autofill_event): Ditto.
(item_cursor_init): Fix a typo.
1998-10-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet-object.c (create_object): Rectangles have the same
......
1998-10-07 Jakub Jelinek <jj@ultra.penguin.cz>
* src/sheet.c (sheet_cursor_set): Add base_col and
base_row arguments. Move cursor to that location, so
that it really reflects base of the selection.
* src/sheet.h (sheet_cursor_set): Ditto.
* src/clipboard.c (x_selection_received): Callers changed.
* src/gnumeric-sheet.c (gnumeric_sheet_set_selection): Ditto.
(move_cursor): Ditto.
* src/item-cursor.c (item_cursor_autofill_event): Ditto.
(item_cursor_init): Fix a typo.
1998-10-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet-object.c (create_object): Rectangles have the same
......
1998-10-07 Jakub Jelinek <jj@ultra.penguin.cz>
* src/sheet.c (sheet_cursor_set): Add base_col and
base_row arguments. Move cursor to that location, so
that it really reflects base of the selection.
* src/sheet.h (sheet_cursor_set): Ditto.
* src/clipboard.c (x_selection_received): Callers changed.
* src/gnumeric-sheet.c (gnumeric_sheet_set_selection): Ditto.
(move_cursor): Ditto.
* src/item-cursor.c (item_cursor_autofill_event): Ditto.
(item_cursor_init): Fix a typo.
1998-10-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet-object.c (create_object): Rectangles have the same
......
1998-10-07 Jakub Jelinek <jj@ultra.penguin.cz>
* src/sheet.c (sheet_cursor_set): Add base_col and
base_row arguments. Move cursor to that location, so
that it really reflects base of the selection.
* src/sheet.h (sheet_cursor_set): Ditto.
* src/clipboard.c (x_selection_received): Callers changed.
* src/gnumeric-sheet.c (gnumeric_sheet_set_selection): Ditto.
(move_cursor): Ditto.
* src/item-cursor.c (item_cursor_autofill_event): Ditto.
(item_cursor_init): Fix a typo.
1998-10-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet-object.c (create_object): Rectangles have the same
......
......@@ -281,6 +281,7 @@ x_selection_received (GtkWidget *widget, GtkSelectionData *sel, gpointer data)
pc->paste_flags);
sheet_cursor_set (pc->dest_sheet,
pc->dest_col, pc->dest_row,
pc->dest_col, pc->dest_row,
end_col, end_row);
......
......@@ -123,6 +123,7 @@ gnumeric_sheet_set_selection (GnumericSheet *gsheet, SheetSelection *ss)
sheet_cursor_set (
gsheet->sheet_view->sheet,
ss->base_col, ss->base_row,
ss->start_col, ss->start_row,
ss->end_col, ss->end_row);
}
......@@ -145,7 +146,7 @@ move_cursor (GnumericSheet *gsheet, int col, int row, gboolean clear_selection)
if (clear_selection)
sheet_selection_reset_only (sheet);
sheet_cursor_set (sheet, col, row, col, row);
sheet_cursor_set (sheet, col, row, col, row, col, row);
if (clear_selection)
sheet_selection_append (sheet, col, row);
......
......@@ -123,6 +123,7 @@ gnumeric_sheet_set_selection (GnumericSheet *gsheet, SheetSelection *ss)
sheet_cursor_set (
gsheet->sheet_view->sheet,
ss->base_col, ss->base_row,
ss->start_col, ss->start_row,
ss->end_col, ss->end_row);
}
......@@ -145,7 +146,7 @@ move_cursor (GnumericSheet *gsheet, int col, int row, gboolean clear_selection)
if (clear_selection)
sheet_selection_reset_only (sheet);
sheet_cursor_set (sheet, col, row, col, row);
sheet_cursor_set (sheet, col, row, col, row, col, row);
if (clear_selection)
sheet_selection_append (sheet, col, row);
......
......@@ -695,6 +695,7 @@ item_cursor_autofill_event (GnomeCanvasItem *item, GdkEvent *event)
item_cursor->end_col, item_cursor->end_row);
}
sheet_cursor_set (sheet,
item_cursor->base_col, item_cursor->base_row,
item_cursor->base_col, item_cursor->base_row,
item_cursor->end_col, item_cursor->end_row);
sheet_selection_reset_only (sheet);
......@@ -776,7 +777,7 @@ item_cursor_init (ItemCursor *item_cursor)
item_cursor->end_col = 0;
item_cursor->start_row = 0;
item_cursor->end_row = 0;
item_cursor->start_row = ITEM_CURSOR_SELECTION;
item_cursor->style = ITEM_CURSOR_SELECTION;
item_cursor->tag = -1;
item_cursor->visible = 1;
}
......
......@@ -2919,7 +2919,7 @@ sheet_cursor_move (Sheet *sheet, int col, int row)
}
void
sheet_cursor_set (Sheet *sheet, int start_col, int start_row, int end_col, int end_row)
sheet_cursor_set (Sheet *sheet, int base_col, int base_row, int start_col, int start_row, int end_col, int end_row)
{
GList *l;
......@@ -2928,7 +2928,7 @@ sheet_cursor_set (Sheet *sheet, int start_col, int start_row, int end_col, int e
g_return_if_fail (start_col <= end_col);
g_return_if_fail (start_row <= end_row);
sheet_cursor_move (sheet, start_col, start_row);
sheet_cursor_move (sheet, base_col, base_row);
for (l = sheet->sheet_views; l; l = l->next){
GnumericSheet *gsheet = GNUMERIC_SHEET_VIEW (l->data);
......
......@@ -149,6 +149,7 @@ void sheet_foreach_row (Sheet *sheet,
void *user_data);
void sheet_set_zoom_factor (Sheet *sheet, double factor);
void sheet_cursor_set (Sheet *sheet,
int base_col, int base_row,
int start_col, int start_row,
int end_col, int end_row);
void sheet_cursor_move (Sheet *sheet, int col, int row);
......
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