Commit 44460cd7 authored by Garrett Regier's avatar Garrett Regier Committed by Benjamin Otte

container: Don't add classes twice

_gtk_widget_create_path() already adds the style classes.
parent 45398040
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment