Add a policy that if we have no open windows we should quit

This commit is contained in:
Chris Jones 2010-01-04 13:05:28 +00:00
parent 995aa99b2e
commit 6d1831824a
1 changed files with 5 additions and 0 deletions

View File

@ -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"""