Don't prompt with a quit message if there is only one terminal open

This commit is contained in:
Chris Jones 2007-11-07 14:38:26 -05:00
parent eeb91b4c6f
commit ac20b5011a
1 changed files with 3 additions and 0 deletions

View File

@ -356,6 +356,9 @@ class Terminator:
return (False) return (False)
def on_delete_event (self, widget, event, data=None): def on_delete_event (self, widget, event, data=None):
if len (self.term_list) == 1:
return False
dialog = gtk.Dialog ("Quit?", self.window, gtk.DIALOG_MODAL, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_QUIT, gtk.RESPONSE_ACCEPT)) dialog = gtk.Dialog ("Quit?", self.window, gtk.DIALOG_MODAL, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_QUIT, gtk.RESPONSE_ACCEPT))
label = gtk.Label ("Do you really want to quit?") label = gtk.Label ("Do you really want to quit?")
dialog.vbox.pack_start (label, True, True, 0) dialog.vbox.pack_start (label, True, True, 0)