Skip to content
Snippets Groups Projects
Commit ac0d899a authored by inso's avatar inso
Browse files

Added waiting cursor to operations #94

parent efa6f3b7
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
......@@ -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)
......
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment