[gtk+] container: Don't add classes twice
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] container: Don't add classes twice
- Date: Fri, 11 Sep 2015 16:33:35 +0000 (UTC)
commit 44460cd7207692e73f4374865a34314800ec2856
Author: Garrett Regier <garrettregier gmail com>
Date: Fri Sep 11 16:13:45 2015 +0200
container: Don't add classes twice
_gtk_widget_create_path() already adds the style classes.
gtk/gtkcontainer.c | 19 +------------------
1 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 76b8937..16337b5 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -2755,28 +2755,11 @@ static GtkWidgetPath *
gtk_container_real_get_path_for_child (GtkContainer *container,
GtkWidget *child)
{
- GtkStyleContext *context;
GtkWidgetPath *path;
- GList *classes;
- GtkWidget *widget = (GtkWidget *)container;
+ GtkWidget *widget = GTK_WIDGET (container);
- context = _gtk_widget_get_style_context (widget);
path = _gtk_widget_create_path (widget);
- /* Copy any permanent classes to the path */
- classes = gtk_style_context_list_classes (context);
-
- while (classes)
- {
- GList *cur;
-
- cur = classes;
- classes = classes->next;
-
- gtk_widget_path_iter_add_class (path, -1, cur->data);
- g_list_free_1 (cur);
- }
-
gtk_widget_path_append_for_widget (path, child);
return path;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]