[epiphany] notebook: Fix invalid call to gtk_style_context_get()



commit 235e77de51aa1917a8eff49469537978eed442f7
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Fri Nov 20 16:21:14 2015 -0600

    notebook: Fix invalid call to gtk_style_context_get()
    
    Company:  gtk_style_context_get() (and _get_padding/border/color())
    should only ever be called with the same state as
    gtk_style_context_get_state()
    Company:  usually that's a simple replacing of the old state (like in
    the trace you posted)
    Company:  sometimes it requires calling gtk_style_context_set_sate()
    with the right state first
    Company:  and in very rare cases it needs a gtk_style_context_save()
    before the set_state(), too
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758426

 src/ephy-notebook.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 5cc3bc6..536c5a6 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -547,7 +547,7 @@ tab_label_style_set_cb (GtkWidget *hbox,
 
        context = gtk_widget_get_pango_context (hbox);
        style = gtk_widget_get_style_context (hbox);
-       gtk_style_context_get (style, GTK_STATE_FLAG_NORMAL,
+       gtk_style_context_get (style, gtk_style_context_get_state (style),
                               "font", &font_desc, NULL);
        metrics = pango_context_get_metrics (context,
                                             font_desc,


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