Fix silly focus issue when creating groups - terminals were instantly stealing focus and cancelling the group name creation

This commit is contained in:
Chris Jones 2010-01-12 00:58:50 +00:00
parent c257a3abff
commit 8276a6de77
2 changed files with 7 additions and 2 deletions

View File

@ -874,6 +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:
term.grab_focus()
return(False)

View File

@ -126,6 +126,10 @@ 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 create_group(self):
"""Create a new group"""
self.groupentry.show()