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



commit 5ede1812b69b7262f74bce3b01b0d02de86afdcc
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 7f19de4..4f0829c 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -1918,23 +1918,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]