summaryrefslogtreecommitdiff
path: root/onionshare_gui
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2018-10-09 22:21:03 -0700
committerMicah Lee <micah@micahflee.com>2018-10-09 22:21:03 -0700
commit56e5c8b90879d7c7053e506fe9d913736717539a (patch)
tree8591c1ff89e67c24e469c79cc942957160f16969 /onionshare_gui
parent5616a6a965b8662e20b5608788e3e17a1eb22af0 (diff)
downloadonionshare-56e5c8b90879d7c7053e506fe9d913736717539a.tar.gz
onionshare-56e5c8b90879d7c7053e506fe9d913736717539a.zip
Add "download started" date/time to download history progress bars
Diffstat (limited to 'onionshare_gui')
-rw-r--r--onionshare_gui/mode/history.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/onionshare_gui/mode/history.py b/onionshare_gui/mode/history.py
index cf944aa0..8cfa0ed5 100644
--- a/onionshare_gui/mode/history.py
+++ b/onionshare_gui/mode/history.py
@@ -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)