Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions blueman/main/Manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def do_activate(self) -> None:

# Connect to configure event to store new window position and size
self.window.connect("configure-event", self._on_configure)
# Quit application if primary window is closed
self.window.connect("delete-event", self._on_delete)

self.window.present_with_time(Gtk.get_current_event_time())

Expand Down Expand Up @@ -207,6 +209,10 @@ def _on_configure(self, _window: Gtk.ApplicationWindow, event: Gdk.EventConfigur
self.Config["window-properties"] = [event.width, event.height, event.x, event.y]
return False

def _on_delete(self, _window: Gtk.ApplicationWindow, _event: Gdk.Event) -> bool:
self.quit()
return False

def register_settings_action(self, name: str) -> None:
action = self.Config.create_action(name)
self.add_action(action)
Expand Down
Loading