From 6d1831824aa4ea71859f04e043fabf09830b8ca3 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 4 Jan 2010 13:05:28 +0000 Subject: [PATCH] Add a policy that if we have no open windows we should quit --- terminatorlib/newterminator.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/terminatorlib/newterminator.py b/terminatorlib/newterminator.py index 049a7e7c..bea1fab0 100755 --- a/terminatorlib/newterminator.py +++ b/terminatorlib/newterminator.py @@ -3,6 +3,8 @@ # GPL v2 only """terminator.py - class for the master Terminator singleton""" +import gtk + from borg import Borg from config import Config from keybindings import Keybindings @@ -56,6 +58,9 @@ class Terminator(Borg): dbg('Terminator::deregister_window: de-registering %s:%s' % (id(window), type(window))) self.windows.remove(window) + if len(self.windows) == 0: + # We have no windows left, we should exit + gtk.main_quit() def register_terminal(self, terminal): """Register a new terminal widget"""