[gtk+] widget: Prepend style classes to list when parsing
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] widget: Prepend style classes to list when parsing
- Date: Tue, 21 Mar 2017 18:04:35 +0000 (UTC)
commit 1aa37687be0cbf841eedda7aff7223f9ece4ab2f
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 9ce65ba..4b00503 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -12576,7 +12576,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]