tab_eventbox widget. do not grab focus
This commit is contained in:
parent
6b6e598c4d
commit
e9eb73d21c
1 changed files with 21 additions and 16 deletions
|
@ -220,7 +220,7 @@ class MessageWindow(object):
|
||||||
return False
|
return False
|
||||||
dialogs.YesNoDialog(
|
dialogs.YesNoDialog(
|
||||||
_('You are going to close several tabs'),
|
_('You are going to close several tabs'),
|
||||||
_('Do you really want to close them all?'),
|
_('Do you really want to close them all?'),
|
||||||
checktext=_('_Do not ask me again'), on_response_yes=on_yes1)
|
checktext=_('_Do not ask me again'), on_response_yes=on_yes1)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -292,8 +292,8 @@ _('Do you really want to close them all?'),
|
||||||
id_ = widget.connect('clicked', self._on_close_button_clicked, control)
|
id_ = widget.connect('clicked', self._on_close_button_clicked, control)
|
||||||
control.handlers[id_] = widget
|
control.handlers[id_] = widget
|
||||||
|
|
||||||
id_ = tab_label_box.connect('button-press-event', self.on_tab_eventbox_button_press_event,
|
id_ = tab_label_box.connect('button-press-event',
|
||||||
control.widget)
|
self.on_tab_eventbox_button_press_event, control.widget)
|
||||||
control.handlers[id_] = tab_label_box
|
control.handlers[id_] = tab_label_box
|
||||||
self.notebook.append_page(control.widget, tab_label_box)
|
self.notebook.append_page(control.widget, tab_label_box)
|
||||||
|
|
||||||
|
@ -317,6 +317,9 @@ _('Do you really want to close them all?'),
|
||||||
elif event.button == 2: # middle click
|
elif event.button == 2: # middle click
|
||||||
ctrl = self._widget_to_control(child)
|
ctrl = self._widget_to_control(child)
|
||||||
self.remove_tab(ctrl, self.CLOSE_TAB_MIDDLE_CLICK)
|
self.remove_tab(ctrl, self.CLOSE_TAB_MIDDLE_CLICK)
|
||||||
|
else:
|
||||||
|
ctrl = self._widget_to_control(child)
|
||||||
|
gobject.idle_add(ctrl.msg_textview.grab_focus)
|
||||||
|
|
||||||
def _on_message_textview_mykeypress_event(self, widget, event_keyval,
|
def _on_message_textview_mykeypress_event(self, widget, event_keyval,
|
||||||
event_keymod):
|
event_keymod):
|
||||||
|
@ -735,7 +738,8 @@ _('Do you really want to close them all?'),
|
||||||
if ctrl.get_nb_unread() > 0:
|
if ctrl.get_nb_unread() > 0:
|
||||||
found = True
|
found = True
|
||||||
break # found
|
break # found
|
||||||
elif gajim.config.get('ctrl_tab_go_to_next_composing') : # Search for a composing contact
|
elif gajim.config.get('ctrl_tab_go_to_next_composing') :
|
||||||
|
# Search for a composing contact
|
||||||
contact = ctrl.contact
|
contact = ctrl.contact
|
||||||
if first_composing_ind == -1 and contact.chatstate == 'composing':
|
if first_composing_ind == -1 and contact.chatstate == 'composing':
|
||||||
# If no composing contact found yet, check if this one is composing
|
# If no composing contact found yet, check if this one is composing
|
||||||
|
@ -780,7 +784,8 @@ _('Do you really want to close them all?'),
|
||||||
control.msg_textview.grab_focus()
|
control.msg_textview.grab_focus()
|
||||||
|
|
||||||
def _on_notebook_key_press(self, widget, event):
|
def _on_notebook_key_press(self, widget, event):
|
||||||
# when tab itself is selected, make sure <- and -> are allowed for navigating between tabs
|
# when tab itself is selected,
|
||||||
|
# make sure <- and -> are allowed for navigating between tabs
|
||||||
if event.keyval in (gtk.keysyms.Left, gtk.keysyms.Right):
|
if event.keyval in (gtk.keysyms.Left, gtk.keysyms.Right):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue