Commit 2a57e95e authored by Andreas J. Guelzow 's avatar Andreas J. Guelzow

Show range selection cursors also on other sheets.

2011-11-26  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* gnumeric-expr-entry.c (gnm_expr_entry_colour_ranges): also add cursors
	to other sheets of the same workbook
	(gee_destroy_feedback_range): remove from all sheets
parent 2a071307
Gnumeric 1.11.1
Andreas:
* Show range selection cursors even while selecting new regions
* Show range selection cursors even while selecting new regions and
on other sheets.
Jean:
* Fixed expression range cursor behavior. [#664852]
......
2011-11-26 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* gnumeric-expr-entry.c (gnm_expr_entry_colour_ranges): also add cursors
to other sheets of the same workbook
(gee_destroy_feedback_range): remove from all sheets
2011-11-25 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* gnumeric-expr-entry.c (gnm_expr_entry_colour_ranges): new
......
......@@ -581,8 +581,14 @@ cb_entry_activate (GnmExprEntry *gee)
static void
gee_destroy_feedback_range (GnmExprEntry *gee)
{
SCG_FOREACH_PANE (gee->scg, pane,
gnm_pane_expr_cursor_stop (pane););
WBCGtk *wbcg = scg_wbcg (gee->scg);
int page, pages = wbcg_get_n_scg (wbcg);
for (page = 0; page < pages; page++) {
SheetControlGUI *scg = wbcg_get_nth_scg (wbcg, page);
SCG_FOREACH_PANE (scg, pane,
gnm_pane_expr_cursor_stop (pane););
}
}
static void
......@@ -607,6 +613,7 @@ gnm_expr_entry_colour_ranges (GnmExprEntry *gee, int start, int end, GnmRangeRef
GnmRange const *merge; /*[#127415]*/
Sheet *start_sheet, *end_sheet;
Sheet *sheet = scg_sheet (gee->scg);
SheetControlGUI *scg = NULL;
colour = colour % G_N_ELEMENTS (colours);
......@@ -614,15 +621,20 @@ gnm_expr_entry_colour_ranges (GnmExprEntry *gee, int start, int end, GnmRangeRef
&start_sheet,
&end_sheet,
&r);
if (start_sheet != sheet ||
end_sheet != sheet)
if (start_sheet != end_sheet)
return;
if (range_is_singleton (&r) &&
NULL != (merge = gnm_sheet_merge_is_corner
(sheet, &r.start)))
(start_sheet, &r.start)))
r = *merge;
SCG_FOREACH_PANE (gee->scg, pane, gnm_pane_expr_cursor_bound_set (pane, &r, colours[colour].name););
if (start_sheet == sheet)
scg = gee->scg;
else {
WBCGtk *wbcg = scg_wbcg (gee->scg);
scg = wbcg_get_nth_scg (wbcg, start_sheet->index_in_wb);
}
SCG_FOREACH_PANE (scg, pane, gnm_pane_expr_cursor_bound_set (pane, &r, colours[colour].name););
at = pango_attr_foreground_new (colours[colour].red, colours[colour].green, colours[colour].blue);
at->start_index = gtk_entry_text_index_to_layout_index (entry, start);
......
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