示例#1
0
 def createAP(self, createAp=None):
     if not self.setting['runningAp'].status['active']:
         self.setting['runningAp'].activeAp = createAp
         self.setting['runningAp'].runAp()
     else:
         GuiComponent.sendErrorDialog(self.parrent, self._('AP is running'), self._('Before start new one, turn off running AP.'))
     self.parent.showFirstPage()
示例#2
0
 def createAP(self, createAp=None):
     if not self.setting['runningAp'].status['active']:
         self.setting['runningAp'].activeAp = createAp
         self.setting['runningAp'].runAp()
     else:
         GuiComponent.sendErrorDialog(
             self.parrent, self._('AP is running'),
             self._('Before start new one, turn off running AP.'))
     self.parent.showFirstPage()
示例#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
示例#4
0
 def createAP(self, button=None):
     if not self.setting['runningAp'].status['active']:
             createAp = None
             selection = self.treeview.get_selection()
             model, paths = selection.get_selected_rows()
             for path in paths:
                 iter = model.get_iter(path)
                 createAp = self.setting['userSetting'].searchAp(model[iter][0],model[iter][1],model[iter][2])
             if createAp != None:
                 self.setting['runningAp'].activeAp = createAp
                 self.setting['runningAp'].runAp()
     else:
         GuiComponent.sendErrorDialog(self.parent, self._('AP is running'), self._('Before start new one, turn off running AP.'))
     self.parent.showFirstPage()
示例#5
0
 def createAP(self, button=None):
     if not self.setting['runningAp'].status['active']:
         createAp = None
         selection = self.treeview.get_selection()
         model, paths = selection.get_selected_rows()
         for path in paths:
             iter = model.get_iter(path)
             createAp = self.setting['userSetting'].searchAp(
                 model[iter][0], model[iter][1], model[iter][2])
         if createAp != None:
             self.setting['runningAp'].activeAp = createAp
             self.setting['runningAp'].runAp()
     else:
         GuiComponent.sendErrorDialog(
             self.parent, self._('AP is running'),
             self._('Before start new one, turn off running AP.'))
     self.parent.showFirstPage()
示例#6
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
示例#7
0
 def errorButtonAction(self, button=None):
     GuiComponent.sendErrorDialog(
         self.parent, self.setting['runningAp'].errorMsg['title'],
         self.setting['runningAp'].errorMsg['text'])
示例#8
0
 def errorButtonAction(self, button=None):
     GuiComponent.sendErrorDialog(self.parent, self.setting['runningAp'].errorMsg['title'], self.setting['runningAp'].errorMsg['text'])