[gtk+/gtk-3-0] gtk: Reset children styles when changing name



commit 320730505b05d3a4d9c1ca55d7ca1b2ef1aa2d2e
Author: Benjamin Otte <otte redhat com>
Date:   Sat Mar 26 14:49:24 2011 +0100

    gtk: Reset children styles when changing name
    
    Changing the name of a widget does not just change the current widget's
    path, but also the path of all its children.

 gtk/gtkwidget.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b74f9ee..bc67013 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -6920,17 +6920,7 @@ gtk_widget_set_name (GtkWidget	 *widget,
   g_free (priv->name);
   priv->name = new_name;
 
-  if (priv->path)
-    {
-      guint pos;
-
-      pos = gtk_widget_path_length (priv->path) - 1;
-      gtk_widget_path_iter_set_name (priv->path, pos,
-                                     priv->name);
-    }
-
-  if (priv->context)
-    gtk_style_context_set_path (priv->context, priv->path);
+  gtk_widget_reset_style (widget);
 
   g_object_notify (G_OBJECT (widget), "name");
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]