summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-02-07 18:02:15 +0200
committerClaudio Saavedra <csaavedra@igalia.com>2012-02-10 16:39:44 +0200
commite2339f5ebd0f7945e3e3f3d35aa91a27c65a9d6b (patch)
treeb3a9fbadbb0aea798f27a2d93bfe6f5d71030058 /gtk/gtknotebook.c
parent3b1d8beab0c213f7a46d76fcbaa5a93aeb2d0918 (diff)
downloadgtk+-e2339f5ebd0f7945e3e3f3d35aa91a27c65a9d6b.tar.gz
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
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r--gtk/gtknotebook.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index ad2bd66fa3..5be5b7a3b8 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -7980,6 +7980,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));
@@ -8015,7 +8016,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);