[evolution] EHTMLEditorSelection - Warning emitted when going through element with font size set in increment



commit 31496c9a95e34c5b4c49e13e79959cf995fba80d
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Jul 31 10:31:16 2015 +0200

    EHTMLEditorSelection - Warning emitted when going through element with font size set in increment
    
    We don't support font size increments (+2,-2), but when going through a content
    that was not written in Evolution we can find it. In this case just report the
    normal size.

 e-util/e-html-editor-selection.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 5339afb..9b6b93b 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -3426,6 +3426,7 @@ e_html_editor_selection_get_font_size (EHTMLEditorSelection *selection)
 {
        gchar *size;
        guint size_int;
+       gboolean increment;
 
        g_return_val_if_fail (
                E_IS_HTML_EDITOR_SELECTION (selection),
@@ -3437,10 +3438,15 @@ e_html_editor_selection_get_font_size (EHTMLEditorSelection *selection)
                return E_HTML_EDITOR_SELECTION_FONT_SIZE_NORMAL;
        }
 
+       /* We don't support increments, but when going through a content that
+        * was not written in Evolution we can find it. In this case just report
+        * the normal size. */
+       /* FIXME: go through all parent and get the right value. */
+       increment = size[0] == '+' || size[0] == '-';
        size_int = atoi (size);
        g_free (size);
 
-       if (size_int == 0)
+       if (increment || size_int == 0)
                return E_HTML_EDITOR_SELECTION_FONT_SIZE_NORMAL;
 
        return size_int;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]