Ejemplo n.º 1
0
    def __init__(self, parent, main, initLabel='', passphraseCallback=None):
        super(SetPassphraseFrame, self).__init__(parent, main)
        self.passphraseCallback = passphraseCallback
        layout = QGridLayout()
        lblDlgDescr = QLabel(
            'Please enter a passphrase for wallet encryption.\n\n'
            'A good passphrase consists of at least 10 or more\n'
            'random letters, or 6 or more random words.\n')
        lblDlgDescr.setWordWrap(True)
        layout.addWidget(lblDlgDescr, 0, 0, 1, 2)
        lblPwd1 = QLabel("New Passphrase:")
        self.editPasswd1 = QLineEdit()
        self.editPasswd1.setEchoMode(QLineEdit.Password)
        self.editPasswd1.setMinimumWidth(MIN_PASSWD_WIDTH(self))

        lblPwd2 = QLabel("Again:")
        self.editPasswd2 = QLineEdit()
        self.editPasswd2.setEchoMode(QLineEdit.Password)
        self.editPasswd2.setMinimumWidth(MIN_PASSWD_WIDTH(self))

        layout.addWidget(lblPwd1, 1, 0)
        layout.addWidget(lblPwd2, 2, 0)
        layout.addWidget(self.editPasswd1, 1, 1)
        layout.addWidget(self.editPasswd2, 2, 1)

        self.lblMatches = QLabel(' ' * 20)
        self.lblMatches.setTextFormat(Qt.RichText)
        layout.addWidget(self.lblMatches, 3, 1)
        self.setLayout(layout)
        self.connect(self.editPasswd1, SIGNAL('textChanged(QString)'), \
                     self.checkPassphrase)
        self.connect(self.editPasswd2, SIGNAL('textChanged(QString)'), \
                     self.checkPassphrase)

        # These help us collect entropy as the user goes through the wizard
        # to be used for wallet creation
        self.main.registerWidgetActivateTime(self)
Ejemplo n.º 2
0
   def __init__(self, parent, main, initLabel=''):
      super(VerifyPassphraseFrame, self).__init__(parent, main)
      lblWarnImgL = QLabel()
      lblWarnImgL.setPixmap(QPixmap(':/MsgBox_warning48.png'))
      lblWarnImgL.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter)

      lblWarnTxt1 = QRichLabel(\
         '<font color="red"><b>!!! DO NOT FORGET YOUR PASSPHRASE !!!</b></font>', size=4)
      lblWarnTxt1.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter)
      lblWarnTxt2 = QRichLabel(\
         '<b>No one can help you recover you groestlcoins if you forget the '
         'passphrase and don\'t have a paper backup!</b> Your wallet and '
         'any <u>digital</u> backups are useless if you forget it.  '
         '<br><br>'
         'A <u>paper</u> backup protects your wallet forever, against '
         'hard-drive loss and losing your passphrase.  It also protects you '
         'from theft, if the wallet was encrypted and the paper backup '
         'was not stolen with it.  Please make a paper backup and keep it in '
         'a safe place.'
         '<br><br>'
         'Please enter your passphrase a third time to indicate that you '
         'are aware of the risks of losing your passphrase!</b>', doWrap=True)


      self.edtPasswd3 = QLineEdit()
      self.edtPasswd3.setEchoMode(QLineEdit.Password)
      self.edtPasswd3.setMinimumWidth(MIN_PASSWD_WIDTH(self))

      layout = QGridLayout()
      layout.addWidget(lblWarnImgL, 0, 0, 4, 1)
      layout.addWidget(lblWarnTxt1, 0, 1, 1, 1)
      layout.addWidget(lblWarnTxt2, 2, 1, 1, 1)
      layout.addWidget(self.edtPasswd3, 5, 1, 1, 1)
      self.setLayout(layout)

      # These help us collect entropy as the user goes through the wizard
      # to be used for wallet creation
      self.main.registerWidgetActivateTime(self)