From 540b230c8a19a488b24f4b0707098a5ca748bf3d Mon Sep 17 00:00:00 2001 From: Johann Bauer Date: Tue, 27 Feb 2018 16:54:35 +0100 Subject: [PATCH] Use icon for tx saving success message --- gui/qt/main_window.py | 2 +- gui/qt/util.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 944ca4df9..65906dabf 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -3151,7 +3151,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.wallet.save_transactions(write=True) # need to update at least: history_list, utxo_list, address_list self.need_update.set() - self.show_message(_("Transaction saved successfully")) + self.msg_box(QPixmap(":icons/offline_tx.png"), None, _('Success'), _("Transaction saved successfully")) return True diff --git a/gui/qt/util.py b/gui/qt/util.py index 2010b51b1..3312afb7f 100644 --- a/gui/qt/util.py +++ b/gui/qt/util.py @@ -202,7 +202,11 @@ class MessageBoxMixin(object): def msg_box(self, icon, parent, title, text, buttons=QMessageBox.Ok, defaultButton=QMessageBox.NoButton): parent = parent or self.top_level_window() - d = QMessageBox(icon, title, str(text), buttons, parent) + if type(icon) is QPixmap: + d = QMessageBox(QMessageBox.Information, title, str(text), buttons, parent) + d.setIconPixmap(icon) + else: + d = QMessageBox(icon, title, str(text), buttons, parent) d.setWindowModality(Qt.WindowModal) d.setDefaultButton(defaultButton) return d.exec_()