[evolution/gnome-3-16] Bug 750710 - Text colour in composer is sometimes grey



commit 01020f26b753312ddc39543c67f5ccf35a3aea54
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Jun 10 15:45:08 2015 +0200

    Bug 750710 - Text colour in composer is sometimes grey
    
    Connect the style_updated_cb function to the state-flags-changed signal as well.
    
    Also move the calls to style_updated_cb in e_html_editor_view_set_html_mode
    to one place to avoid duplication.

 e-util/e-html-editor-view.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index da78011..b18c784 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -9531,7 +9531,6 @@ e_html_editor_view_set_html_mode (EHTMLEditorView *view,
                document, "blockquote[type|=cite]", NULL);
 
        if (view->priv->html_mode) {
-               style_updated_cb (view);
                if (blockquote)
                        e_html_editor_view_dequote_plain_text (view);
 
@@ -9566,16 +9565,14 @@ e_html_editor_view_set_html_mode (EHTMLEditorView *view,
                                        webkit_dom_document_get_document_element (document)),
                                plain,
                                NULL);
-                       style_updated_cb (view);
                        e_html_editor_selection_restore (selection);
                        e_html_editor_view_force_spell_check_in_viewport (view);
-               } else {
-                       style_updated_cb (view);
                }
 
                g_free (plain);
        }
 
+       style_updated_cb (view);
  out:
        remove_whole_event_history (view);
 
@@ -9721,6 +9718,10 @@ e_html_editor_view_init (EHTMLEditorView *view)
                view, "style-updated",
                G_CALLBACK (style_updated_cb), NULL);
 
+       g_signal_connect (
+               view, "state-flags-changed",
+               G_CALLBACK (style_updated_cb), NULL);
+
        view->priv->selection = g_object_new (
                E_TYPE_HTML_EDITOR_SELECTION,
                "html-editor-view", view,


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