def on_btnChangePin_clicked(self): try: if self.hw_client and self.pin_protection is True: hw_intf.change_pin(self.main_ui.hw_session, remove=False) self.read_hw_features() self.updateControlsState() except Exception as e: self.errorMsg(str(e))
def btnChangePinClick(self): try: if self.hw_client and self.features.pin_protection: hw_intf.change_pin(self.main_ui, remove=False) self.features = self.hw_client.features self.updateControlsState() except Exception as e: self.errorMsg(str(e))
def on_btnEnDisPin_clicked(self): try: if self.hw_session and self.hw_session.hw_client: if self.pin_protection is True: # disable if self.queryDlg('Do you really want to disable PIN protection of your %s?' % self.main_ui.getHwName(), buttons=QMessageBox.Yes | QMessageBox.Cancel, default_button=QMessageBox.Cancel, icon=QMessageBox.Warning) == QMessageBox.Yes: hw_intf.change_pin(self.main_ui.hw_session, remove=True) self.read_hw_features() self.updateControlsState() elif self.pin_protection is False: # enable PIN hw_intf.change_pin(self.main_ui.hw_session, remove=False) self.read_hw_features() self.updateControlsState() except Exception as e: self.errorMsg(str(e))