diff options
author | Micah Lee <micah@micahflee.com> | 2019-09-08 17:39:31 -0700 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2019-09-08 17:39:31 -0700 |
commit | 26c9256679c817ce608174ef980815e63dc4f995 (patch) | |
tree | c063027b802ea8783c9cbf1d46c9852789b16242 | |
parent | 2219e107c425ce9c28024cde903e1c6afd7286c1 (diff) | |
download | onionshare-26c9256679c817ce608174ef980815e63dc4f995.tar.gz onionshare-26c9256679c817ce608174ef980815e63dc4f995.zip |
Make web requests indicator icon increment on web requests
-rw-r--r-- | onionshare_gui/mode/__init__.py | 4 | ||||
-rw-r--r-- | onionshare_gui/mode/history.py | 6 | ||||
-rw-r--r-- | onionshare_gui/mode/website_mode/__init__.py | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/onionshare_gui/mode/__init__.py b/onionshare_gui/mode/__init__.py index 69ad00e6..3ef285c4 100644 --- a/onionshare_gui/mode/__init__.py +++ b/onionshare_gui/mode/__init__.py @@ -425,6 +425,10 @@ class Mode(QtWidgets.QWidget): Handle REQUEST_INDVIDIDUAL_FILES_STARTED event. Used in both Share and Website modes, so implemented here. """ + self.toggle_history.update_indicator(True) + self.history.requests_count += 1 + self.history.update_requests() + item = IndividualFileHistoryItem(self.common, event["data"], event["path"]) self.history.add(event["data"]["id"], item) diff --git a/onionshare_gui/mode/history.py b/onionshare_gui/mode/history.py index 568bda7b..5dad9614 100644 --- a/onionshare_gui/mode/history.py +++ b/onionshare_gui/mode/history.py @@ -663,8 +663,8 @@ class History(QtWidgets.QWidget): else: image = self.common.get_resource_path('images/history_requests.png') - self.requests_label.setText('<img src="{0:s}" /> {1:d}'.format(image, self.in_progress_count)) - self.requests_label.setToolTip(strings._('history_requests_tooltip').format(self.in_progress_count)) + self.requests_label.setText('<img src="{0:s}" /> {1:d}'.format(image, self.requests_count)) + self.requests_label.setToolTip(strings._('history_requests_tooltip').format(self.requests_count)) class ToggleHistory(QtWidgets.QPushButton): @@ -697,7 +697,7 @@ class ToggleHistory(QtWidgets.QPushButton): def update_indicator(self, increment=False): """ Update the display of the indicator count. If increment is True, then - only increment the counter if Downloads is hidden. + only increment the counter if History is hidden. """ if increment and not self.history_widget.isVisible(): self.indicator_count += 1 diff --git a/onionshare_gui/mode/website_mode/__init__.py b/onionshare_gui/mode/website_mode/__init__.py index 3d4497f0..b277b6c3 100644 --- a/onionshare_gui/mode/website_mode/__init__.py +++ b/onionshare_gui/mode/website_mode/__init__.py @@ -80,6 +80,8 @@ class WebsiteMode(Mode): strings._('gui_all_modes_history'), 'website' ) + self.history.in_progress_label.hide() + self.history.completed_label.hide() self.history.hide() # Info label |