def generate_window(self, *args):
"""
Generate application window (Gtk.Window)
"""
Gtk.ApplicationWindow.__init__(self, type=Gtk.WindowType.TOPLEVEL,
application=self.app)
self.move_latest_position()
self.set_wmclass("org.gnome.Authenticator", "Gnome Authenticator")
self.set_icon_name("org.gnome.Authenticator")
self.use_latest_size()
self.set_resizable(True)
self.connect("key_press_event", self.on_key_press)
self.connect("delete-event", lambda x, y: self.app.on_quit())
self.notification = InAppNotification()
self.observable.register(self.notification)
self.main_box.pack_start(self.notification, False, False, 0)
self.add(self.main_box)
评论列表
文章目录