[glade] glade-gtk-notebook.c: Fixed warning about imbalanced children



commit a190f19ed7b21470af78c0b8f07359bdf6a7f545
Author: Tristan Van Berkom <tristan upstairslabs com>
Date:   Mon Dec 14 15:16:18 2015 +0900

    glade-gtk-notebook.c: Fixed warning about imbalanced children
    
    Now that there is a new special child type, only remove "tab"
    widgets when extracting the children. This ugly loop is there
    to ensure that the right tab is matched with it's page when
    changing the notebook children during undo/redo, and also to
    handle the case where positions of notebook tabs are not
    specified in the datamodel (yet) because the notebook is
    being loaded from a file and the appearance of tabs in
    the loaded file should be used.
    
    In any case, this small commit fixes the undo/redo console
    warnings when undoing/redoing the addition/removal of children
    from the new start action / end action positions.

 plugins/gtk+/glade-gtk-notebook.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/gtk+/glade-gtk-notebook.c b/plugins/gtk+/glade-gtk-notebook.c
index f97f4d3..b685d0c 100644
--- a/plugins/gtk+/glade-gtk-notebook.c
+++ b/plugins/gtk+/glade-gtk-notebook.c
@@ -218,7 +218,7 @@ glade_gtk_notebook_extract_children (GtkWidget * notebook)
                     (nchildren->children, list->data,
                      (GCompareFunc) notebook_child_compare_func);
             }
-          else
+          else if (!strcmp (special_child_type, "tab"))
             {
               if (g_list_find_custom (nchildren->tabs,
                                       GINT_TO_POINTER (position),


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