[Pkg-privacy-commits] [torbrowser-launcher] 11/39: Fix buttons, and actually delete download path on exit
Roger Shimizu
rosh at debian.org
Tue Mar 27 15:41:51 UTC 2018
This is an automated email from the git hooks/post-receive script.
rosh pushed a commit to branch rosh/experimental
in repository torbrowser-launcher.
commit 3a793303126d87a5671f6bd441ceff06d1d5a57c
Author: Micah Lee <micah at micahflee.com>
Date: Thu Mar 22 15:18:46 2018 -0700
Fix buttons, and actually delete download path on exit
---
torbrowser_launcher/launcher.py | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index c011c7b..2045179 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -139,11 +139,14 @@ class Launcher(QtWidgets.QMainWindow):
self.start_button.setIcon(self.style().standardIcon(QtWidgets.QStyle.SP_DialogApplyButton))
self.start_button.clicked.connect(self.start)
self.cancel_button = QtWidgets.QPushButton()
- self.start_button.setIcon(self.style().standardIcon(QtWidgets.QStyle.SP_DialogCancelButton))
+ self.cancel_button.setIcon(self.style().standardIcon(QtWidgets.QStyle.SP_DialogCancelButton))
self.cancel_button.clicked.connect(self.close)
buttons_layout = QtWidgets.QHBoxLayout()
+ buttons_layout.addStretch()
+ buttons_layout.addWidget(self.yes_button)
buttons_layout.addWidget(self.start_button)
buttons_layout.addWidget(self.cancel_button)
+ buttons_layout.addStretch()
# Layout
layout = QtWidgets.QVBoxLayout()
@@ -585,12 +588,13 @@ class Launcher(QtWidgets.QMainWindow):
self.start(None)
def closeEvent(self, event):
- if hasattr(self, 'file_download'):
- self.file_download.close()
- if hasattr(self, 'current_download_path'):
- os.remove(self.current_download_path)
- delattr(self, 'current_download_path')
- delattr(self, 'current_download_url')
+ # Clear the download cache
+ try:
+ os.remove(self.common.paths['version_check_file'])
+ os.remove(self.common.paths['sig_file'])
+ os.remove(self.common.paths['tarball_file'])
+ except:
+ pass
super(Launcher, self).closeEvent(event)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torbrowser-launcher.git
More information about the Pkg-privacy-commits
mailing list