[Xfce4-commits] <midori:master> Alt+9 and Alt+0 should always go to the last tab
Christian Dywan
noreply at xfce.org
Sat Feb 26 16:26:01 CET 2011
Updating branch refs/heads/master
to 9baf84dd3f599ed0658923798cd96c3a6900deaf (commit)
from ddd660b45ac3f73a396431066783dea83bf89568 (commit)
commit 9baf84dd3f599ed0658923798cd96c3a6900deaf
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Feb 26 16:23:56 2011 +0100
Alt+9 and Alt+0 should always go to the last tab
midori/midori-browser.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index cafa5fb..5a77b3f 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);
}
}
More information about the Xfce4-commits
mailing list