[Dextrose] [PATCH] Fix no restart after provider info selection

Martin Abente martin.abente.lahaye at gmail.com
Tue Jan 11 09:54:07 EST 2011


Current 3g provider information selection logic bypassed the 
validation process, thefore no restart was required.

Note that changes in the current session does not modify
the current loaded connection information, and since the
connection information is loaded at startup, restart is 
required.

---
 extensions/cpsection/modemconfiguration/view.py |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/extensions/cpsection/modemconfiguration/view.py b/extensions/cpsection/modemconfiguration/view.py
index 3b03b3d..1e465cf 100644
--- a/extensions/cpsection/modemconfiguration/view.py
+++ b/extensions/cpsection/modemconfiguration/view.py
@@ -340,14 +340,10 @@ class ModemConfiguration(SectionView):
     def __plan_selected_cb(self, combo):
         model = combo.get_model()
         plan = model.get_row_plan(combo.get_active())
-        self._username_entry.set_value(plan['username'])
-        self._username_entry.set_text_from_model()
-        self._password_entry.set_value(plan['password'])
-        self._password_entry.set_text_from_model()
-        self._number_entry.set_value(plan['number'])
-        self._number_entry.set_text_from_model()
-        self._apn_entry.set_value(plan['apn'])
-        self._apn_entry.set_text_from_model()
+        self._username_entry.entry.set_text(plan['username'])
+        self._password_entry.entry.set_text(plan['password'])
+        self._number_entry.entry.set_text(plan['number'])
+        self._apn_entry.entry.set_text(plan['apn'])
 
     def _validate(self):
         if self._username_entry.is_valid and \
-- 
1.7.1



More information about the Dextrose mailing list