[Pkg-privacy-commits] [torbrowser-launcher] 453/476: add option to disable accepting links (partial fix for #157)
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:22:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository torbrowser-launcher.
commit 70d0c57d59fa3a93a95b4395bebca02dac0aa2fc
Author: Micah Lee <micah at micahflee.com>
Date: Wed Jan 21 11:54:03 2015 -0800
add option to disable accepting links (partial fix for #157)
---
torbrowser_launcher/common.py | 3 ++-
torbrowser_launcher/launcher.py | 5 ++++-
torbrowser_launcher/settings.py | 10 ++++++++++
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/torbrowser_launcher/common.py b/torbrowser_launcher/common.py
index 139e536..505a4b3 100644
--- a/torbrowser_launcher/common.py
+++ b/torbrowser_launcher/common.py
@@ -198,7 +198,8 @@ class Common:
'check_for_updates': False,
'modem_sound': False,
'last_update_check_timestamp': 0,
- 'mirror': self.default_mirror
+ 'mirror': self.default_mirror,
+ 'accept_links': False
}
if os.path.isfile(self.paths['settings_file']):
diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index 8fa6c8a..00bc5a4 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -634,7 +634,10 @@ class Launcher:
gtk.main_iteration_do(True)
# run Tor Browser
- subprocess.call([self.common.paths['tbb']['start'], '-allow-remote'] + self.url_list)
+ if self.common.settings['accept_links']:
+ subprocess.call([self.common.paths['tbb']['start'], '-allow-remote'] + self.url_list)
+ else:
+ subprocess.call([self.common.paths['tbb']['start']])
if run_next_task:
self.run_task()
diff --git a/torbrowser_launcher/settings.py b/torbrowser_launcher/settings.py
index 0aba63b..a29c41a 100644
--- a/torbrowser_launcher/settings.py
+++ b/torbrowser_launcher/settings.py
@@ -95,6 +95,15 @@ class Settings:
self.update_checkbox.set_active(False)
self.update_checkbox.show()
+ # accept links
+ self.accept_links = gtk.CheckButton(_("Allow opening links with Tor Browser\n(this doesn't work if you use Firefox)"))
+ self.settings_box.pack_start(self.accept_links, True, True, 0)
+ if self.common.settings['accept_links']:
+ self.accept_links.set_active(True)
+ else:
+ self.accept_links.set_active(False)
+ self.accept_links.show()
+
# modem sound
self.modem_checkbox = gtk.CheckButton(_("Play modem sound, because Tor is slow :]"))
self.settings_box.pack_start(self.modem_checkbox, True, True, 0)
@@ -213,6 +222,7 @@ class Settings:
# checkbox options
self.common.settings['update_over_tor'] = self.tor_update_checkbox.get_active()
self.common.settings['check_for_updates'] = self.update_checkbox.get_active()
+ self.common.settings['accept_links'] = self.accept_links.get_active()
self.common.settings['modem_sound'] = self.modem_checkbox.get_active()
# figure out the selected mirror
--
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