Add "download started" date/time to download history progress bars

This commit is contained in:
Micah Lee 2018-10-09 22:21:03 -07:00
parent 5616a6a965
commit 56e5c8b908
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
2 changed files with 6 additions and 2 deletions

View File

@ -50,11 +50,13 @@ class DownloadHistoryItem(HistoryItem):
self.common = common
self.id = id
self.started = time.time()
self.total_bytes = total_bytes
self.downloaded_bytes = 0
self.started = time.time()
self.started_dt = datetime.fromtimestamp(self.started)
self.setStyleSheet('QWidget { border: 1px solid red; }')
# Label
self.label = QtWidgets.QLabel(strings._('gui_download_in_progress').format(self.started_dt.strftime("%b %d, %I:%M%p")))
# Progress bar
self.progress_bar = QtWidgets.QProgressBar()
@ -69,6 +71,7 @@ class DownloadHistoryItem(HistoryItem):
# Layout
layout = QtWidgets.QVBoxLayout()
layout.addWidget(self.label)
layout.addWidget(self.progress_bar)
self.setLayout(layout)

View File

@ -180,5 +180,6 @@
"gui_upload_in_progress": "Upload Started {}",
"gui_upload_finished_range": "Uploaded {} to {}",
"gui_upload_finished": "Uploaded {}",
"gui_download_in_progress": "Download Started {}",
"gui_open_folder_error_nautilus": "Cannot open folder because nautilus is not available. The file is here: {}"
}