def on_action_quit_activate(self, action): """Close the application by closing the main window""" event = Gdk.Event() event.key.type = Gdk.EventType.DELETE self.ui.win_main.event(event)