summaryrefslogtreecommitdiff
path: root/onionshare_gui
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-09-03 22:18:30 -0700
committerMicah Lee <micah@micahflee.com>2019-09-03 22:18:30 -0700
commitffe12bdeada15295ab452293308b70f778e711f3 (patch)
tree130fd7e1de567528238f50c1a9eff0f8f01c6538 /onionshare_gui
parent655bb5bad1ccadd3aaa0f4bd20119de350429be5 (diff)
downloadonionshare-ffe12bdeada15295ab452293308b70f778e711f3.tar.gz
onionshare-ffe12bdeada15295ab452293308b70f778e711f3.zip
Rename download_count/download_id, upload_count/upload_id, and visit_count/visit_id to simply cur_history_id/history_id, and make all errors create IndividualFileHistoryItem widgets
Diffstat (limited to 'onionshare_gui')
-rw-r--r--onionshare_gui/mode/history.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/onionshare_gui/mode/history.py b/onionshare_gui/mode/history.py
index ce783d46..cd8fe529 100644
--- a/onionshare_gui/mode/history.py
+++ b/onionshare_gui/mode/history.py
@@ -394,9 +394,9 @@ class IndividualFileHistoryItem(HistoryItem):
self.progress_bar.hide()
return
- # Is this a directory listing?
- if self.directory_listing:
- self.status_code_label.setText("200")
+ # Is a status code already sent?
+ if 'status_code' in data:
+ self.status_code_label.setText("{}".format(data['status_code']))
self.status = HistoryItem.STATUS_FINISHED
self.progress_bar.hide()
return
@@ -415,6 +415,7 @@ class IndividualFileHistoryItem(HistoryItem):
self.progress_bar.setValue(downloaded_bytes)
if downloaded_bytes == self.progress_bar.total_bytes:
+ self.status_code_label.setText("200")
self.progress_bar.hide()
self.status = HistoryItem.STATUS_FINISHED