From 204d7507d66c1e504ace14ae75d6e2680a87b945 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 28 Apr 2014 15:25:47 +0200 Subject: [PATCH] show_before_broadcast option in gui --- gui/qt/main_window.py | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index a039f91..18c4b8f 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -853,7 +853,7 @@ class ElectrumWindow(QMainWindow): if label: self.wallet.set_label(tx.hash(), label) - if not tx.is_complete(): + if not tx.is_complete() or self.config.get('show_before_broadcast'): self.show_transaction(tx) return @@ -2121,9 +2121,14 @@ class ElectrumWindow(QMainWindow): grid.addWidget(block_ex_combo, 5, 1) grid.addWidget(HelpButton(_('Choose which online block explorer to use for functions that open a web browser')+' '), 5, 2) - grid.setRowStretch(6,1) + show_tx = self.config.get('show_before_broadcast', False) + showtx_cb = QCheckBox(_('Show before broadcast')) + showtx_cb.setChecked(show_tx) + grid.addWidget(showtx_cb, 6, 0) + grid.addWidget(HelpButton(_('Display the details of your transactions before broadcasting it.')), 6, 2) vbox.addLayout(grid) + vbox.addStretch(1) vbox.addLayout(ok_cancel_buttons(d)) d.setLayout(vbox) @@ -2158,6 +2163,9 @@ class ElectrumWindow(QMainWindow): self.wallet.use_change = usechange_result self.wallet.storage.put('use_change', self.wallet.use_change) + if showtx_cb.isChecked() != show_tx: + self.config.set_key('show_before_broadcast', not show_tx) + unit_result = units[unit_combo.currentIndex()] if self.base_unit() != unit_result: self.decimal_point = 8 if unit_result == 'BTC' else 5 -- 1.7.1