From 72f7772d36bc5468d5311d733af06115b02436bf Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Tue, 31 Mar 2020 16:35:44 +0200 Subject: Use GtkApplication --- src/prepaid-manager-applet.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/prepaid-manager-applet.py b/src/prepaid-manager-applet.py index d751ca0..6e2b686 100755 --- a/src/prepaid-manager-applet.py +++ b/src/prepaid-manager-applet.py @@ -50,7 +50,7 @@ resource._register() # The controller receives input and initiates a response by making calls on model # objects. A controller accepts input from the user and instructs the model and # view to perform actions based on that input. -class PPMController(GObject.GObject): +class PPMController(Gtk.Application): """ @ivar providers: the possible providers @ivar imsi: the imsi if we could fetch it from the modem @@ -72,7 +72,7 @@ class PPMController(GObject.GObject): self.mm.connect('request-finished', self.on_mm_request_finished) def __init__(self): - GObject.GObject.__init__(self) + Gtk.Application.__init__(self, application_id=ppm.app_id) self.mm = None self.imsi = None self.provider = None @@ -308,9 +308,6 @@ class PPMController(GObject.GObject): self.view.update_account_balance_information(balance, timestamp) -GObject.type_register(PPMController) - - class PPMObject(object): """Dialog or window constructed via a GtkBuilder""" def __init__(self, view, ui): -- cgit v1.2.3