forked from AuroraMiddleware/gtk
GtkNotebook: emit child-notify::position on drag 'n drop reorder
https://bugzilla.gnome.org/show_bug.cgi?id=669116
This commit is contained in:
parent
cb775a6a6d
commit
347328adb0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user