From 004c0fbdf56fc7a569a3fa9b7a41cef8b7b79b50 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Fri, 24 Aug 2012 18:21:38 +0400 Subject: [PATCH] set the focus when the first tab is opened --- data/gui/message_window.ui | 1 - src/message_window.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/data/gui/message_window.ui b/data/gui/message_window.ui index 1f0795854..b801f8290 100644 --- a/data/gui/message_window.ui +++ b/data/gui/message_window.ui @@ -12,7 +12,6 @@ True - True True 0 diff --git a/src/message_window.py b/src/message_window.py index 0ab0b5dfc..f8099a24a 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -144,8 +144,6 @@ class MessageWindow(object): self.notebook.set_show_border(gajim.config.get('tabs_border')) self.show_icon() - gobject.idle_add(self.notebook.grab_focus) - def change_account_name(self, old_name, new_name): if old_name in self._controls: self._controls[new_name] = self._controls[old_name] @@ -307,6 +305,7 @@ class MessageWindow(object): # 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.timeout_add(500, control.msg_textview.grab_focus) def on_tab_eventbox_button_press_event(self, widget, event, child): if event.button == 3: # right click