(self)
| 26 | self.chanPassPhrase.validator().checkQueue() |
| 27 | |
| 28 | def accept(self): |
| 29 | self.timer.stop() |
| 30 | self.hide() |
| 31 | apiAddressGeneratorReturnQueue.queue.clear() |
| 32 | if self.chanAddress.text().toUtf8() == "": |
| 33 | addressGeneratorQueue.put(('createChan', 4, 1, str_chan + ' ' + str(self.chanPassPhrase.text().toUtf8()), self.chanPassPhrase.text().toUtf8(), True)) |
| 34 | else: |
| 35 | addressGeneratorQueue.put(('joinChan', addBMIfNotPresent(self.chanAddress.text().toUtf8()), str_chan + ' ' + str(self.chanPassPhrase.text().toUtf8()), self.chanPassPhrase.text().toUtf8(), True)) |
| 36 | addressGeneratorReturnValue = apiAddressGeneratorReturnQueue.get(True) |
| 37 | if len(addressGeneratorReturnValue) > 0 and addressGeneratorReturnValue[0] != 'chan name does not match address': |
| 38 | UISignalQueue.put(('updateStatusBar', _translate("newchandialog", "Successfully created / joined chan %1").arg(unicode(self.chanPassPhrase.text())))) |
| 39 | self.parent.ui.tabWidget.setCurrentIndex( |
| 40 | self.parent.ui.tabWidget.indexOf(self.parent.ui.chans) |
| 41 | ) |
| 42 | self.done(QtGui.QDialog.Accepted) |
| 43 | else: |
| 44 | UISignalQueue.put(('updateStatusBar', _translate("newchandialog", "Chan creation / joining failed"))) |
| 45 | self.done(QtGui.QDialog.Rejected) |
| 46 | |
| 47 | def reject(self): |
| 48 | self.timer.stop() |
no test coverage detected