[evolution/evolution-3-12] Bug 737791 - Adapt to changed GtkStateFlags semantics for expanders



commit b36bbe88dd9f23d6a2329902ffad05093ba859c5
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Oct 4 20:18:24 2014 -0400

    Bug 737791 - Adapt to changed GtkStateFlags semantics for expanders
    
    GTK 3.13.7 broke backward-compat on which state flag controls how an
    expander is drawn.
    
    Older versions used GTK_STATE_FLAG_ACTIVE, 3.13.7 and later changed it
    to GTK_STATE_FLAG_CHECKED.
    
    See https://bugzilla.gnome.org/733967 for details.
    
    (cherry picked from commit a8c4c6c34f24dfd133a0e6d0c5af8e4dafeb2778)

 e-util/e-cell-tree.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-cell-tree.c b/e-util/e-cell-tree.c
index ba5b132..ce470ea 100644
--- a/e-util/e-cell-tree.c
+++ b/e-util/e-cell-tree.c
@@ -227,8 +227,20 @@ draw_expander (ECellTreeView *ectv,
                        break;
        }
 
-       if (expander_style == GTK_EXPANDER_EXPANDED)
+       /* XXX GTK 3.13.7 broke backward-compat on which state flag controls
+        *     how an expander is drawn.
+        *
+        *     Older versions used GTK_STATE_FLAG_ACTIVE, 3.13.7 and later
+        *     changed it to GTK_STATE_FLAG_CHECKED.
+        *
+        *     See https://bugzilla.gnome.org/733967 for details. */
+       if (expander_style == GTK_EXPANDER_EXPANDED) {
+#if GTK_CHECK_VERSION(3,13,7)
+               flags |= GTK_STATE_FLAG_CHECKED;
+#else
                flags |= GTK_STATE_FLAG_ACTIVE;
+#endif
+       }
 
        gtk_style_context_set_state (style_context, flags);
 


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