def checkQueue(self):
        gotOne = False

        # wait until processing is done
        if not addressGeneratorQueue.empty():
            self.setError(None)
            return

        while True:
            try:
                addressGeneratorReturnValue = apiAddressGeneratorReturnQueue.get(False)
            except Empty:
                if gotOne:
                    break
                else:
                    return
            else:
                gotOne = True

        if len(addressGeneratorReturnValue) == 0:
            self.setError(_translate("AddressValidator", "Address already present as one of your identities."))
            return (QtGui.QValidator.Intermediate, 0)
        if addressGeneratorReturnValue[0] == 'chan name does not match address':
            self.setError(_translate("AddressValidator", "Although the Bitmessage address you entered was valid, it doesn\'t match the chan name."))
            return (QtGui.QValidator.Intermediate, 0)
        self.setOK(_translate("MainWindow", "Passphrase and address appear to be valid."))
    def checkQueue(self):
        gotOne = False

        # wait until processing is done
        if not addressGeneratorQueue.empty():
            self.setError(None)
            return

        while True:
            try:
                addressGeneratorReturnValue = apiAddressGeneratorReturnQueue.get(False)
            except Empty:
                if gotOne:
                    break
                else:
                    return
            else:
                gotOne = True

        if len(addressGeneratorReturnValue) == 0:
            self.setError(_translate("AddressValidator", "Address already present as one of your identities."))
            return (QtGui.QValidator.Intermediate, 0)
        if addressGeneratorReturnValue[0] == 'chan name does not match address':
            self.setError(_translate("AddressValidator", "Although the Bitmessage address you entered was valid, it doesn\'t match the chan name."))
            return (QtGui.QValidator.Intermediate, 0)
        self.setOK(_translate("MainWindow", "Passphrase and address appear to be valid."))