Skip to content

Commit

Permalink
CTRL+W and CTRL+Q stops local instance before closing the app
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffser committed Aug 11, 2024
1 parent 3b95d36 commit fd92a86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class AlpacaApplication(Adw.Application):
def __init__(self, version):
super().__init__(application_id='com.jeffser.Alpaca',
flags=Gio.ApplicationFlags.DEFAULT_FLAGS)
self.create_action('quit', lambda *_: self.quit(), ['<primary>w', '<primary>q'])
self.create_action('quit', lambda *_: self.props.active_window.closing_app(None), ['<primary>w', '<primary>q'])
self.create_action('preferences', lambda *_: AlpacaWindow.show_preferences_dialog(self.props.active_window), ['<primary>comma'])
self.create_action('about', self.on_about_action)
self.version = version
Expand Down
1 change: 1 addition & 0 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ def closing_app(self, user_data):
else:
logger.info("Closing app...")
local_instance.stop()
self.get_application().quit()

@Gtk.Template.Callback()
def model_spin_changed(self, spin):
Expand Down

0 comments on commit fd92a86

Please sign in to comment.