diff --git a/src/cutecoin/gui/certification.py b/src/cutecoin/gui/certification.py index 2ec0b190ac0e5da02d94fbdcb7d332bb3ba7ccb3..5f4d668d6dc2e4f959b3c42a6828e99f9e1c1269 100644 --- a/src/cutecoin/gui/certification.py +++ b/src/cutecoin/gui/certification.py @@ -3,7 +3,8 @@ Created on 24 dec. 2014 @author: inso ''' -from PyQt5.QtWidgets import QDialog, QMessageBox, QDialogButtonBox +from PyQt5.QtWidgets import QDialog, QMessageBox, QDialogButtonBox, QApplication +from PyQt5.QtCore import Qt from ..tools.exceptions import NoPeerAvailable from ..gen_resources.certification_uic import Ui_CertificationDialog @@ -42,6 +43,7 @@ class CertificationDialog(QDialog, Ui_CertificationDialog): return try: + QApplication.setOverrideCursor(Qt.WaitCursor) self.account.certify(password, self.community, pubkey) QMessageBox.information(self, "Certification", "Success certifying {0} from {1}".format(pubkey, @@ -61,6 +63,8 @@ class CertificationDialog(QDialog, Ui_CertificationDialog): "{0}".format(e), QMessageBox.Ok) return + finally: + QApplication.restoreOverrideCursor() super().accept() diff --git a/src/cutecoin/gui/mainwindow.py b/src/cutecoin/gui/mainwindow.py index 0203a38f7f94d32d4c1b612e55493a5dae90f012..3e8abf41995098f5e84a610f35901f4848400072 100644 --- a/src/cutecoin/gui/mainwindow.py +++ b/src/cutecoin/gui/mainwindow.py @@ -8,9 +8,9 @@ from ..gen_resources.about_uic import Ui_AboutPopup from ..gen_resources.homescreen_uic import Ui_HomeScreenWidget from PyQt5.QtWidgets import QMainWindow, QAction, QFileDialog, QProgressBar, \ - QMessageBox, QLabel, QComboBox, QDialog + QMessageBox, QLabel, QComboBox, QDialog, QApplication from PyQt5.QtCore import QSignalMapper, QObject, QThread, \ - pyqtSlot, pyqtSignal, QDate, QDateTime, QTimer, QUrl + pyqtSlot, pyqtSignal, QDate, QDateTime, QTimer, QUrl, Qt from PyQt5.QtGui import QIcon, QDesktopServices from .process_cfg_account import ProcessConfigureAccount @@ -122,6 +122,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): def loader_finished(self): self.refresh() self.busybar.hide() + QApplication.restoreOverrideCursor() self.app.disconnect() self.app.monitor.start_watching() @@ -170,6 +171,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.busybar.setMaximum(maximum) self.app.current_account = None self.refresh() + QApplication.setOverrideCursor(Qt.BusyCursor) self.app.loading_progressed.connect(loading_progressed) self.busybar.setMinimum(0) self.busybar.setMaximum(0) diff --git a/src/cutecoin/gui/transfer.py b/src/cutecoin/gui/transfer.py index 9b21affcb5a18126b3190c80206ce89970dade7e..5ea7c494e28e192b2cf08f174ec11887ee49b35c 100644 --- a/src/cutecoin/gui/transfer.py +++ b/src/cutecoin/gui/transfer.py @@ -3,9 +3,9 @@ Created on 2 févr. 2014 @author: inso ''' -from PyQt5.QtWidgets import QDialog, QMessageBox -from PyQt5.QtCore import QRegExp -from PyQt5.QtGui import QRegExpValidator, QValidator +from PyQt5.QtWidgets import QDialog, QMessageBox, QApplication +from PyQt5.QtCore import QRegExp, Qt +from PyQt5.QtGui import QRegExpValidator from ..tools.exceptions import NotEnoughMoneyError, NoPeerAvailable from ..gen_resources.transfer_uic import Ui_TransferMoneyDialog @@ -72,6 +72,7 @@ class TransferMoneyDialog(QDialog, Ui_TransferMoneyDialog): return try: + QApplication.setOverrideCursor(Qt.WaitCursor) self.wallet.send_money(self.account.salt, password, self.community, recipient, amount, comment) QMessageBox.information(self, "Money transfer", @@ -97,6 +98,9 @@ Please try again later""") "{0}".format(str(e)), QMessageBox.Ok) return + finally: + QApplication.restoreOverrideCursor() + super().accept() def amount_changed(self):