Extend previous commit to cover the titlebar itself, which previously would suffer subtle focus failures

This commit is contained in:
Chris Jones 2010-01-12 01:05:53 +00:00
parent 8276a6de77
commit 606ca3707b
3 changed files with 9 additions and 5 deletions

View File

@ -54,7 +54,11 @@ class EditableLabel(gtk.EventBox):
def set_angle(self, angle ):
"""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

View File

@ -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)

View File

@ -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"""