Skip to content

Commit e52728a

Browse files
committed
Info: Redesign Info plugin
* It's a ApplicationWindow now * Does not block the main window anymore and multiple device windows can be opened now. * Properties are updates, added and removed * Can be copied to clipboard with property names * Optionally copied as json if asked to include property name(s)
1 parent ab2449f commit e52728a

3 files changed

Lines changed: 493 additions & 101 deletions

File tree

blueman/main/Manager.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ def do_activate(self) -> None:
121121

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

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

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

212+
def _on_delete(self, _window: Gtk.ApplicationWindow, _event: Gdk.Event) -> bool:
213+
self.quit()
214+
return False
215+
210216
def register_settings_action(self, name: str) -> None:
211217
action = self.Config.create_action(name)
212218
self.add_action(action)

0 commit comments

Comments
 (0)