[gnumeric] Remove range hightlighting while not editing expressions. [#625361]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Remove range hightlighting while not editing expressions. [#625361]
- Date: Tue, 27 Jul 2010 20:42:47 +0000 (UTC)
commit 25c33cb468e2eafeb4bc674c2b56802b7736f48d
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Tue Jul 27 14:42:19 2010 -0600
Remove range hightlighting while not editing expressions. [#625361]
2010-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* gnumeric-expr-entry.c (gee_scan_for_range): show all ranges or none.
NEWS | 4 ++-
src/widgets/ChangeLog | 4 ++
src/widgets/gnumeric-expr-entry.c | 64 ++++++++++++++++++-------------------
3 files changed, 38 insertions(+), 34 deletions(-)
---
diff --git a/NEWS b/NEWS
index eae4eee..9f96440 100644
--- a/NEWS
+++ b/NEWS
@@ -47,7 +47,9 @@ Andreas:
* Fix undo of Clear->All and Clear->Comments. [#625151][#623803]
* Add menu items to allow clearing of filtered rows only.
* Fix editing of hyperlinks.
- * Work around OOo's failure to correctly define its named ranges. [#625332]
+ * Work around OOo's failure to correctly define its named ranges.
+ [#625332]
+ * Remove range hightlighting while not editing expressions. [#625361]
Jean:
* Fix strong/weak cursor display. [#623241]
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 260dab5..c6982bb 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * gnumeric-expr-entry.c (gee_scan_for_range): show all ranges or none.
+
2010-07-22 Andreas J. Guelzow <aguelzow pyrshep ca>
* gnumeric-expr-entry.c (gee_set_tooltip): don't remove the completion
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index ddef67a..2ec5158 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -542,39 +542,37 @@ gee_scan_for_range (GnmExprEntry *gee)
parse_pos_init_editpos (&gee->pp, scg_view (gee->scg));
gee_destroy_feedback_range (gee);
- if (!gee->feedback_disabled) {
- if (gee_is_editing (gee)) {
- char const *text = gtk_entry_get_text (gee->entry);
- GnmParsePos pp;
- GnmExprTop const *texpr;
- parse_pos_init_sheet (&pp, sheet);
- if ((texpr = gnm_expr_parse_str
- ((text[0] == '=') ? text+1 : text, &pp, GNM_EXPR_PARSE_DEFAULT,
- sheet_get_conventions (sheet), NULL))!= NULL) {
- GSList *ptr;
- GSList *list = gnm_expr_top_get_ranges (texpr);
- for (ptr = list ; ptr != NULL ; ptr = ptr->next) {
- GnmValue *v = ptr->data;
- GnmRange r;
- GnmRangeRef const *rr = value_get_rangeref (v);
- GnmRange const *merge; /* [#127415] */
- if (rr->a.sheet != NULL && rr->a.sheet != sheet)
- continue;
- if (rr->b.sheet != NULL && rr->b.sheet != sheet)
- continue;
- range_init_rangeref (&r, rr);
- if (range_is_singleton (&r) &&
- NULL != (merge = gnm_sheet_merge_is_corner
- (sheet, &r.start)))
- r = *merge;
- SCG_FOREACH_PANE (gee->scg, pane,
- gnm_pane_expr_cursor_bound_set
- (pane, &r, FALSE););
- }
-
- go_slist_free_custom (list, (GFreeFunc)value_release);
- gnm_expr_top_unref (texpr);
+ if (!gee->feedback_disabled && gee_is_editing (gee)) {
+ char const *text = gtk_entry_get_text (gee->entry);
+ GnmParsePos pp;
+ GnmExprTop const *texpr;
+ parse_pos_init_sheet (&pp, sheet);
+ if ((texpr = gnm_expr_parse_str
+ ((text[0] == '=') ? text+1 : text, &pp, GNM_EXPR_PARSE_DEFAULT,
+ sheet_get_conventions (sheet), NULL))!= NULL) {
+ GSList *ptr;
+ GSList *list = gnm_expr_top_get_ranges (texpr);
+ for (ptr = list ; ptr != NULL ; ptr = ptr->next) {
+ GnmValue *v = ptr->data;
+ GnmRange r;
+ GnmRangeRef const *rr = value_get_rangeref (v);
+ GnmRange const *merge; /* [#127415] */
+ if (rr->a.sheet != NULL && rr->a.sheet != sheet)
+ continue;
+ if (rr->b.sheet != NULL && rr->b.sheet != sheet)
+ continue;
+ range_init_rangeref (&r, rr);
+ if (range_is_singleton (&r) &&
+ NULL != (merge = gnm_sheet_merge_is_corner
+ (sheet, &r.start)))
+ r = *merge;
+ SCG_FOREACH_PANE (gee->scg, pane,
+ gnm_pane_expr_cursor_bound_set
+ (pane, &r, FALSE););
}
+
+ go_slist_free_custom (list, (GFreeFunc)value_release);
+ gnm_expr_top_unref (texpr);
}
gnm_expr_entry_find_range (gee);
if (gnm_expr_entry_get_rangesel (gee, &range, &parse_sheet) &&
@@ -584,7 +582,7 @@ gee_scan_for_range (GnmExprEntry *gee)
NULL != (merge = gnm_sheet_merge_is_corner
(parse_sheet, &range.start)))
range = *merge;
-
+
SCG_FOREACH_PANE (gee->scg, pane,
gnm_pane_expr_cursor_bound_set
(pane, &range, TRUE););
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]