Commit d75141a4 authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Arturo Espinosa

fix, fore_color was assigned twice, and back_color never.

1998-10-02  Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>

	* src/dialog-cell-format.c (apply_coloring_format): fix,
	fore_color was assigned twice, and back_color never.

1998-10-02  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/item-grid.h: ItemGridSelectionType: new enumeration type
	used for item_grid->selecting to avoid shutting down entirely the
	formula selection range on mouse release.
parent a1823a91
1998-10-02 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* src/dialog-cell-format.c (apply_coloring_format): fix,
fore_color was assigned twice, and back_color never.
1998-10-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/item-grid.h: ItemGridSelectionType: new enumeration type
used for item_grid->selecting to avoid shutting down entirely the
formula selection range on mouse release.
1998-10-02 Vincent Renardias <vincent@waw.com>
* Changed 'es@mx' into 'es_MX' for locale stuff in
......
1998-10-02 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* src/dialog-cell-format.c (apply_coloring_format): fix,
fore_color was assigned twice, and back_color never.
1998-10-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/item-grid.h: ItemGridSelectionType: new enumeration type
used for item_grid->selecting to avoid shutting down entirely the
formula selection range on mouse release.
1998-10-02 Vincent Renardias <vincent@waw.com>
* Changed 'es@mx' into 'es_MX' for locale stuff in
......
1998-10-02 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* src/dialog-cell-format.c (apply_coloring_format): fix,
fore_color was assigned twice, and back_color never.
1998-10-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/item-grid.h: ItemGridSelectionType: new enumeration type
used for item_grid->selecting to avoid shutting down entirely the
formula selection range on mouse release.
1998-10-02 Vincent Renardias <vincent@waw.com>
* Changed 'es@mx' into 'es_MX' for locale stuff in
......
1998-10-02 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* src/dialog-cell-format.c (apply_coloring_format): fix,
fore_color was assigned twice, and back_color never.
1998-10-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/item-grid.h: ItemGridSelectionType: new enumeration type
used for item_grid->selecting to avoid shutting down entirely the
formula selection range on mouse release.
1998-10-02 Vincent Renardias <vincent@waw.com>
* Changed 'es@mx' into 'es_MX' for locale stuff in
......
......@@ -2,6 +2,10 @@
GNOME Spread Sheet task list
* Modified status
We need to keep track of modifications to the workbook.
* Number formatting
The formatting code should take the current GtkFont for the cell
......
......@@ -706,7 +706,7 @@ apply_coloring_format (Style *style, Sheet *sheet, CellList *cells)
style->valid_flags |= STYLE_FORE_COLOR | STYLE_PATTERN | STYLE_BACK_COLOR;
style->fore_color = style_color_new (fore_red, fore_green, fore_blue);
style->fore_color = style_color_new (back_red, back_green, back_blue);
style->back_color = style_color_new (back_red, back_green, back_blue);
}
static struct {
......
......@@ -706,7 +706,7 @@ apply_coloring_format (Style *style, Sheet *sheet, CellList *cells)
style->valid_flags |= STYLE_FORE_COLOR | STYLE_PATTERN | STYLE_BACK_COLOR;
style->fore_color = style_color_new (fore_red, fore_green, fore_blue);
style->fore_color = style_color_new (back_red, back_green, back_blue);
style->back_color = style_color_new (back_red, back_green, back_blue);
}
static struct {
......
......@@ -23,6 +23,10 @@ enum {
ARG_SHEET_VIEW,
};
enum {
SELECTING_CELL_RANGE
};
static void
item_grid_destroy (GtkObject *object)
{
......@@ -592,6 +596,7 @@ item_grid_button_1 (Sheet *sheet, GdkEvent *event, ItemGrid *item_grid, int col,
*/
if (gnumeric_sheet_can_move_cursor (gsheet)){
gnumeric_sheet_start_cell_selection (gsheet, col, row);
item_grid->selecting = ITEM_GRID_SELECTING_FORMULA_RANGE;
return 1;
}
......@@ -604,7 +609,7 @@ item_grid_button_1 (Sheet *sheet, GdkEvent *event, ItemGrid *item_grid, int col,
if (!(event->button.state & GDK_CONTROL_MASK))
sheet_selection_reset_only (sheet);
item_grid->selecting = 1;
item_grid->selecting = ITEM_GRID_SELECTING_CELL_RANGE;
sheet_selection_append (sheet, col, row);
gnome_canvas_item_grab (item,
GDK_POINTER_MOTION_MASK |
......@@ -643,15 +648,9 @@ item_grid_event (GnomeCanvasItem *item, GdkEvent *event)
case GDK_BUTTON_RELEASE:
if (event->button.button == 1){
item_grid->selecting = 0;
item_grid->selecting = ITEM_GRID_NO_SELECTION;
gnome_canvas_item_ungrab (item, event->button.time);
/*
* If we were selecting a cell range for a formula-entry
*/
if (gsheet->selecting_cell)
gnumeric_sheet_stop_cell_selection (gsheet);
return 1;
}
break;
......@@ -661,12 +660,12 @@ item_grid_event (GnomeCanvasItem *item, GdkEvent *event)
col = item_grid_find_col (item_grid, x, NULL);
row = item_grid_find_row (item_grid, y, NULL);
if (gsheet->selecting_cell){
if (item_grid->selecting == ITEM_GRID_SELECTING_FORMULA_RANGE){
gnumeric_sheet_selection_extend (gsheet, col, row);
return 1;
}
if (!item_grid->selecting)
if (item_grid->selecting == ITEM_GRID_NO_SELECTION)
return 1;
if (event->motion.x < 0)
......@@ -725,7 +724,7 @@ item_grid_init (ItemGrid *item_grid)
item_grid->top_row = 0;
item_grid->top_offset = 0;
item_grid->left_offset = 0;
item_grid->selecting = 0;
item_grid->selecting = ITEM_GRID_NO_SELECTION;
}
static void
......
......@@ -5,6 +5,12 @@
#define ITEM_GRID_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), item_grid_get_type ()))
#define IS_ITEM_GRID(o) (GTK_CHECK_TYPE((o), item_grid_get_type ()))
typedef enum {
ITEM_GRID_NO_SELECTION,
ITEM_GRID_SELECTING_CELL_RANGE,
ITEM_GRID_SELECTING_FORMULA_RANGE
} ItemGridSelectionType;
typedef struct {
GnomeCanvasItem canvas_item;
......@@ -15,7 +21,7 @@ typedef struct {
ColType left_col;
RowType top_row;
int selecting;
ItemGridSelectionType selecting;
/* Offset from spreadsheet origin in units */
long top_offset;
......
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