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:
parent
293beb2331
commit
be224f3016
@ -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"""
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user