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):
|
def make_window(self, *args):
|
||||||
"""Make a Window"""
|
"""Make a Window"""
|
||||||
import window
|
import window
|
||||||
from newterminator import Terminator
|
return(window.Window())
|
||||||
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
|
||||||
from newterminator import Terminator
|
return(terminal.Terminal())
|
||||||
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"""
|
||||||
|
@ -68,7 +68,6 @@ class Notebook(Container, gtk.Notebook):
|
|||||||
|
|
||||||
if not sibling:
|
if not sibling:
|
||||||
sibling = maker.make('terminal')
|
sibling = maker.make('terminal')
|
||||||
self.terminator.register_terminal(sibling)
|
|
||||||
sibling.spawn_child()
|
sibling.spawn_child()
|
||||||
|
|
||||||
self.insert_page(container, None, page_num)
|
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"""
|
"""Add a new tab, optionally supplying a child widget"""
|
||||||
if not widget:
|
if not widget:
|
||||||
maker = Factory()
|
maker = Factory()
|
||||||
widget = maker.make('terminal')
|
widget = maker.make('Terminal')
|
||||||
self.terminator.register_terminal(widget)
|
|
||||||
widget.spawn_child()
|
widget.spawn_child()
|
||||||
|
|
||||||
signals = {'close-term': self.wrapcloseterm,
|
signals = {'close-term': self.wrapcloseterm,
|
||||||
|
@ -53,7 +53,6 @@ class Paned(Container):
|
|||||||
|
|
||||||
if not sibling:
|
if not sibling:
|
||||||
sibling = maker.make('terminal')
|
sibling = maker.make('terminal')
|
||||||
self.terminator.register_terminal(sibling)
|
|
||||||
sibling.spawn_child()
|
sibling.spawn_child()
|
||||||
|
|
||||||
self.add(container)
|
self.add(container)
|
||||||
|
@ -87,6 +87,8 @@ class Terminal(gtk.VBox):
|
|||||||
self.__gobject_init__()
|
self.__gobject_init__()
|
||||||
|
|
||||||
self.terminator = Terminator()
|
self.terminator = Terminator()
|
||||||
|
self.terminator.register_terminal(self)
|
||||||
|
|
||||||
self.connect('enumerate', self.terminator.do_enumerate)
|
self.connect('enumerate', self.terminator.do_enumerate)
|
||||||
self.connect('group-tab', self.terminator.group_tab)
|
self.connect('group-tab', self.terminator.group_tab)
|
||||||
self.connect('ungroup-tab', self.terminator.ungroup_tab)
|
self.connect('ungroup-tab', self.terminator.ungroup_tab)
|
||||||
|
@ -237,7 +237,6 @@ class Window(Container, gtk.Window):
|
|||||||
|
|
||||||
if not sibling:
|
if not sibling:
|
||||||
sibling = maker.make('Terminal')
|
sibling = maker.make('Terminal')
|
||||||
self.terminator.register_terminal(sibling)
|
|
||||||
self.add(container)
|
self.add(container)
|
||||||
container.show_all()
|
container.show_all()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user