aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-12-26 18:01:52 -0500
committerJesús <heckyel@hyperbola.info>2019-12-26 18:01:52 -0500
commit5b44781e3be68c5c6d7cbc6034e85111613eb36d (patch)
tree797387b37439d5b7d7b2a9a10f9db08750cee401
parent98e3f5e6447789f21953ba32ac3e2b5f6ca9ceda (diff)
downloadhypervideo-gui-5b44781e3be68c5c6d7cbc6034e85111613eb36d.tar.lz
hypervideo-gui-5b44781e3be68c5c6d7cbc6034e85111613eb36d.tar.xz
hypervideo-gui-5b44781e3be68c5c6d7cbc6034e85111613eb36d.zip
Check if it's completed download
-rw-r--r--hypervideo_gui/main_ui.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/hypervideo_gui/main_ui.py b/hypervideo_gui/main_ui.py
index 1ed9d22..a676143 100644
--- a/hypervideo_gui/main_ui.py
+++ b/hypervideo_gui/main_ui.py
@@ -428,15 +428,14 @@ class MainWindow(QMainWindow):
def msg_dl_finished(self):
''' Message finished download '''
- self.pbar.setValue(100)
-
- msg = QMessageBox()
- msg.setWindowTitle('%s' % __title__)
- msg.setText('Download done!')
- msg.setIcon(QMessageBox.Information)
- self.show()
-
- msg.exec_()
+ # Check if it's completed download
+ if self.pbar.value() == 100:
+ msg = QMessageBox()
+ msg.setWindowTitle('%s' % __title__)
+ msg.setIcon(QMessageBox.Information)
+ msg.setText('Download done!')
+ self.show()
+ msg.exec_()
def cancel_download(self):
''' Cancel download'''