Move forward should move the last tab to the front

This commit is contained in:
Alexander Friesen 2011-03-05 02:08:19 +01:00 committed by Christian Dywan
parent 353924a117
commit 7e8b0bf229

View file

@ -4395,6 +4395,9 @@ _action_tab_move_forward_activate (GtkAction* action,
{ {
gint n = gtk_notebook_get_current_page (GTK_NOTEBOOK (browser->notebook)); gint n = gtk_notebook_get_current_page (GTK_NOTEBOOK (browser->notebook));
GtkWidget* widget = gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser->notebook), n); GtkWidget* widget = gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser->notebook), n);
if (n == (gtk_notebook_get_n_pages (GTK_NOTEBOOK (browser->notebook)) - 1))
gtk_notebook_reorder_child (GTK_NOTEBOOK (browser->notebook), widget, 0);
else
gtk_notebook_reorder_child (GTK_NOTEBOOK (browser->notebook), widget, n + 1); gtk_notebook_reorder_child (GTK_NOTEBOOK (browser->notebook), widget, n + 1);
} }