From: Alexander Friesen Date: Sat, 5 Mar 2011 01:08:19 +0000 (+0100) Subject: Move forward should move the last tab to the front X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e8b0bf22949191dce5b36993ff63636a2dffe1c;p=midori Move forward should move the last tab to the front --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index a5816780..d40e67c4 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -4395,7 +4395,10 @@ _action_tab_move_forward_activate (GtkAction* action, { gint n = gtk_notebook_get_current_page (GTK_NOTEBOOK (browser->notebook)); GtkWidget* widget = gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser->notebook), n); - gtk_notebook_reorder_child (GTK_NOTEBOOK (browser->notebook), widget, n + 1); + 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); } static void