diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-01-04 01:23:05 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-01-04 01:23:05 -0500 |
commit | 88501d527dd50c9dc6e1b76a8dd5f1adaf0304b2 (patch) | |
tree | 8eb392d9badc1c5cd8d0f5254e79910f7677377d /gtk/gtknotebook.c | |
parent | 03b37a2e540d8eb77b993b45798008559a56b01b (diff) | |
download | gtk+-88501d527dd50c9dc6e1b76a8dd5f1adaf0304b2.tar.gz |
Remove pack consideration from tab reordering
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index e5c2a9037a..2ef9c25a63 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -1439,9 +1439,6 @@ reorder_tab (GtkNotebook *notebook, GList *position, GList *tab) * same relative position, taking packing into account */ elem = (position) ? position->prev : g_list_last (priv->children); - while (elem && elem != tab && GTK_NOTEBOOK_PAGE (elem)->pack != GTK_NOTEBOOK_PAGE (tab)->pack) - elem = elem->prev; - if (elem == tab) return g_list_position (priv->children, tab); @@ -1504,7 +1501,7 @@ gtk_notebook_reorder_tab (GtkNotebook *notebook, (effective_direction == GTK_DIR_RIGHT) ? STEP_NEXT : STEP_PREV, TRUE); } - while (child && GTK_NOTEBOOK_PAGE (last)->pack == GTK_NOTEBOOK_PAGE (child)->pack); + while (child); child = last; } @@ -1518,25 +1515,20 @@ gtk_notebook_reorder_tab (GtkNotebook *notebook, page = child->data; - if (page->pack == priv->cur_page->pack) - { - if (effective_direction == GTK_DIR_RIGHT) - page_num = reorder_tab (notebook, (page->pack == GTK_PACK_START) ? child->next : child, priv->focus_tab); - else - page_num = reorder_tab (notebook, (page->pack == GTK_PACK_START) ? child : child->next, priv->focus_tab); - - gtk_notebook_pages_allocate (notebook); + if (effective_direction == GTK_DIR_RIGHT) + page_num = reorder_tab (notebook, child->next, priv->focus_tab); + else + page_num = reorder_tab (notebook, child, priv->focus_tab); - g_signal_emit (notebook, - notebook_signals[PAGE_REORDERED], - 0, - ((GtkNotebookPage *) priv->focus_tab->data)->child, - page_num); + gtk_notebook_pages_allocate (notebook); - return TRUE; - } + g_signal_emit (notebook, + notebook_signals[PAGE_REORDERED], + 0, + ((GtkNotebookPage *) priv->focus_tab->data)->child, + page_num); - return FALSE; + return TRUE; } /** |