container: Don't add classes twice

_gtk_widget_create_path() already adds the style classes.
This commit is contained in:
Garrett Regier 2015-09-11 16:13:45 +02:00 committed by Benjamin Otte
parent 4539804086
commit 44460cd720

View File

@ -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;