turns out that we are somehow sucking at unreferencing our objects, so we need to start tightening these things up. stop calling destroy() on anything other than toplevels, it makes no sense. Don't send the sighup, only because I want to track this down properly.
This commit is contained in:
parent
f7d649d724
commit
5c09dc4b6b
|
@ -718,7 +718,7 @@ class Terminator:
|
||||||
dbg ('SEGBUG: showed TerminatorTerm')
|
dbg ('SEGBUG: showed TerminatorTerm')
|
||||||
terminal.spawn_child ()
|
terminal.spawn_child ()
|
||||||
dbg ('SEGBUG: spawned child')
|
dbg ('SEGBUG: spawned child')
|
||||||
return terminal
|
return
|
||||||
|
|
||||||
def remove(self, widget):
|
def remove(self, widget):
|
||||||
"""Remove a TerminatorTerm from the Terminator view and terms list
|
"""Remove a TerminatorTerm from the Terminator view and terms list
|
||||||
|
@ -730,7 +730,7 @@ class Terminator:
|
||||||
# We are the only term
|
# We are the only term
|
||||||
if not self.on_delete_event (parent, gtk.gdk.Event (gtk.gdk.DELETE)):
|
if not self.on_delete_event (parent, gtk.gdk.Event (gtk.gdk.DELETE)):
|
||||||
self.on_destroy_event (parent, gtk.gdk.Event (gtk.gdk.DESTROY))
|
self.on_destroy_event (parent, gtk.gdk.Event (gtk.gdk.DESTROY))
|
||||||
return
|
return True
|
||||||
|
|
||||||
if isinstance (parent, gtk.Paned):
|
if isinstance (parent, gtk.Paned):
|
||||||
index = self.term_list.index (widget)
|
index = self.term_list.index (widget)
|
||||||
|
@ -768,7 +768,6 @@ class Terminator:
|
||||||
sibling.reparent (grandparent)
|
sibling.reparent (grandparent)
|
||||||
if not self._zoomed:
|
if not self._zoomed:
|
||||||
grandparent.resize_children()
|
grandparent.resize_children()
|
||||||
parent.destroy ()
|
|
||||||
if isinstance(sibling, TerminatorTerm) and isinstance(sibling.get_parent(), gtk.Notebook):
|
if isinstance(sibling, TerminatorTerm) and isinstance(sibling.get_parent(), gtk.Notebook):
|
||||||
sibling._titlebox.hide()
|
sibling._titlebox.hide()
|
||||||
|
|
||||||
|
@ -797,7 +796,6 @@ class Terminator:
|
||||||
gdparent.pack2(sibling)
|
gdparent.pack2(sibling)
|
||||||
if isinstance(sibling, TerminatorTerm) and sibling.conf.titlebars and sibling.conf.extreme_tabs:
|
if isinstance(sibling, TerminatorTerm) and sibling.conf.titlebars and sibling.conf.extreme_tabs:
|
||||||
sibling._titlebox.show()
|
sibling._titlebox.show()
|
||||||
parent.destroy()
|
|
||||||
if self.conf.focus_on_close == 'prev' or ( self.conf.focus_on_close == 'auto' and focus_on_close == 'prev'):
|
if self.conf.focus_on_close == 'prev' or ( self.conf.focus_on_close == 'auto' and focus_on_close == 'prev'):
|
||||||
if index == 0: index = 1
|
if index == 0: index = 1
|
||||||
self.term_list[index - 1]._vte.grab_focus ()
|
self.term_list[index - 1]._vte.grab_focus ()
|
||||||
|
@ -818,9 +816,8 @@ class Terminator:
|
||||||
dbg ("closeterm function called while in zoomed mode. Restoring previous layout before closing.")
|
dbg ("closeterm function called while in zoomed mode. Restoring previous layout before closing.")
|
||||||
self.toggle_zoom(widget, not self._maximised)
|
self.toggle_zoom(widget, not self._maximised)
|
||||||
|
|
||||||
widget.sighup()
|
#widget.sighup()
|
||||||
if self.remove(widget):
|
if self.remove(widget):
|
||||||
widget.destroy ()
|
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
@ -501,12 +501,6 @@ text/plain
|
||||||
err (_('Unable to start shell: ') + shell)
|
err (_('Unable to start shell: ') + shell)
|
||||||
return (-1)
|
return (-1)
|
||||||
|
|
||||||
def sighup (self):
|
|
||||||
try:
|
|
||||||
os.kill(self._pid, signal.SIGHUP)
|
|
||||||
except OSError:
|
|
||||||
dbg('Unable to send SIGHUP to %d' % self._pid)
|
|
||||||
|
|
||||||
def get_cwd (self):
|
def get_cwd (self):
|
||||||
""" Return the current working directory of the subprocess.
|
""" Return the current working directory of the subprocess.
|
||||||
This function requires OS specific behaviours
|
This function requires OS specific behaviours
|
||||||
|
@ -1294,6 +1288,3 @@ text/plain
|
||||||
notebookpage[0].set_tab_label(notebookpage[1], label)
|
notebookpage[0].set_tab_label(notebookpage[1], label)
|
||||||
notebookpage = self.terminator.get_first_notebook_page(notebookpage[0])
|
notebookpage = self.terminator.get_first_notebook_page(notebookpage[0])
|
||||||
|
|
||||||
def destroy(self):
|
|
||||||
self._vte.destroy()
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue