Commit 347328ad authored by Claudio Saavedra's avatar Claudio Saavedra

GtkNotebook: emit child-notify::position on drag 'n drop reorder

https://bugzilla.gnome.org/show_bug.cgi?id=669116
parent cb775a6a
......@@ -3185,7 +3185,7 @@ gtk_notebook_stop_reorder (GtkNotebook *notebook)
{
if (priv->during_reorder)
{
gint old_page_num, page_num;
gint old_page_num, page_num, i;
GList *element;
element = get_drop_position (notebook);
......@@ -3194,9 +3194,16 @@ gtk_notebook_stop_reorder (GtkNotebook *notebook)
gtk_notebook_child_reordered (notebook, page);
if (priv->has_scrolled || old_page_num != page_num)
g_signal_emit (notebook,
notebook_signals[PAGE_REORDERED], 0,
page->child, page_num);
{
for (element = priv->children, i = 0; element; element = element->next)
{
if (MIN (old_page_num, page_num) <= i && i <= MAX (old_page_num, page_num))
gtk_widget_child_notify (((GtkNotebookPage *) element->data)->child, "position");
}
g_signal_emit (notebook,
notebook_signals[PAGE_REORDERED], 0,
page->child, page_num);
}
priv->has_scrolled = FALSE;
priv->during_reorder = FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment