mildly change the debugging output of objects, and handle ^C a little better
This commit is contained in:
parent
f33dc6f28a
commit
df317bd2cd
|
@ -68,7 +68,7 @@ class Container(object):
|
|||
if self.cnxids.has_key(widget):
|
||||
for cnxid in self.cnxids[widget]:
|
||||
dbg('Container::disconnect_child: removing handler on %s' %
|
||||
widget.__class__.__name__)
|
||||
type(widget))
|
||||
widget.disconnect(cnxid)
|
||||
del(self.cnxids[widget])
|
||||
|
||||
|
|
|
@ -47,18 +47,21 @@ class Terminator(Borg):
|
|||
def register_window(self, window):
|
||||
"""Register a new window widget"""
|
||||
if window not in self.windows:
|
||||
dbg('Terminator::register_window: registering %s' % window)
|
||||
dbg('Terminator::register_window: registering %s:%s' % (id(window),
|
||||
type(window)))
|
||||
self.windows.append(window)
|
||||
|
||||
def deregister_window(self, window):
|
||||
"""de-register a window widget"""
|
||||
dbg('Terminator::deregister_window: de-registering %s' % window)
|
||||
dbg('Terminator::deregister_window: de-registering %s:%s' %
|
||||
(id(window), type(window)))
|
||||
self.windows.remove(window)
|
||||
|
||||
def register_terminal(self, terminal):
|
||||
"""Register a new terminal widget"""
|
||||
if terminal not in self.terminals:
|
||||
dbg('Terminator::register_terminal: registering %s' % terminal)
|
||||
dbg('Terminator::register_terminal: registering %s:%s' %
|
||||
(id(terminal), type(terminal)))
|
||||
self.terminals.append(terminal)
|
||||
terminal.connect('ungroup-all', self.ungroup_all)
|
||||
terminal.connect('navigate', self.navigate_terminal)
|
||||
|
@ -66,7 +69,8 @@ class Terminator(Borg):
|
|||
|
||||
def deregister_terminal(self, terminal):
|
||||
"""De-register a terminal widget"""
|
||||
dbg('Terminator::deregister_terminal: de-registering %s' % terminal)
|
||||
dbg('Terminator::deregister_terminal: de-registering %s:%s' %
|
||||
(id(terminal), type(terminal)))
|
||||
self.terminals.remove(terminal)
|
||||
|
||||
if len(self.terminals) == 0:
|
||||
|
|
|
@ -22,4 +22,7 @@ term.spawn_child()
|
|||
|
||||
window.connect("destroy", on_window_destroyed)
|
||||
|
||||
try:
|
||||
gtk.main()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue