Give focus to message textview when we open a new chat. Fixes #5740
This commit is contained in:
parent
18f03edd62
commit
3c2481fc2d
|
@ -298,9 +298,10 @@ _('Do you really want to close them all?'),
|
||||||
self.notebook.show_all()
|
self.notebook.show_all()
|
||||||
else:
|
else:
|
||||||
self.window.show_all()
|
self.window.show_all()
|
||||||
# NOTE: we do not call set_control_active(True) since we don't know whether
|
# NOTE: we do not call set_control_active(True) since we don't know
|
||||||
# the tab is the active one.
|
# whether the tab is the active one.
|
||||||
self.show_title()
|
self.show_title()
|
||||||
|
gobject.idle_add(control.msg_textview.grab_focus)
|
||||||
|
|
||||||
def on_tab_eventbox_button_press_event(self, widget, event, child):
|
def on_tab_eventbox_button_press_event(self, widget, event, child):
|
||||||
if event.button == 3: # right click
|
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)
|
ctrl_page = self.notebook.page_num(ctrl.widget)
|
||||||
self.notebook.set_current_page(ctrl_page)
|
self.notebook.set_current_page(ctrl_page)
|
||||||
self.window.present()
|
self.window.present()
|
||||||
|
gobject.idle_add(ctrl.msg_textview.grab_focus)
|
||||||
|
|
||||||
def remove_tab(self, ctrl, method, reason = None, force = False):
|
def remove_tab(self, ctrl, method, reason = None, force = False):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue