Teach Factory how to make a Window, and have it register terminals windows automagically

This commit is contained in:
Chris Jones 2010-01-04 13:04:46 +00:00
parent 137dfe7ef4
commit 995aa99b2e
1 changed files with 14 additions and 1 deletions

View File

@ -46,10 +46,23 @@ class Factory(Borg):
dbg('Factory::make: created a %s' % product) dbg('Factory::make: created a %s' % product)
return(func(args)) return(func(args))
def make_window(self, *args):
"""Make a Window"""
import window
from newterminator import Terminator
terminator = Terminator()
product = window.Window()
terminator.register_window(product)
return(product)
def make_terminal(self, *args): def make_terminal(self, *args):
"""Make a Terminal""" """Make a Terminal"""
import terminal import terminal
return(terminal.Terminal()) from newterminator import Terminator
terminator = Terminator()
product = terminal.Terminal()
terminator.register_terminal(product)
return(product)
def make_hpaned(self, *args): def make_hpaned(self, *args):
"""Make an HPaned""" """Make an HPaned"""