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