Commit 12607166 authored by Andreas J. Guelzow 's avatar Andreas J. Guelzow

Suppress function tooltips on text-formatted cells. [#638832]

2011-01-16  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* src/commands.c (cmd_set_text_full): do not enter expressions
	into text-formatted cells

2011-01-16  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* gnumeric-expr-entry.c (gee_update_lexer_items): check for text
	formatted cells
parent a8b9d4fe
2011-01-16 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* src/commands.c (cmd_set_text_full): do not enter expressions
into text-formatted cells
2011-01-13 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* src/value.c (find_rows_that_match): only one criteria row has to match!
* src/value.c (find_rows_that_match): only one criteria row has
to match!
2011-01-11 Morten Welinder <terra@gnome.org>
......
......@@ -13,6 +13,7 @@ Andreas:
* Fix locale specific sorting. [#638874]
* Ensure we have sub- and sperscript icons. [#639086]
* Fix advanced filter. [#639444]
* Suppress function tooltips on text-formatted cells. [#638832]
Jean:
* Only disable the formula bar when a chart sheet is selected. [#636031]
......
......@@ -820,16 +820,21 @@ cmd_set_text_full (WorkbookControl *wbc, GSList *selection, GnmEvalPos *ep,
Sheet *sheet = ep->sheet;
GnmParsePos pp;
ColRowIndexList *cri_col_list = NULL, *cri_row_list = NULL;
GOFormat const *format = gnm_style_get_format
(sheet_style_get (sheet, ep->eval.col, ep->eval.row));
g_return_val_if_fail (selection != NULL , TRUE);
parse_pos_init_evalpos (&pp, ep);
name = undo_range_list_name (sheet, selection);
expr_txt = gnm_expr_char_start_p (new_text);
if (expr_txt != NULL)
texpr = gnm_expr_parse_str
(expr_txt, &pp, GNM_EXPR_PARSE_DEFAULT,
sheet_get_conventions (sheet), NULL);
if ((format == NULL) || !go_format_is_text (format)) {
expr_txt = gnm_expr_char_start_p (new_text);
if (expr_txt != NULL)
texpr = gnm_expr_parse_str
(expr_txt, &pp, GNM_EXPR_PARSE_DEFAULT,
sheet_get_conventions (sheet), NULL);
}
if (texpr != NULL) {
GOFormat const *sf;
......@@ -861,9 +866,7 @@ cmd_set_text_full (WorkbookControl *wbc, GSList *selection, GnmEvalPos *ep,
text = g_strdup_printf (_("Inserting expression in %s"), name);
if (go_format_is_general
(gnm_style_get_format
(sheet_style_get (sheet, ep->eval.col, ep->eval.row)))) {
if (go_format_is_general (format)) {
sf = auto_style_format_suggest (texpr, ep);
if (sf != NULL) {
new_style = gnm_style_new ();
......
2011-01-16 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* gnumeric-expr-entry.c (gee_update_lexer_items): check for text
formatted cells
2011-01-15 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* gnm-cell-combo-view.c (gnm_cell_combo_view_popdown): wait for the
......
......@@ -877,6 +877,8 @@ gee_update_lexer_items (GnmExprEntry *gee)
GtkEditable *editable = GTK_EDITABLE (gee->entry);
char *str = gtk_editable_get_chars (editable, 0, -1);
Sheet *sheet = scg_sheet (gee->scg);
GOFormat const *format;
gboolean forced_text;
g_free (gee->lexer_items);
gee->lexer_items = NULL;
......@@ -887,15 +889,19 @@ gee_update_lexer_items (GnmExprEntry *gee)
}
parse_pos_init_editpos (&gee->pp, scg_view (gee->scg));
format = gnm_style_get_format
(sheet_style_get (sheet, gee->pp.eval.col, gee->pp.eval.row));
forced_text = ((format != NULL) && go_format_is_text (format));
if (!gee->feedback_disabled) {
if (!gee->feedback_disabled && !forced_text) {
gee->texpr = gnm_expr_parse_str
((str[0] == '=') ? str+1 : str,
&gee->pp, GNM_EXPR_PARSE_DEFAULT,
sheet_get_conventions (sheet), NULL);
}
gee->tooltip.is_expr = (NULL != gnm_expr_char_start_p (str));
gee->tooltip.is_expr = (!forced_text) &&
(NULL != gnm_expr_char_start_p (str));
if (!(gee->flags & GNM_EE_SINGLE_RANGE)) {
gee->lexer_items = gnm_expr_lex_all
(str, &gee->pp,
......
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