Improve Master Public Keys dialog
- Put the radio buttons inside the group box - Share more code between the have-group-box and not cases - Use ChoicesLayout - Don't use cosigner terminology unless it's a Multisig wallet
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
from electrum.i18n import _
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
import os.path
|
||||
import time
|
||||
import traceback
|
||||
import sys
|
||||
import threading
|
||||
import platform
|
||||
from functools import partial
|
||||
|
||||
from electrum.i18n import _
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
|
||||
if platform.system() == 'Windows':
|
||||
MONOSPACE_FONT = 'Lucida Console'
|
||||
@@ -267,7 +269,7 @@ def text_dialog(parent, title, label, ok_label, default=None):
|
||||
return unicode(txt.toPlainText())
|
||||
|
||||
class ChoicesLayout(object):
|
||||
def __init__(self, msg, choices):
|
||||
def __init__(self, msg, choices, on_clicked=None):
|
||||
vbox = QVBoxLayout()
|
||||
if len(msg) > 50:
|
||||
label = QLabel(msg)
|
||||
@@ -289,6 +291,10 @@ class ChoicesLayout(object):
|
||||
group.setId(button, i)
|
||||
if i==0:
|
||||
button.setChecked(True)
|
||||
|
||||
if on_clicked:
|
||||
group.buttonClicked.connect(partial(on_clicked, self))
|
||||
|
||||
self.vbox = vbox
|
||||
|
||||
def layout(self):
|
||||
|
||||
Reference in New Issue
Block a user