diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py index e611b3e3..003117f5 100644 --- a/gui/qt/installwizard.py +++ b/gui/qt/installwizard.py @@ -1,10 +1,14 @@ +import re +import sys +import threading + from PyQt4.QtGui import * from PyQt4.QtCore import * import PyQt4.QtCore as QtCore import electrum from electrum.i18n import _ -from electrum import Wallet, Wallet_2of2, Wallet_2of3 +from electrum import Wallet from electrum import bitcoin from electrum import util @@ -13,8 +17,6 @@ from network_dialog import NetworkDialog from util import * from amountedit import AmountEdit -import sys -import threading from electrum.plugins import always_hook, run_hook from electrum.mnemonic import prepare_seed @@ -26,6 +28,42 @@ MSG_ENTER_SEED_OR_MPK = _("Please enter a wallet seed, BIP32 private key, or mas MSG_VERIFY_SEED = _("Your seed is important!") + "\n" + _("To make sure that you have properly saved your seed, please retype it here.") +class CosignWidget(QWidget): + size = 120 + + def __init__(self, m, n): + QWidget.__init__(self) + self.R = QRect(0, 0, self.size, self.size) + self.setGeometry(self.R) + self.m = m + self.n = n + + def set_n(self, n): + self.n = n + self.update() + + def set_m(self, m): + self.m = m + self.update() + + def paintEvent(self, event): + import math + bgcolor = self.palette().color(QPalette.Background) + pen = QPen(bgcolor, 7, QtCore.Qt.SolidLine) + qp = QPainter() + qp.begin(self) + qp.setPen(pen) + qp.setRenderHint(QPainter.Antialiasing) + qp.setBrush(Qt.gray) + for i in range(self.n): + alpha = int(16* 360 * i/self.n) + alpha2 = int(16* 360 * 1/self.n) + qp.setBrush(Qt.green if i