Browse Source

Use icon for tx saving success message

3.1
Johann Bauer 7 years ago
parent
commit
540b230c8a
No known key found for this signature in database GPG Key ID: 84F1BF925B1F484D
  1. 2
      gui/qt/main_window.py
  2. 6
      gui/qt/util.py

2
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

6
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_()

Loading…
Cancel
Save