def save(self): self.config.setting["server_host"] = unicode(self.ui.server_host.currentText()).strip() self.config.setting["server_port"] = self.ui.server_port.value() self.config.setting["username"] = unicode(self.ui.username.text()) # trivially encode the password, just to not make it so apparent self.config.setting["password"] = rot13(unicode(self.ui.password.text())) self.config.setting["analyze_new_files"] = self.ui.analyze_new_files.isChecked()
def set_new_password(self): config.persist["save_authentication"] = self.ui.save_authentication.isChecked() if config.persist["save_authentication"]: config.setting["username"] = unicode(self.ui.username.text()) config.setting["password"] = rot13(unicode(self.ui.password.text())) self._authenticator.setUser(unicode(self.ui.username.text())) self._authenticator.setPassword(unicode(self.ui.password.text())) self.accept()
def save(self): self.config.setting["server_host"] = unicode(self.ui.server_host.currentText()).strip() self.config.setting["server_port"] = self.ui.server_port.value() self.config.setting["username"] = unicode(self.ui.username.text()) # trivially encode the password, just to not make it so apparent self.config.setting["password"] = rot13(unicode(self.ui.password.text())) self.config.setting["analyze_new_files"] = self.ui.analyze_new_files.isChecked() self.config.setting["ignore_file_mbids"] = self.ui.ignore_file_mbids.isChecked()
def save(self): config.setting["server_host"] = unicode(self.ui.server_host.currentText()).strip() config.setting["server_port"] = self.ui.server_port.value() reload_collections = config.setting["username"] != unicode(self.ui.username.text()) \ or config.setting["password"] != unicode(self.ui.password.text()) config.setting["username"] = unicode(self.ui.username.text()) # trivially encode the password, just to not make it so apparent config.setting["password"] = rot13(unicode(self.ui.password.text())) if reload_collections: load_user_collections() config.setting["analyze_new_files"] = self.ui.analyze_new_files.isChecked() config.setting["ignore_file_mbids"] = self.ui.ignore_file_mbids.isChecked()
def convert(value): return rot13(unicode(value.toString()))