mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-13 08:35:46 -04:00
Add "download started" date/time to download history progress bars
This commit is contained in:
parent
5616a6a965
commit
56e5c8b908
2 changed files with 6 additions and 2 deletions
|
@ -50,11 +50,13 @@ class DownloadHistoryItem(HistoryItem):
|
||||||
self.common = common
|
self.common = common
|
||||||
|
|
||||||
self.id = id
|
self.id = id
|
||||||
self.started = time.time()
|
|
||||||
self.total_bytes = total_bytes
|
self.total_bytes = total_bytes
|
||||||
self.downloaded_bytes = 0
|
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
|
# Progress bar
|
||||||
self.progress_bar = QtWidgets.QProgressBar()
|
self.progress_bar = QtWidgets.QProgressBar()
|
||||||
|
@ -69,6 +71,7 @@ class DownloadHistoryItem(HistoryItem):
|
||||||
|
|
||||||
# Layout
|
# Layout
|
||||||
layout = QtWidgets.QVBoxLayout()
|
layout = QtWidgets.QVBoxLayout()
|
||||||
|
layout.addWidget(self.label)
|
||||||
layout.addWidget(self.progress_bar)
|
layout.addWidget(self.progress_bar)
|
||||||
self.setLayout(layout)
|
self.setLayout(layout)
|
||||||
|
|
||||||
|
|
|
@ -180,5 +180,6 @@
|
||||||
"gui_upload_in_progress": "Upload Started {}",
|
"gui_upload_in_progress": "Upload Started {}",
|
||||||
"gui_upload_finished_range": "Uploaded {} to {}",
|
"gui_upload_finished_range": "Uploaded {} to {}",
|
||||||
"gui_upload_finished": "Uploaded {}",
|
"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: {}"
|
"gui_open_folder_error_nautilus": "Cannot open folder because nautilus is not available. The file is here: {}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue