diff --git a/terminatorlib/window.py b/terminatorlib/window.py index 9cf7f688..3b9d88fa 100644 --- a/terminatorlib/window.py +++ b/terminatorlib/window.py @@ -280,22 +280,14 @@ class Window(Container, Gtk.Window): def on_delete_event(self, window, event, data=None): """Handle a window close request""" maker = Factory() - if maker.isinstance(self.get_child(), 'Terminal'): - if self.is_zoomed(): - return(self.confirm_close(window, _('window'))) - else: - dbg('Only one child, closing is fine') - return(False) - elif maker.isinstance(self.get_child(), 'Container'): - return(self.confirm_close(window, _('window'))) + + if (maker.isinstance(self.get_child(), 'Terminal') or + maker.isinstance(self.get_child(), 'Container')): + confirm_close = self.construct_confirm_close(window, _('window')) + return (confirm_close != Gtk.ResponseType.ACCEPT) else: dbg('unknown child: %s' % self.get_child()) - - def confirm_close(self, window, type): - """Display a confirmation dialog when the user is closing multiple - terminals in one window""" - - return(not (self.construct_confirm_close(window, type) == Gtk.ResponseType.ACCEPT)) + return False # close anyway def on_destroy_event(self, widget, data=None): """Handle window destruction"""