From 3c2481fc2dc406ffa3bd5a3330b1fa6af42edc7b Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 30 Jul 2010 14:38:19 +0200 Subject: [PATCH] Give focus to message textview when we open a new chat. Fixes #5740 --- src/message_window.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/message_window.py b/src/message_window.py index 4dff5394c..8678930d8 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -298,9 +298,10 @@ _('Do you really want to close them all?'), self.notebook.show_all() else: self.window.show_all() - # NOTE: we do not call set_control_active(True) since we don't know whether - # the tab is the active one. + # NOTE: we do not call set_control_active(True) since we don't know + # whether the tab is the active one. self.show_title() + gobject.idle_add(control.msg_textview.grab_focus) def on_tab_eventbox_button_press_event(self, widget, event, child): if event.button == 3: # right click @@ -511,6 +512,7 @@ _('Do you really want to close them all?'), ctrl_page = self.notebook.page_num(ctrl.widget) self.notebook.set_current_page(ctrl_page) self.window.present() + gobject.idle_add(ctrl.msg_textview.grab_focus) def remove_tab(self, ctrl, method, reason = None, force = False): """