diff options
author | Guido Günther <agx@sigxcpu.org> | 2020-03-31 16:35:44 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2020-03-31 18:16:28 +0200 |
commit | 72f7772d36bc5468d5311d733af06115b02436bf (patch) | |
tree | 8b1341815298200b762cea921d58a207a27ba401 | |
parent | c2467130bc8bbc59de53b442a05cc08bc6a56b83 (diff) |
Use GtkApplication
-rwxr-xr-x | src/prepaid-manager-applet.py | 7 |
1 files 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): |