There's no reason anymore to special-case notebook here
This commit is contained in:
parent
24b6082155
commit
67b79ff1da
|
@ -113,20 +113,15 @@ class Paned(Container):
|
||||||
|
|
||||||
def wrapcloseterm(self, widget):
|
def wrapcloseterm(self, widget):
|
||||||
"""A child terminal has closed, so this container must die"""
|
"""A child terminal has closed, so this container must die"""
|
||||||
|
dbg('Paned::wrapcloseterm: Called on %s' % widget)
|
||||||
if self.closeterm(widget):
|
if self.closeterm(widget):
|
||||||
# At this point we only have one child, which is the surviving term
|
# At this point we only have one child, which is the surviving term
|
||||||
sibling = self.children[0]
|
sibling = self.children[0]
|
||||||
self.remove(sibling)
|
self.remove(sibling)
|
||||||
|
|
||||||
parent = self.get_parent()
|
parent = self.get_parent()
|
||||||
maker = Factory()
|
parent.remove(self)
|
||||||
if maker.isinstance(parent, 'Notebook'):
|
parent.add(sibling)
|
||||||
page_num = parent.page_num(self)
|
|
||||||
parent.remove_page(page_num)
|
|
||||||
parent.insert_page(sibling, None, page_num)
|
|
||||||
else:
|
|
||||||
parent.remove(self)
|
|
||||||
parent.add(sibling)
|
|
||||||
del(self)
|
del(self)
|
||||||
else:
|
else:
|
||||||
dbg("Paned::wrapcloseterm: self.closeterm failed")
|
dbg("Paned::wrapcloseterm: self.closeterm failed")
|
||||||
|
|
Loading…
Reference in New Issue