Don't prompt with a quit message if there is only one terminal open
This commit is contained in:
parent
eeb91b4c6f
commit
ac20b5011a
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue