[gtk+/gtk-3-22] widget: Prepend style classes to list when parsing



commit 92fd8cb81bda42abd2d7db83f59439e545a65cc1
Author: Timm Bäder <mail baedert org>
Date:   Tue Mar 21 14:40:21 2017 +0100

    widget: Prepend style classes to list when parsing
    
    Since the later gtk_style_context_add_class doesn't care about the order
    of the style classes, we can as well just prepend style classes to the
    list and avoid the squared behavior when appending to a linked list.

 gtk/gtkwidget.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index fb18504..da9c2b2 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -14348,7 +14348,7 @@ style_start_element (GMarkupParseContext  *context,
           return;
         }
 
-      data->classes = g_slist_append (data->classes, g_strdup (name));
+      data->classes = g_slist_prepend (data->classes, g_strdup (name));
     }
   else if (strcmp (element_name, "style") == 0)
     {


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