]> spindle.queued.net Git - midori/commitdiff
Move forward should move the last tab to the front
authorAlexander Friesen <a_06357@fastmail.fm>
Sat, 5 Mar 2011 01:08:19 +0000 (02:08 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 5 Mar 2011 01:08:19 +0000 (02:08 +0100)
midori/midori-browser.c

index a581678076230d0b84ae459a9444115af5fa1290..d40e67c41818ca6ac3921f7074aeb7de53d7193d 100644 (file)
@@ -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