[gnumeric] Show range selection cursors also on other sheets.
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Show range selection cursors also on other sheets.
- Date: Sun, 27 Nov 2011 03:05:36 +0000 (UTC)
commit 2a57e95e9958a71e9103991b69114853fc4c2faf
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Sat Nov 26 20:04:32 2011 -0700
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
NEWS | 3 ++-
src/widgets/ChangeLog | 6 ++++++
src/widgets/gnumeric-expr-entry.c | 26 +++++++++++++++++++-------
3 files changed, 27 insertions(+), 8 deletions(-)
---
diff --git a/NEWS b/NEWS
index b1563bc..dfe9e52 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,8 @@
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]
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 4479d3c..2c09748 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 411605a..1aef866 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]