[evolution/wip/webkit-composer: 856/966] Bug 725251: [webkit-composer] Font size combo doesn't reflect cursor position



commit 131ba6c4b25e85ea35ef2c2ed06d0f61f207604b
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Feb 28 12:53:34 2014 +0100

    Bug 725251: [webkit-composer] Font size combo doesn't reflect cursor position

 e-util/e-editor-selection.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index afebbfd..43a9f8e 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -1914,23 +1914,19 @@ e_editor_selection_set_font_name (EEditorSelection *selection,
  guint
 e_editor_selection_get_font_size (EEditorSelection *selection)
 {
+       gchar *size;
        guint size_int;
 
        g_return_val_if_fail (
                E_IS_EDITOR_SELECTION (selection),
                E_EDITOR_SELECTION_FONT_SIZE_NORMAL);
 
-       if (g_strcmp0 (e_editor_selection_get_string (selection), "") == 0) {
-               size_int = selection->priv->font_size;
-       } else {
-               gchar *size = get_font_property (selection, "size");
-               if (!size) {
-                       return E_EDITOR_SELECTION_FONT_SIZE_NORMAL;
-               }
+       size = get_font_property (selection, "size");
+       if (!size)
+               return E_EDITOR_SELECTION_FONT_SIZE_NORMAL;
 
-               size_int = atoi (size);
-               g_free (size);
-       }
+       size_int = atoi (size);
+       g_free (size);
 
        if (size_int == 0)
                return E_EDITOR_SELECTION_FONT_SIZE_NORMAL;


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