mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
container: Don't add classes twice
_gtk_widget_create_path() already adds the style classes.
This commit is contained in:
parent
4539804086
commit
44460cd720
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user