From 01b300562e2a1ffbfd7dd47fd094df6936bce70a Mon Sep 17 00:00:00 2001 From: bkkcoins Date: Fri, 21 Sep 2012 08:47:56 +0700 Subject: [PATCH 1/3] Added settings dialog option for gui startup mode --- lib/gui_qt.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/gui_qt.py b/lib/gui_qt.py index c619df375..e38c4a400 100644 --- a/lib/gui_qt.py +++ b/lib/gui_qt.py @@ -38,6 +38,7 @@ except: from wallet import format_satoshis import bmp, mnemonic, pyqrnative, qrscanner +from simple_config import SimpleConfig from decimal import Decimal @@ -1221,7 +1222,7 @@ class ElectrumWindow(QMainWindow): cb.setChecked(self.wallet.expert_mode) if self.wallet.expert_mode: - + usechange_cb = QCheckBox(_('Use change addresses')) grid.addWidget(usechange_cb, 5, 0) usechange_cb.setChecked(self.wallet.use_change) @@ -1241,6 +1242,13 @@ class ElectrumWindow(QMainWindow): grid.addWidget(HelpButton(msg), 6, 2) gap_e.textChanged.connect(lambda: numbify(nz_e,True)) + gui = QComboBox() + gui.addItems(['Lite', 'Qt']) + cfg = SimpleConfig() + gui.setCurrentIndex(gui.findText(cfg.config["gui"].capitalize())) + grid.addWidget(QLabel(_('Default GUI') + ':'), 7, 0) + grid.addWidget(gui, 7, 1) + grid.addWidget(HelpButton(_('Select which GUI mode to use at start up. ')), 7, 2) vbox.addLayout(ok_cancel_buttons(d)) d.setLayout(vbox) @@ -1288,6 +1296,10 @@ class ElectrumWindow(QMainWindow): self.update_receive_tab() else: QMessageBox.warning(self, _('Error'), _('Invalid value'), _('OK')) + + cfg = SimpleConfig() + cfg.config["gui"] = str(gui.currentText()).lower() + cfg.save_config() self.set_expert_mode(cb.isChecked()) From e43264538d34d04fd6b298c6b19b7bda9c0a56e3 Mon Sep 17 00:00:00 2001 From: bkkcoins Date: Fri, 21 Sep 2012 08:51:28 +0700 Subject: [PATCH 2/3] adjust whitespace only --- lib/gui_qt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gui_qt.py b/lib/gui_qt.py index e38c4a400..ce72d6e19 100644 --- a/lib/gui_qt.py +++ b/lib/gui_qt.py @@ -1222,7 +1222,7 @@ class ElectrumWindow(QMainWindow): cb.setChecked(self.wallet.expert_mode) if self.wallet.expert_mode: - + usechange_cb = QCheckBox(_('Use change addresses')) grid.addWidget(usechange_cb, 5, 0) usechange_cb.setChecked(self.wallet.use_change) From fccd9921ebb98eec105712712e997746b4dfd102 Mon Sep 17 00:00:00 2001 From: bkkcoins Date: Fri, 21 Sep 2012 08:52:33 +0700 Subject: [PATCH 3/3] adjust whitespace only --- lib/gui_qt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gui_qt.py b/lib/gui_qt.py index ce72d6e19..47e419cd4 100644 --- a/lib/gui_qt.py +++ b/lib/gui_qt.py @@ -1222,7 +1222,7 @@ class ElectrumWindow(QMainWindow): cb.setChecked(self.wallet.expert_mode) if self.wallet.expert_mode: - + usechange_cb = QCheckBox(_('Use change addresses')) grid.addWidget(usechange_cb, 5, 0) usechange_cb.setChecked(self.wallet.use_change)