widget: Don't cache widget paths all the time

Add an internal API that allows GtkStyleContext to create a widget path
for the widget and with that bypassing gtk_widget_get_path() and that
  function caching the path.
This commit is contained in:
Benjamin Otte
2012-04-07 14:15:35 +02:00
parent 6ac754cdd1
commit 33f111a47c
10 changed files with 53 additions and 37 deletions

View File

@ -2338,7 +2338,7 @@ gtk_container_real_get_path_for_child (GtkContainer *container,
GList *classes;
context = gtk_widget_get_style_context (GTK_WIDGET (container));
path = gtk_widget_path_copy (gtk_widget_get_path (GTK_WIDGET (container)));
path = _gtk_widget_create_path (GTK_WIDGET (container));
/* Copy any permanent classes to the path */
classes = gtk_style_context_list_classes (context);