confirm when closing a window with zoomed terminal

This commit is contained in:
shiraeeshi 2017-01-16 19:17:42 +06:00
parent 0ad3e02204
commit d42dc52481
1 changed files with 5 additions and 2 deletions

View File

@ -270,6 +270,9 @@ class Window(Container, Gtk.Window):
"""Handle a window close request""" """Handle a window close request"""
maker = Factory() maker = Factory()
if maker.isinstance(self.get_child(), 'Terminal'): if maker.isinstance(self.get_child(), 'Terminal'):
if self.get_property('term_zoomed') == True:
return(self.confirm_close(window, _('window')))
else:
dbg('Window::on_delete_event: Only one child, closing is fine') dbg('Window::on_delete_event: Only one child, closing is fine')
return(False) return(False)
elif maker.isinstance(self.get_child(), 'Container'): elif maker.isinstance(self.get_child(), 'Container'):