[gtksourceview] Ignore deprecation for gtk_style_context_invalidate()



commit a5fb82863347d2439982a952e19c97f9435beddc
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Oct 26 21:05:27 2013 +0200

    Ignore deprecation for gtk_style_context_invalidate()
    
    The style context must explicitly be invalidated, because sometimes we
    request a value directly.
    
    With GTK+ 4, normally we can just remove the calls to invalidate().

 gtksourceview/gtksourcestylescheme.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcestylescheme.c b/gtksourceview/gtksourcestylescheme.c
index c0f652b..02b56f5 100644
--- a/gtksourceview/gtksourcestylescheme.c
+++ b/gtksourceview/gtksourcestylescheme.c
@@ -733,7 +733,10 @@ _gtk_source_style_scheme_apply (GtkSourceStyleScheme *scheme,
                                        GTK_STYLE_PROVIDER (scheme->priv->css),
                                        GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 
+       G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+       /* See https://bugzilla.gnome.org/show_bug.cgi?id=708583 */
        gtk_style_context_invalidate (context);
+       G_GNUC_END_IGNORE_DEPRECATIONS;
 
        style = gtk_source_style_scheme_get_style (scheme, STYLE_LINE_NUMBERS);
        set_line_numbers_style (widget, style);
@@ -764,7 +767,12 @@ _gtk_source_style_scheme_unapply (GtkSourceStyleScheme *scheme,
        context = gtk_widget_get_style_context (GTK_WIDGET (widget));
        gtk_style_context_remove_provider (context,
                                           GTK_STYLE_PROVIDER (scheme->priv->css));
+
+       G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+       /* See https://bugzilla.gnome.org/show_bug.cgi?id=708583 */
        gtk_style_context_invalidate (context);
+       G_GNUC_END_IGNORE_DEPRECATIONS;
+
        set_line_numbers_style (widget, NULL);
        update_cursor_colors (widget, NULL, NULL);
 }


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