Add a policy that if we have no open windows we should quit
This commit is contained in:
parent
995aa99b2e
commit
6d1831824a
|
@ -3,6 +3,8 @@
|
||||||
# GPL v2 only
|
# GPL v2 only
|
||||||
"""terminator.py - class for the master Terminator singleton"""
|
"""terminator.py - class for the master Terminator singleton"""
|
||||||
|
|
||||||
|
import gtk
|
||||||
|
|
||||||
from borg import Borg
|
from borg import Borg
|
||||||
from config import Config
|
from config import Config
|
||||||
from keybindings import Keybindings
|
from keybindings import Keybindings
|
||||||
|
@ -56,6 +58,9 @@ class Terminator(Borg):
|
||||||
dbg('Terminator::deregister_window: de-registering %s:%s' %
|
dbg('Terminator::deregister_window: de-registering %s:%s' %
|
||||||
(id(window), type(window)))
|
(id(window), type(window)))
|
||||||
self.windows.remove(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):
|
def register_terminal(self, terminal):
|
||||||
"""Register a new terminal widget"""
|
"""Register a new terminal widget"""
|
||||||
|
|
Loading…
Reference in New Issue