v0.48.2: the finished upload window hides Stop instead of greying it to blank
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
"""LinTunes — iTunes-style music library manager and player for Linux."""
|
||||
|
||||
__version__ = "0.48.1"
|
||||
__version__ = "0.48.2"
|
||||
|
||||
@@ -1084,7 +1084,9 @@ class MainWindow(QMainWindow):
|
||||
run["step"] = web_progress.UPLOAD
|
||||
run["export"] = summary
|
||||
self._web_progress.complete(
|
||||
web_progress.EXPORT, f"{summary['exported']} tracks")
|
||||
web_progress.EXPORT,
|
||||
f"{summary['exported']} track"
|
||||
f"{'s' if summary['exported'] != 1 else ''}")
|
||||
self._web_progress.begin(web_progress.UPLOAD, "Starting…")
|
||||
self._upload_worker = upload.UploadWorker(
|
||||
run["host"], run["plan"].dest_dir, run["rdir"], self)
|
||||
|
||||
@@ -106,5 +106,7 @@ class WebUploadProgress(QDialog):
|
||||
for step, bar in enumerate(self._bars):
|
||||
if bar.maximum() == 0:
|
||||
bar.setRange(0, 100)
|
||||
self._stop.setEnabled(False)
|
||||
# Hidden, not disabled: a disabled button's text is nearly invisible
|
||||
# in this palette, and there is nothing left to stop.
|
||||
self._stop.hide()
|
||||
self._hide.setText("Close")
|
||||
|
||||
@@ -474,3 +474,12 @@ def test_description_and_image_are_spaced_apart(tmp_path):
|
||||
gap = page[page.index(plan.description) + len(plan.description):
|
||||
page.index("placeholder.png")]
|
||||
assert "<br><br>" in gap
|
||||
|
||||
|
||||
def test_finished_window_hides_stop(qapp):
|
||||
from lintunes.gui.web_upload_progress import WebUploadProgress
|
||||
win = WebUploadProgress("Mix", f"{HOST}:/srv/mixes/mix")
|
||||
win.show()
|
||||
win.finish("done")
|
||||
assert win._stop.isHidden() and win._hide.text() == "Close"
|
||||
win.close()
|
||||
|
||||
Reference in New Issue
Block a user