[gtk+/gtk-3-2] GtkNotebook: emit child-notify::position a few more times



commit d7daa3cb0dd2bcbe9c11a9df31d09d69bdef3991
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Tue Feb 7 18:02:15 2012 +0200

    GtkNotebook: emit child-notify::position a few more times
    
    When moving a page around, all children changing their position
    need to be notified.
    
    There are still other places where proper notification is missing
    (drag 'n drop, etc.)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669116

 gtk/gtknotebook.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 23e49be..56a7d46 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -7911,6 +7911,7 @@ gtk_notebook_reorder_child (GtkNotebook *notebook,
   GtkNotebookPage *page;
   gint old_pos;
   gint max_pos;
+  gint i;
 
   g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
   g_return_if_fail (GTK_IS_WIDGET (child));
@@ -7946,7 +7947,12 @@ gtk_notebook_reorder_child (GtkNotebook *notebook,
 
   /* Move around the menu items if necessary */
   gtk_notebook_child_reordered (notebook, page);
-  gtk_widget_child_notify (child, "position");
+
+  for (list = priv->children, i = 0; list; list = list->next)
+    {
+      if (MIN (old_pos, position) <= i && i <= MAX (old_pos, position))
+	gtk_widget_child_notify (((GtkNotebookPage *) list->data)->child, "position");
+    }
 
   if (priv->show_tabs)
     gtk_notebook_pages_allocate (notebook);



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