1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

Provide more feedback during scans

- Add output for number of collected files / folders
- Update to allow indeterminate progress bar
- Remove unused hscommon\jobprogress\qt.py
This commit is contained in:
2021-08-28 04:05:07 -05:00
parent b0baa5bfd6
commit 4c3dfe2f1f
4 changed files with 16 additions and 55 deletions

View File

@@ -7,6 +7,8 @@
from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtWidgets import QProgressDialog
from hscommon.trans import tr
class ProgressWindow:
def __init__(self, parent, model):
@@ -27,11 +29,15 @@ class ProgressWindow:
def set_progress(self, last_progress):
if self._window is not None:
if last_progress < 0:
self._window.setRange(0, 0)
else:
self._window.setRange(0, 100)
self._window.setValue(last_progress)
def show(self):
flags = Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint
self._window = QProgressDialog("", "Cancel", 0, 100, self.parent, flags)
self._window = QProgressDialog("", tr("Cancel"), 0, 100, self.parent, flags)
self._window.setModal(True)
self._window.setAutoReset(False)
self._window.setAutoClose(False)