From: Christian Dywan Date: Sat, 26 Feb 2011 15:23:56 +0000 (+0100) Subject: Alt+9 and Alt+0 should always go to the last tab X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9baf84dd3f599ed0658923798cd96c3a6900deaf;p=midori Alt+9 and Alt+0 should always go to the last tab --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index cafa5fbe..5a77b3f7 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -5422,12 +5422,11 @@ midori_browser_accel_switch_tab_activate_cb (GtkAccelGroup* accel_group, MidoriBrowser* browser; GtkWidget* view; + /* Switch to n-th tab. 9 and 0 go to the last tab. */ n = keyval - GDK_0; - if (n == 0) - n = 10; browser = g_object_get_data (G_OBJECT (accel_group), "midori-browser"); if ((view = gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser->notebook), - n - 1))) + n < 9 ? n - 1 : -1))) midori_browser_set_current_tab (browser, view); } }