Remove old SEGBUG debugging
This commit is contained in:
parent
67753449a0
commit
8fc337de9f
|
@ -591,38 +591,27 @@ class Terminator:
|
||||||
|
|
||||||
# get the parent of the provided terminal
|
# get the parent of the provided terminal
|
||||||
parent = widget.get_parent ()
|
parent = widget.get_parent ()
|
||||||
dbg ('SEGBUG: add() Got parent')
|
|
||||||
if isinstance (parent, gtk.Window):
|
if isinstance (parent, gtk.Window):
|
||||||
dbg ('SEGBUG: parent is a gtk.Window')
|
|
||||||
# We have just one term
|
# We have just one term
|
||||||
parent.remove(widget)
|
parent.remove(widget)
|
||||||
dbg ('SEGBUG: removed widget from window')
|
|
||||||
if pos in ("top", "left"):
|
if pos in ("top", "left"):
|
||||||
dbg ('SEGBUG: pos is in top/left')
|
|
||||||
pane.pack1 (terminal, True, True)
|
pane.pack1 (terminal, True, True)
|
||||||
dbg ('SEGBUG: packed terminal')
|
|
||||||
pane.pack2 (widget, True, True)
|
pane.pack2 (widget, True, True)
|
||||||
dbg ('SEGBUG: packed widget')
|
|
||||||
else:
|
else:
|
||||||
dbg ('SEGBUG: pos is not in top/left')
|
|
||||||
pane.pack1 (widget, True, True)
|
pane.pack1 (widget, True, True)
|
||||||
dbg ('SEGBUG: packed widget')
|
|
||||||
pane.pack2 (terminal, True, True)
|
pane.pack2 (terminal, True, True)
|
||||||
dbg ('SEGBUG: packed terminal')
|
|
||||||
parent.add (pane)
|
parent.add (pane)
|
||||||
dbg ('SEGBUG: added pane to parent')
|
|
||||||
|
|
||||||
position = (vertical) and parent.allocation.height \
|
position = (vertical) and parent.allocation.height \
|
||||||
or parent.allocation.width
|
or parent.allocation.width
|
||||||
|
|
||||||
if (isinstance (parent, gtk.Notebook) or isinstance (parent, gtk.Window)) and widget.conf.titlebars:
|
if (isinstance (parent, gtk.Notebook) or isinstance (parent, gtk.Window)) and widget.conf.titlebars:
|
||||||
#not the only term in the notebook/window anymore, need to reshow the title
|
#not the only term in the notebook/window anymore, need to reshow the title
|
||||||
dbg ('SEGBUG: Showing _titlebox')
|
|
||||||
widget._titlebox.update()
|
widget._titlebox.update()
|
||||||
terminal._titlebox.update()
|
terminal._titlebox.update()
|
||||||
|
|
||||||
if isinstance (parent, gtk.Notebook):
|
if isinstance (parent, gtk.Notebook):
|
||||||
dbg ('SEGBUG: Parent is a notebook')
|
|
||||||
page = -1
|
page = -1
|
||||||
|
|
||||||
for i in xrange(0, parent.get_n_pages()):
|
for i in xrange(0, parent.get_n_pages()):
|
||||||
|
@ -652,12 +641,10 @@ class Terminator:
|
||||||
or parent.allocation.width
|
or parent.allocation.width
|
||||||
|
|
||||||
if isinstance (parent, gtk.Paned):
|
if isinstance (parent, gtk.Paned):
|
||||||
dbg ('SEGBUG: parent is a Paned')
|
|
||||||
# We are inside a split term
|
# We are inside a split term
|
||||||
position = (vertical) and widget.allocation.height \
|
position = (vertical) and widget.allocation.height \
|
||||||
or widget.allocation.width
|
or widget.allocation.width
|
||||||
|
|
||||||
dbg ('SEGBUG: Preparing to reparent sibling')
|
|
||||||
if (widget == parent.get_child1 ()):
|
if (widget == parent.get_child1 ()):
|
||||||
widget.reparent (pane)
|
widget.reparent (pane)
|
||||||
parent.pack1 (pane, True, True)
|
parent.pack1 (pane, True, True)
|
||||||
|
@ -666,26 +653,19 @@ class Terminator:
|
||||||
parent.pack2 (pane, True, True)
|
parent.pack2 (pane, True, True)
|
||||||
|
|
||||||
if pos in ("top", "left"):
|
if pos in ("top", "left"):
|
||||||
dbg ('SEGBUG: pos is in top/left. Removing and re-ordering')
|
|
||||||
pane.remove(widget)
|
pane.remove(widget)
|
||||||
pane.pack1 (terminal, True, True)
|
pane.pack1 (terminal, True, True)
|
||||||
pane.pack2 (widget, True, True)
|
pane.pack2 (widget, True, True)
|
||||||
else:
|
else:
|
||||||
dbg ('SEGBUG: pos is not in top/left. Packing')
|
|
||||||
pane.pack1 (widget, True, True)
|
pane.pack1 (widget, True, True)
|
||||||
pane.pack2 (terminal, True, True)
|
pane.pack2 (terminal, True, True)
|
||||||
|
|
||||||
dbg ('SEGBUG: packing widget and terminal')
|
|
||||||
pane.pack1 (widget, True, True)
|
pane.pack1 (widget, True, True)
|
||||||
pane.pack2 (terminal, True, True)
|
pane.pack2 (terminal, True, True)
|
||||||
dbg ('SEGBUG: packed widget and terminal')
|
|
||||||
|
|
||||||
# show all, set position of the divider
|
# show all, set position of the divider
|
||||||
dbg ('SEGBUG: Showing pane')
|
|
||||||
pane.show ()
|
pane.show ()
|
||||||
dbg ('SEGBUG: Showed pane')
|
|
||||||
pane.set_position (position / 2)
|
pane.set_position (position / 2)
|
||||||
dbg ('SEGBUG: Set position')
|
|
||||||
terminal.show ()
|
terminal.show ()
|
||||||
|
|
||||||
# insert the term reference into the list
|
# insert the term reference into the list
|
||||||
|
@ -860,17 +840,12 @@ class Terminator:
|
||||||
return
|
return
|
||||||
|
|
||||||
# create a new terminal and parent pane.
|
# create a new terminal and parent pane.
|
||||||
dbg ('SEGBUG: Creating TerminatorTerm')
|
|
||||||
terminal = TerminatorTerm (self, self.profile, command, widget.get_cwd())
|
terminal = TerminatorTerm (self, self.profile, command, widget.get_cwd())
|
||||||
dbg ('SEGBUG: Created TerminatorTerm')
|
|
||||||
pos = vertical and "right" or "bottom"
|
pos = vertical and "right" or "bottom"
|
||||||
dbg ('SEGBUG: Position is: %s'%pos)
|
|
||||||
self.add(widget, terminal, pos)
|
self.add(widget, terminal, pos)
|
||||||
dbg ('SEGBUG: added TerminatorTerm to container')
|
|
||||||
terminal.show ()
|
terminal.show ()
|
||||||
dbg ('SEGBUG: showed TerminatorTerm')
|
|
||||||
terminal.spawn_child ()
|
terminal.spawn_child ()
|
||||||
dbg ('SEGBUG: spawned child')
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def remove(self, widget, keep = False):
|
def remove(self, widget, keep = False):
|
||||||
|
|
|
@ -294,14 +294,11 @@ class TerminatorTerm (gtk.VBox):
|
||||||
|
|
||||||
self.add_matches(posix = self.conf.try_posix_regexp)
|
self.add_matches(posix = self.conf.try_posix_regexp)
|
||||||
|
|
||||||
dbg ('SEGBUG: Setting http_proxy')
|
|
||||||
env_proxy = os.getenv ('http_proxy')
|
env_proxy = os.getenv ('http_proxy')
|
||||||
if not env_proxy and self.conf.http_proxy and self.conf.http_proxy != '':
|
if not env_proxy and self.conf.http_proxy and self.conf.http_proxy != '':
|
||||||
os.putenv ('http_proxy', self.conf.http_proxy)
|
os.putenv ('http_proxy', self.conf.http_proxy)
|
||||||
|
|
||||||
dbg ('SEGBUG: Setting COLORTERM')
|
|
||||||
os.putenv ('COLORTERM', 'gnome-terminal')
|
os.putenv ('COLORTERM', 'gnome-terminal')
|
||||||
dbg ('SEGBUG: TerminatorTerm __init__ complete')
|
|
||||||
|
|
||||||
def prepareurl (self, url, match):
|
def prepareurl (self, url, match):
|
||||||
dbg ("prepareurl: Checking '%s' with a match of '%s'" % (url, match))
|
dbg ("prepareurl: Checking '%s' with a match of '%s'" % (url, match))
|
||||||
|
@ -625,18 +622,12 @@ text/plain
|
||||||
gobject.timeout_add (100, self.terminator.closeterm, self)
|
gobject.timeout_add (100, self.terminator.closeterm, self)
|
||||||
return (-1)
|
return (-1)
|
||||||
|
|
||||||
dbg ('SEGBUG: Setting WINDOWID')
|
|
||||||
os.putenv ('WINDOWID', '%s' % self._vte.get_parent_window().xid)
|
os.putenv ('WINDOWID', '%s' % self._vte.get_parent_window().xid)
|
||||||
|
|
||||||
dbg ('SEGBUG: Forking command: "%s" with args "%s", loglastlog = "%s", ' \
|
|
||||||
'logwtmp = "%s", logutmp = "%s" and cwd "%s"' % (shell, args, login,
|
|
||||||
update_records, update_records, self.cwd))
|
|
||||||
self._pid = self._vte.fork_command (command = shell, argv = args,
|
self._pid = self._vte.fork_command (command = shell, argv = args,
|
||||||
envv = [], loglastlog = login, logwtmp = update_records,
|
envv = [], loglastlog = login, logwtmp = update_records,
|
||||||
logutmp = update_records, directory=self.cwd)
|
logutmp = update_records, directory=self.cwd)
|
||||||
|
|
||||||
dbg ('SEGBUG: Forked command')
|
|
||||||
|
|
||||||
self.on_vte_title_change(self._vte) # Force an initial update of our titles
|
self.on_vte_title_change(self._vte) # Force an initial update of our titles
|
||||||
self._titlebox.update ()
|
self._titlebox.update ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue