示例#1
0
 def elaborationNewApForm(self):
     if self.apName.get_text() != "":
         if (len(self.apPassword.get_text())
                 == 0) or len(self.apPassword.get_text()) >= 8:
             newApConfiguration = [
                 self.apName.get_text(),
                 self.apPassword.get_text(),
                 GuiComponent.getComboBoxSelect(self.interface1ComboBox),
                 GuiComponent.getComboBoxSelect(self.interface2ComboBox)
             ]
             self.apName.set_text("")
             self.apPassword.set_text("")
             return newApConfiguration
         else:
             GuiComponent.sendErrorDialog(self.parent,
                                          self._('Invalid password length'),
                                          self._('expected length 8..63'))
             raise ValueError
     else:
         GuiComponent.sendErrorDialog(self.parent,
                                      self._('Ap name is Empty'),
                                      self._('Please fill it.'))
         raise ValueError
示例#2
0
 def saveSetting(self, button=None):
     self.setting['userSetting'].language['name'] = GuiComponent.getComboBoxSelect(self.languageComboBox)
     self.setting['language'].update(self.setting)
     self.setting['userSetting'].save()
示例#3
0
 def elaborationNewApForm(self):
     if self.apName.get_text() != "":
         if (len(self.apPassword.get_text()) == 0) or len(self.apPassword.get_text()) >= 8:
             newApConfiguration = [self.apName.get_text(), self.apPassword.get_text(), GuiComponent.getComboBoxSelect(self.interface1ComboBox),GuiComponent.getComboBoxSelect(self.interface2ComboBox)]
             self.apName.set_text("")
             self.apPassword.set_text("")
             return newApConfiguration
         else:
             GuiComponent.sendErrorDialog(self.parent, self._('Invalid password length'), self._('expected length 8..63'))
             raise ValueError
     else:
         GuiComponent.sendErrorDialog(self.parent, self._('Ap name is Empty'), self._('Please fill it.'))
         raise ValueError