reformatting
This commit is contained in:
@@ -498,7 +498,7 @@ class ButtonsWidget(QWidget):
|
||||
def addCopyButton(self, app):
|
||||
self.app = app
|
||||
f = lambda: self.app.clipboard().setText(str(self.text()))
|
||||
self.addButton(":icons/copy.png", f, _("Copy to Clipboard"))
|
||||
self.addButton(":icons/copy.png", f, _("Copy to clipboard"))
|
||||
|
||||
class ButtonsLineEdit(QLineEdit, ButtonsWidget):
|
||||
def __init__(self, text=None):
|
||||
|
||||
18
gui/text.py
18
gui/text.py
@@ -359,16 +359,15 @@ class ElectrumGui:
|
||||
w.refresh()
|
||||
if getchar: c = self.stdscr.getch()
|
||||
|
||||
|
||||
def run_popup(self, title, items):
|
||||
return self.run_dialog(title, map(lambda x: {'type':'button','label':x}, items), interval=1, y_pos = self.pos+3)
|
||||
|
||||
|
||||
def network_dialog(self):
|
||||
if not self.network: return
|
||||
host, port, protocol, proxy_config, auto_connect = self.network.get_parameters()
|
||||
if not self.network:
|
||||
return
|
||||
params = self.network.get_parameters()
|
||||
host, port, protocol, proxy_config, auto_connect = params
|
||||
srv = 'auto-connect' if auto_connect else self.network.default_server
|
||||
|
||||
out = self.run_dialog('Network', [
|
||||
{'label':'server', 'type':'str', 'value':srv},
|
||||
{'label':'proxy', 'type':'str', 'value':self.config.get('proxy', '')},
|
||||
@@ -383,16 +382,9 @@ class ElectrumGui:
|
||||
except Exception:
|
||||
self.show_message("Error:" + server + "\nIn doubt, type \"auto-connect\"")
|
||||
return False
|
||||
|
||||
if out.get('proxy'):
|
||||
proxy = self.parse_proxy_options(out.get('proxy'))
|
||||
else:
|
||||
proxy = None
|
||||
|
||||
proxy = self.parse_proxy_options(out.get('proxy')) if out.get('proxy') else None
|
||||
self.network.set_parameters(host, port, protocol, proxy, auto_connect)
|
||||
|
||||
|
||||
|
||||
def settings_dialog(self):
|
||||
fee = str(Decimal(self.wallet.fee_per_kb(self.config)) / COIN)
|
||||
out = self.run_dialog('Settings', [
|
||||
|
||||
Reference in New Issue
Block a user