Made cfg an class attribute and fixed server changing for lite gui since proxy got added
This commit is contained in:
parent
a08f2660df
commit
504ea37c79
|
@ -232,11 +232,11 @@ class MiniWindow(QDialog):
|
||||||
close_shortcut = QShortcut(QKeySequence("Ctrl+W"), self)
|
close_shortcut = QShortcut(QKeySequence("Ctrl+W"), self)
|
||||||
close_shortcut.activated.connect(self.close)
|
close_shortcut.activated.connect(self.close)
|
||||||
|
|
||||||
cfg = SimpleConfig()
|
self.cfg = SimpleConfig()
|
||||||
g = cfg.config["winpos-lite"]
|
g = self.cfg.config["winpos-lite"]
|
||||||
self.setGeometry(g[0], g[1], g[2], g[3])
|
self.setGeometry(g[0], g[1], g[2], g[3])
|
||||||
show_history.setChecked(cfg.config["history"])
|
show_history.setChecked(self.cfg.config["history"])
|
||||||
self.show_history(cfg.config["history"])
|
self.show_history(self.cfg.config["history"])
|
||||||
|
|
||||||
self.setWindowIcon(QIcon(":electrum.png"))
|
self.setWindowIcon(QIcon(":electrum.png"))
|
||||||
self.setWindowTitle("Electrum")
|
self.setWindowTitle("Electrum")
|
||||||
|
@ -254,11 +254,10 @@ class MiniWindow(QDialog):
|
||||||
QDir.setCurrent(old_path)
|
QDir.setCurrent(old_path)
|
||||||
|
|
||||||
def closeEvent(self, event):
|
def closeEvent(self, event):
|
||||||
cfg = SimpleConfig()
|
|
||||||
g = self.geometry()
|
g = self.geometry()
|
||||||
cfg.set_key("winpos-lite", [g.left(),g.top(),g.width(),g.height()])
|
self.cfg.set_key("winpos-lite", [g.left(),g.top(),g.width(),g.height()])
|
||||||
cfg.set_key("history", self.history_list.isVisible())
|
self.cfg.set_key("history", self.history_list.isVisible())
|
||||||
cfg.save_config()
|
self.cfg.save_config()
|
||||||
|
|
||||||
super(MiniWindow, self).closeEvent(event)
|
super(MiniWindow, self).closeEvent(event)
|
||||||
qApp.quit()
|
qApp.quit()
|
||||||
|
@ -620,8 +619,10 @@ class MiniActuator:
|
||||||
protocol = "t"
|
protocol = "t"
|
||||||
port = tcp_port[0]
|
port = tcp_port[0]
|
||||||
server_line = "%s:%s:%s" % (server_name, port, protocol)
|
server_line = "%s:%s:%s" % (server_name, port, protocol)
|
||||||
|
|
||||||
# Should this have exception handling?
|
# Should this have exception handling?
|
||||||
self.wallet.set_server(server_line)
|
self.cfg = SimpleConfig()
|
||||||
|
self.wallet.set_server(server_line, self.cfg.config["proxy"])
|
||||||
|
|
||||||
def copy_address(self, receive_popup):
|
def copy_address(self, receive_popup):
|
||||||
"""Copy the wallet addresses into the client."""
|
"""Copy the wallet addresses into the client."""
|
||||||
|
|
Loading…
Reference in New Issue