[gtk+] GtkStack: Fix an oversight in child renaming



commit cd8576ec1920f73098c33df75d4e037305cc3e11
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Nov 18 13:36:16 2014 +0100

    GtkStack: Fix an oversight in child renaming
    
    We currently emit a warning if you rename a child to the name
    it already has. We shouldn't do that.

 gtk/gtkstack.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 485d8a9..130426c 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -650,6 +650,8 @@ gtk_stack_set_child_property (GtkContainer *container,
       for (l = priv->children; l != NULL; l = l->next)
         {
           info2 = l->data;
+          if (info == info2)
+            continue;
           if (g_strcmp0 (info2->name, name) == 0)
             {
               g_warning ("Duplicate child name in GtkStack: %s\n", name);


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