[Pkg-privacy-commits] [onionshare] 141/256: Rearranged settings layout so that all Tor-related settings are inside of the 'How should OnionShare connect to Tor?' box, including the Test Tor Settings button

Ulrike Uhlig ulrike at moszumanska.debian.org
Fri May 26 12:53:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

ulrike pushed a commit to branch master
in repository onionshare.

commit 62cc310d0a34adea61838f4a9f215c991e843ed7
Author: Micah Lee <micah at micahflee.com>
Date:   Sat Apr 15 13:05:11 2017 -0700

    Rearranged settings layout so that all Tor-related settings are inside of the 'How should OnionShare connect to Tor?' box, including the Test Tor Settings button
---
 onionshare_gui/settings_dialog.py | 52 +++++++++++++++++++--------------------
 share/locale/en.json              |  2 +-
 2 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/onionshare_gui/settings_dialog.py b/onionshare_gui/settings_dialog.py
index 6f24036..5e7f957 100644
--- a/onionshare_gui/settings_dialog.py
+++ b/onionshare_gui/settings_dialog.py
@@ -51,7 +51,6 @@ class SettingsDialog(QtWidgets.QDialog):
         sharing_group = QtWidgets.QGroupBox(strings._("gui_settings_sharing_label", True))
         sharing_group.setLayout(sharing_group_layout)
 
-
         # Stealth options
 
         # Stealth
@@ -68,7 +67,6 @@ class SettingsDialog(QtWidgets.QDialog):
         stealth_group = QtWidgets.QGroupBox(strings._("gui_settings_stealth_label", True))
         stealth_group.setLayout(stealth_group_layout)
 
-
         # Connection type: either automatic, control port, or socket file
 
         # Bundled Tor
@@ -114,18 +112,6 @@ class SettingsDialog(QtWidgets.QDialog):
         self.connection_type_socket_file_extras.setLayout(connection_type_socket_file_extras_layout)
         self.connection_type_socket_file_extras.hide()
 
-        # Connection type layout
-        connection_type_group_layout = QtWidgets.QVBoxLayout()
-        connection_type_group_layout.addWidget(self.connection_type_bundled_radio)
-        connection_type_group_layout.addWidget(self.connection_type_automatic_radio)
-        connection_type_group_layout.addWidget(self.connection_type_control_port_radio)
-        connection_type_group_layout.addWidget(self.connection_type_socket_file_radio)
-        connection_type_group_layout.addWidget(self.connection_type_control_port_extras)
-        connection_type_group_layout.addWidget(self.connection_type_socket_file_extras)
-        connection_type_group = QtWidgets.QGroupBox(strings._("gui_settings_connection_type_label", True))
-        connection_type_group.setLayout(connection_type_group_layout)
-
-
         # Authentication options
 
         # No authentication
@@ -154,33 +140,45 @@ class SettingsDialog(QtWidgets.QDialog):
         self.authenticate_group = QtWidgets.QGroupBox(strings._("gui_settings_authenticate_label", True))
         self.authenticate_group.setLayout(authenticate_group_layout)
 
+        # Tor networkconnection status
+        self.tor_status = QtWidgets.QLabel()
+        self.tor_status.setStyleSheet('color: #666666; padding-top: 10px')
+        self.tor_status.hide()
+
+        # Test tor settings button
+        self.connection_type_test_button = QtWidgets.QPushButton(strings._('gui_settings_connection_type_test_button', True))
+        self.connection_type_test_button.clicked.connect(self.test_tor_clicked)
+
+        # Connection type layout
+        connection_type_group_layout = QtWidgets.QVBoxLayout()
+        connection_type_group_layout.addWidget(self.connection_type_bundled_radio)
+        connection_type_group_layout.addWidget(self.connection_type_automatic_radio)
+        connection_type_group_layout.addWidget(self.connection_type_control_port_radio)
+        connection_type_group_layout.addWidget(self.connection_type_socket_file_radio)
+        connection_type_group_layout.addWidget(self.connection_type_control_port_extras)
+        connection_type_group_layout.addWidget(self.connection_type_socket_file_extras)
+        connection_type_group_layout.addWidget(self.authenticate_group)
+        connection_type_group_layout.addWidget(self.tor_status)
+        connection_type_group_layout.addWidget(self.connection_type_test_button)
+        connection_type_group = QtWidgets.QGroupBox(strings._("gui_settings_connection_type_label", True))
+        connection_type_group.setLayout(connection_type_group_layout)
 
         # Buttons
