diff --git a/terminatorlib/container.py b/terminatorlib/container.py index 7524c809..e9be2d92 100755 --- a/terminatorlib/container.py +++ b/terminatorlib/container.py @@ -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]) diff --git a/terminatorlib/newterminator.py b/terminatorlib/newterminator.py index d5b1e51d..049a7e7c 100755 --- a/terminatorlib/newterminator.py +++ b/terminatorlib/newterminator.py @@ -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: diff --git a/terminatorlib/test.py b/terminatorlib/test.py index a16e6291..56f058e2 100755 --- a/terminatorlib/test.py +++ b/terminatorlib/test.py @@ -22,4 +22,7 @@ term.spawn_child() window.connect("destroy", on_window_destroyed) -gtk.main() +try: + gtk.main() +except KeyboardInterrupt: + pass