set the focus on message textview in chat control only for the first opened tab. Fixes #7903

This commit is contained in:
Yann Leboulanger 2015-11-23 22:05:19 +01:00
parent e2c1e96685
commit b6a66c44a3
1 changed files with 2 additions and 1 deletions

View File

@ -315,7 +315,8 @@ 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()
GLib.timeout_add(500, control.msg_textview.grab_focus)
if self.get_num_controls() == 1:
GLib.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