-        self.test_button = QtWidgets.QPushButton(strings._('gui_settings_button_test', True))
-        self.test_button.clicked.connect(self.test_clicked)
         self.save_button = QtWidgets.QPushButton(strings._('gui_settings_button_save', True))
         self.save_button.clicked.connect(self.save_clicked)
         self.cancel_button = QtWidgets.QPushButton(strings._('gui_settings_button_cancel', True))
         self.cancel_button.clicked.connect(self.cancel_clicked)
         buttons_layout = QtWidgets.QHBoxLayout()
-        buttons_layout.addWidget(self.test_button)
         buttons_layout.addWidget(self.save_button)
         buttons_layout.addWidget(self.cancel_button)
 
-        # Tor networkconnection status
-        self.tor_status = QtWidgets.QLabel()
-        self.tor_status.setStyleSheet('color: #666666; padding-top: 10px')
-        self.tor_status.hide()
-
         # Layout
         layout = QtWidgets.QVBoxLayout()
         layout.addWidget(sharing_group)
         layout.addWidget(stealth_group)
         layout.addWidget(connection_type_group)
-        layout.addWidget(self.authenticate_group)
         layout.addStretch()
         layout.addLayout(buttons_layout)
-        layout.addWidget(self.tor_status)
         self.setLayout(layout)
 
 
@@ -279,7 +277,7 @@ class SettingsDialog(QtWidgets.QDialog):
         else:
             self.authenticate_password_extras.hide()
 
-    def test_clicked(self):
+    def test_tor_clicked(self):
         """
         Test Settings button clicked. With the given settings, see if we can
         successfully connect and authenticate to Tor.
@@ -288,13 +286,13 @@ class SettingsDialog(QtWidgets.QDialog):
 
         def bundled_setup():
             self.tor_status.show()
-            self.test_button.setEnabled(False)
+            self.connection_type_test_button.setEnabled(False)
             self.save_button.setEnabled(False)
             self.cancel_button.setEnabled(False)
 
         def bundled_cleanup():
             self.tor_status.hide()
-            self.test_button.setEnabled(True)
+            self.connection_type_test_button.setEnabled(True)
             self.save_button.setEnabled(True)
             self.cancel_button.setEnabled(True)
 
diff --git a/share/locale/en.json b/share/locale/en.json
index 4eb6ec6..b288cec 100644
--- a/share/locale/en.json
+++ b/share/locale/en.json
@@ -66,6 +66,7 @@
     "gui_settings_connection_type_automatic_option": "Attempt automatic configuration with Tor Browser",
     "gui_settings_connection_type_control_port_option": "Connect using control port",
     "gui_settings_connection_type_socket_file_option": "Connect using socket file",
+    "gui_settings_connection_type_test_button": "Test Tor Settings",
     "gui_settings_control_port_label": "Control port",
     "gui_settings_socket_file_label": "Socket file",
     "gui_settings_authenticate_label": "Tor authentication options",
@@ -74,7 +75,6 @@
     "gui_settings_authenticate_cookie_option": "Cookie",
     "gui_settings_password_label": "Password",
     "gui_settings_cookie_label": "Cookie path",
-    "gui_settings_button_test": "Test Settings",
     "gui_settings_button_save": "Save",
     "gui_settings_button_cancel": "Cancel",
     "settings_saved": "Settings saved to {}",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git



More information about the Pkg-privacy-commits mailing list