From ad61789101b0e7c9d45aacf6fbddbcb6c476af81 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 2 Feb 2005 21:59:40 +0000
Subject: [PATCH] In tabbed chat window, when alt+1 2 3 key is pressed, select
 the corresponding tab

---
 plugins/gtkgui/gtkgui.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py
index 5d91452f6d..2bd002d110 100644
--- a/plugins/gtkgui/gtkgui.py
+++ b/plugins/gtkgui/gtkgui.py
@@ -415,8 +415,13 @@ class tabbed_chat_Window:
 		return 0
 
 	def on_chat_key_press_event(self, widget, event):
+		nb = self.xml.get_widget("notebook")
+		st = "1234567890"
 		if event.keyval == gtk.keysyms.Escape:
 			self.on_close_clicked(widget)
+		elif (event.string in st) \
+			and (event.state & gtk.gdk.MOD1_MASK):
+			nb.set_current_page(st.index(event.string))
 
 	def on_button_contact_clicked(self, widget):
 		"""When button contact is clicked"""
-- 
GitLab