leif pushed a commit to branch master. http://git.enlightenment.org/apps/econnman.git/commit/?id=b547d8a3041223efea2af0e7cda8334ff8671f09
commit b547d8a3041223efea2af0e7cda8334ff8671f09 Author: Matthias Wauer <[email protected]> Date: Fri Jan 24 14:01:35 2014 +0100 Make ieee8012x wifis forgetable, config deletable. Summary: Enable the 'Forget Network' button, when a ieee8021x secured wifi. Forgetting will delete the corresponding section in the config file. Test Plan: 'Forget' a appropriate network and reload the wifi service/configuration dialog. The settings should not be available. view. Reviewers: leif CC: FillFeile Differential Revision: https://phab.enlightenment.org/D491 --- econnman-bin.in | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/econnman-bin.in b/econnman-bin.in index c58db9a..dbb541a 100755 --- a/econnman-bin.in +++ b/econnman-bin.in @@ -275,7 +275,7 @@ def config_del(name): config_file_setup() except IOError: return - if not configs.has_section(secname): + if configs.has_section(secname): configs.remove_section(secname) config_write(name) @@ -907,6 +907,11 @@ class ServiceView(ObjectView): if not self.immutable and self.type != "ethernet": self.forget = self.add_button(self.box, "Forget Network", self._forget) + elif (self.type == "wifi") and ("ieee8021x" in self.security_mode): + self.forget = self.add_button(self.box, "Forget Network", + self._forget) + if not config_exists(self.name): + self.forget.disabled = True self.error = self.add_label(self.box, "error here") @@ -1232,8 +1237,13 @@ class ServiceView(ObjectView): log.error("Could not remove %s", exc) self.forget.disabled = False - if self.security_mode == "ieee8021x": - config_del(self.name) + if self.type == "wifi" and "ieee8021x" in self.security_mode: + if config_exists(self.name): + config_del(self.name) + for it in self.phase2_items: + self.phase2_items[it].selected = False + for it in self.eap_method_items: + self.eap_method_items[it].selected = False else: self.bus_obj.Remove(reply_handler=on_reply, error_handler=on_error) self.forget.disabled = True --
