[gtksourceview] view: better handle a NULL StyleScheme



commit 94ea1574e427149e95589b3b835bab20ebedfa6e
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Jun 12 16:17:58 2016 +0200

    view: better handle a NULL StyleScheme
    
    Instead of keeping the colors of the previous StyleScheme, it's better
    to unset the colors so that it's consistent with the NULL StyleScheme
    state. It is now anyway documented that setting a NULL StyleScheme is
    not a good idea.

 gtksourceview/gtksourceview.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index 7da924f..86616fd 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -5004,6 +5004,7 @@ update_background_pattern_color (GtkSourceView *view)
 {
        if (view->priv->style_scheme == NULL)
        {
+               view->priv->background_pattern_color_set = FALSE;
                return;
        }
 
@@ -5017,6 +5018,7 @@ update_current_line_color (GtkSourceView *view)
 {
        if (view->priv->style_scheme == NULL)
        {
+               view->priv->current_line_color_set = FALSE;
                return;
        }
 


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