aboutsummaryrefslogtreecommitdiff
path: root/src/prepaid-manager-applet.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-12-28 16:22:06 +0100
committerGuido Günther <agx@sigxcpu.org>2011-12-28 17:51:52 +0100
commitf500a15d3cf2c9b68f1ea712cc3c2e7ec8b027c9 (patch)
treeb23d1e4dc0c91d00830e11275e243c1e16661271 /src/prepaid-manager-applet.py
parent1149f1e6d3972cef2261e1ac1f3073d9ff034e71 (diff)
Activate 'change' button to allow to reconfigure current provider
Diffstat (limited to 'src/prepaid-manager-applet.py')
-rwxr-xr-xsrc/prepaid-manager-applet.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/prepaid-manager-applet.py b/src/prepaid-manager-applet.py
index 1e350c0..75ac064 100755
--- a/src/prepaid-manager-applet.py
+++ b/src/prepaid-manager-applet.py
@@ -117,11 +117,12 @@ class PPMController(GObject.GObject):
mnc = imsi[3:5]
return (mcc, mnc)
- def _get_provider_interactive(self, imsi):
+ def get_provider_interactive(self, imsi=None):
"""
Given the imsi, determine the provider based on that information
from providerdb, request user input where ncessary
"""
+ imsi = imsi or self.imsi
mcc, mnc = self._imsi_to_network_id(imsi)
self.providers = self.providerdb.get_providers(mcc, mnc)
if self.providers:
@@ -175,7 +176,7 @@ class PPMController(GObject.GObject):
else:
# Account not known yet, get provider interactively
self.account = None
- self._get_provider_interactive(self.imsi)
+ self.get_provider_interactive(self.imsi)
# Everything worked out, disable the timer.
return False
@@ -386,9 +387,7 @@ class PPMDialog(GObject.GObject, PPMObject):
self.controller.fetch_balance()
def on_provider_change_clicked(self, dummy):
- # FIXME: allow to select provider
- # and communicate the change to the controller
- raise NotImplementedError
+ self.controller.get_provider_interactive()
def on_entry_code_insert(self, entry):
cur_len = entry.get_text_length()