diff options
author | Micah Lee <micah@micahflee.com> | 2018-10-07 18:20:13 -0700 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2018-10-07 18:20:32 -0700 |
commit | 38e62d85288c9947f089b6ba80dc3146178d2a3a (patch) | |
tree | c751e9cd5a9cad6120e4c3e27acf2c1d032cd232 /onionshare_gui | |
parent | bc573209d9be256822bee00dec6c1376ee197a98 (diff) | |
download | onionshare-38e62d85288c9947f089b6ba80dc3146178d2a3a.tar.gz onionshare-38e62d85288c9947f089b6ba80dc3146178d2a3a.zip |
The History header is now only shown if there are items again, and the clear history button resets everything. Also, reset hides individual items because, for some reason, they still show up otherwise.
Diffstat (limited to 'onionshare_gui')
-rw-r--r-- | onionshare_gui/mode/history.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/onionshare_gui/mode/history.py b/onionshare_gui/mode/history.py index a28340a4..0f8ccdca 100644 --- a/onionshare_gui/mode/history.py +++ b/onionshare_gui/mode/history.py @@ -165,6 +165,7 @@ class HistoryItemList(QtWidgets.QScrollArea): """ for item in self.items.values(): self.items_layout.removeWidget(item) + item.hide() self.items = {} @@ -222,6 +223,7 @@ class History(QtWidgets.QWidget): # When there are items self.item_list = HistoryItemList(self.common) self.not_empty_layout = QtWidgets.QVBoxLayout() + self.not_empty_layout.addLayout(header_layout) self.not_empty_layout.addWidget(self.item_list) self.not_empty = QtWidgets.QWidget() self.not_empty.setLayout(self.not_empty_layout) @@ -229,15 +231,12 @@ class History(QtWidgets.QWidget): # Layout layout = QtWidgets.QVBoxLayout() layout.setContentsMargins(0, 0, 0, 0) - layout.addLayout(header_layout) layout.addWidget(self.empty) layout.addWidget(self.not_empty) self.setLayout(layout) # Reset once at the beginning self.reset() - self.update_completed() - self.update_in_progress() def add(self, id, item): """ @@ -252,7 +251,6 @@ class History(QtWidgets.QWidget): # Add it to the list self.item_list.add(id, item) - def update(self, id, data): """ Update an item. |