[Pkg-privacy-commits] [torbrowser-launcher] 07/39: Add icons to settings buttons
Roger Shimizu
rosh at debian.org
Tue Mar 27 15:41:50 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 3c187ecff2aa6dc20dd0f70e3c7f2b1407fabf4a
Author: Micah Lee <micah at micahflee.com>
Date: Thu Mar 22 11:22:22 2018 -0700
Add icons to settings buttons
---
torbrowser_launcher/__init__.py | 6 +++---
torbrowser_launcher/common.py | 2 +-
torbrowser_launcher/launcher.py | 4 +++-
torbrowser_launcher/settings.py | 11 ++++++-----
4 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/torbrowser_launcher/__init__.py b/torbrowser_launcher/__init__.py
index ccd4e33..c22b336 100644
--- a/torbrowser_launcher/__init__.py
+++ b/torbrowser_launcher/__init__.py
@@ -34,7 +34,7 @@ from PyQt5 import QtCore, QtWidgets
from .common import Common, SHARE
from .settings import Settings
-from .launcher import Launcher
+#from .launcher import Launcher
class Application(QtWidgets.QApplication):
@@ -71,11 +71,11 @@ def main():
if settings:
# Settings mode
- gui = Settings(common)
+ gui = Settings(common, app)
else:
# Launcher mode
- gui = Launcher(common, url_list)
+ gui = Launcher(common, app, url_list)
sys.exit(app.exec_())
diff --git a/torbrowser_launcher/common.py b/torbrowser_launcher/common.py
index 6039d3f..5642f4d 100644
--- a/torbrowser_launcher/common.py
+++ b/torbrowser_launcher/common.py
@@ -52,7 +52,7 @@ gettext.install('torbrowser-launcher')
# 2. The second must be an integer between [0, 15], inclusive
# 3. The third must be an uppercased hex-encoded 160-bit fingerprint
gnupg_import_ok_pattern = re.compile(
- "(\[GNUPG\:\]) (IMPORT_OK) ([0-9]|[1]?[0-5]) ([A-F0-9]{40})")
+ b"(\[GNUPG\:\]) (IMPORT_OK) ([0-9]|[1]?[0-5]) ([A-F0-9]{40})")
class Common(object):
diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index f289363..b51d23d 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -77,8 +77,10 @@ class DownloadErrorException(Exception):
class Launcher:
- def __init__(self, common, url_list):
+ def __init__(self, common, app, url_list):
self.common = common
+ self.app = app
+
self.url_list = url_list
self.force_redownload = False
diff --git a/torbrowser_launcher/settings.py b/torbrowser_launcher/settings.py
index 70c8651..6c222c6 100644
--- a/torbrowser_launcher/settings.py
+++ b/torbrowser_launcher/settings.py
@@ -35,10 +35,11 @@ class Settings(QtWidgets.QMainWindow):
"""
Settings window.
"""
- def __init__(self, common):
+ def __init__(self, common, app):
super(Settings, self).__init__()
self.common = common
+ self.app = app
# Set up the window
self.setWindowTitle(_("Tor Browser Launcher Settings"))
@@ -92,13 +93,13 @@ class Settings(QtWidgets.QMainWindow):
# Install button
install_button = QtWidgets.QPushButton(_("Install Tor Browser"))
+ install_button.setIcon(self.style().standardIcon(QtWidgets.QStyle.SP_DialogApplyButton))
install_button.clicked.connect(self.install)
- # TODO: add apply icon
# Reinstall buttons
reinstall_button = QtWidgets.QPushButton(_("Reinstall Tor Browser"))
+ reinstall_button.setIcon(self.style().standardIcon(QtWidgets.QStyle.SP_DialogApplyButton))
reinstall_button.clicked.connect(self.reinstall)
- # TODO: add apply icon
if(self.common.settings['installed']):
install_button.hide()
@@ -136,13 +137,13 @@ class Settings(QtWidgets.QMainWindow):
# Save & Exit button
self.save_exit_button = QtWidgets.QPushButton(_("Save & Exit"))
+ self.save_exit_button.setIcon(self.style().standardIcon(QtWidgets.QStyle.SP_DialogApplyButton))
self.save_exit_button.clicked.connect(self.save_exit)
- # TODO: add apply icon
# Cancel button
self.cancel_button = QtWidgets.QPushButton(_("Cancel"))
+ self.cancel_button.setIcon(self.style().standardIcon(QtWidgets.QStyle.SP_DialogCancelButton))
self.cancel_button.clicked.connect(self.close)
- # TODO: add cancel icon
# Buttons layout
buttons_layout = QtWidgets.QHBoxLayout()
--
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