From 9baf84dd3f599ed0658923798cd96c3a6900deaf Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 26 Feb 2011 16:23:56 +0100 Subject: [PATCH] Alt+9 and Alt+0 should always go to the last tab --- midori/midori-browser.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } } -- 2.39.5