Undo previous change that had Factory registering windows and terminals. Instead make them self-register since they already have a Terminator reference anyway. Remove calls to register_terminla from elsewhere.

This commit is contained in:
Chris Jones 2010-01-04 13:11:16 +00:00
parent 293beb2331
commit be224f3016
5 changed files with 5 additions and 15 deletions

View File

@ -49,20 +49,12 @@ class Factory(Borg):
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)
return(window.Window())
def make_terminal(self, *args):
"""Make a Terminal"""
import terminal
from newterminator import Terminator
terminator = Terminator()
product = terminal.Terminal()
terminator.register_terminal(product)
return(product)
return(terminal.Terminal())
def make_hpaned(self, *args):
"""Make an HPaned"""

View File

@ -68,7 +68,6 @@ class Notebook(Container, gtk.Notebook):
if not sibling:
sibling = maker.make('terminal')
self.terminator.register_terminal(sibling)
sibling.spawn_child()
self.insert_page(container, None, page_num)
@ -100,8 +99,7 @@ class Notebook(Container, gtk.Notebook):
"""Add a new tab, optionally supplying a child widget"""
if not widget:
maker = Factory()
widget = maker.make('terminal')
self.terminator.register_terminal(widget)
widget = maker.make('Terminal')
widget.spawn_child()
signals = {'close-term': self.wrapcloseterm,

View File

@ -53,7 +53,6 @@ class Paned(Container):
if not sibling:
sibling = maker.make('terminal')
self.terminator.register_terminal(sibling)
sibling.spawn_child()
self.add(container)

View File

@ -87,6 +87,8 @@ class Terminal(gtk.VBox):
self.__gobject_init__()
self.terminator = Terminator()
self.terminator.register_terminal(self)
self.connect('enumerate', self.terminator.do_enumerate)
self.connect('group-tab', self.terminator.group_tab)
self.connect('ungroup-tab', self.terminator.ungroup_tab)

View File

@ -237,7 +237,6 @@ class Window(Container, gtk.Window):
if not sibling:
sibling = maker.make('Terminal')
self.terminator.register_terminal(sibling)
self.add(container)
container.show_all()