Extend previous commit to cover the titlebar itself, which previously would suffer subtle focus failures
This commit is contained in:
parent
8276a6de77
commit
606ca3707b
|
@ -55,6 +55,10 @@ class EditableLabel(gtk.EventBox):
|
|||
"""set angle of the label"""
|
||||
self._label.set_angle( angle )
|
||||
|
||||
def editing(self):
|
||||
"""Return if we are currently editing"""
|
||||
return(self._entry != None)
|
||||
|
||||
def set_text(self, text, force=False):
|
||||
"""set the text of the label"""
|
||||
self._autotext = text
|
||||
|
|
|
@ -874,7 +874,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
|||
def on_vte_notify_enter(self, term, event):
|
||||
"""Handle the mouse entering this terminal"""
|
||||
if self.config['focus'] in ['sloppy', 'mouse']:
|
||||
if self.titlebar.creating_group() == False:
|
||||
if self.titlebar.editing() == False:
|
||||
term.grab_focus()
|
||||
return(False)
|
||||
|
||||
|
|
|
@ -126,9 +126,9 @@ class Titlebar(gtk.EventBox):
|
|||
"""Re-emit an edit-done signal from an EditableLabel"""
|
||||
self.emit('edit-done')
|
||||
|
||||
def creating_group(self):
|
||||
"""Determine if we're currently creating a group"""
|
||||
return(self.groupentry.get_property('visible'))
|
||||
def editing(self):
|
||||
"""Determine if we're currently editing a group name or title"""
|
||||
return(self.groupentry.get_property('visible') or self.label.editing())
|
||||
|
||||
def create_group(self):
|
||||
"""Create a new group"""
|
||||
|
|
Loading…
Reference in New Issue