Merge pull request #1564 from SaptakS/replace-map-flags

Replace maps with flags
This commit is contained in:
Saptak Sengupta 2022-04-23 13:30:04 +05:30 committed by GitHub
commit 88447cc739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
245 changed files with 80 additions and 24 deletions

View File

@ -551,6 +551,11 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
self.description_label.setWordWrap(True)
# Detection preference
self.use_bridge = True
self.no_bridge = QtWidgets.QRadioButton(
strings._("gui_autoconnect_no_bridge")
)
self.no_bridge.toggled.connect(self._toggle_no_bridge)
self.detect_automatic_radio = QtWidgets.QRadioButton(
strings._("gui_autoconnect_bridge_detect_automatic")
)
@ -560,6 +565,7 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
)
self.detect_manual_radio.toggled.connect(self._detect_manual_toggled)
detect_layout = QtWidgets.QVBoxLayout()
detect_layout.addWidget(self.no_bridge)
detect_layout.addWidget(self.detect_automatic_radio)
detect_layout.addWidget(self.detect_manual_radio)
@ -577,8 +583,12 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
self.country_combobox.setStyleSheet(
common.gui.css["autoconnect_countries_combobox"]
)
self.country_combobox.setIconSize(QtCore.QSize(26, 20))
for country_code in countries:
self.country_combobox.addItem(countries[country_code], country_code)
icon = QtGui.QIcon(
GuiCommon.get_resource_path(os.path.join("images", "countries", f"{country_code.lower()}.png"))
)
self.country_combobox.addItem(icon, countries[country_code], country_code)
# Task label
self.task_label = QtWidgets.QLabel()
@ -588,18 +598,12 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
# Buttons
self.connect_button = QtWidgets.QPushButton(
strings._("gui_autoconnect_bridge_start")
strings._("gui_autoconnect_start")
)
self.connect_button.clicked.connect(self._connect_clicked)
self.connect_button.setFixedWidth(150)
self.connect_button.setStyleSheet(common.gui.css["autoconnect_start_button"])
self.try_again_button = QtWidgets.QPushButton(
strings._("gui_autoconnect_try_again_without_a_bridge")
)
self.try_again_button.clicked.connect(self._try_again_clicked)
self.try_again_button.setStyleSheet(common.gui.css["autoconnect_start_button"])
self.configure_button = QtWidgets.QPushButton(
strings._("gui_autoconnect_configure")
)
@ -628,7 +632,6 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
cta_layout = QtWidgets.QHBoxLayout()
cta_layout.addWidget(self.connect_button)
cta_layout.addWidget(self.try_again_button)
cta_layout.addWidget(self.configure_button)
cta_layout.addStretch()
cta_widget = QtWidgets.QWidget()
@ -651,21 +654,24 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
def hide_buttons(self):
self.connect_button.hide()
self.try_again_button.hide()
self.configure_button.hide()
self.description_label.hide()
self.error_label.hide()
self.no_bridge.hide()
self.detect_automatic_radio.hide()
self.detect_manual_radio.hide()
def show_buttons(self):
self.connect_button.show()
self.try_again_button.show()
self.description_label.show()
self.configure_button.show()
self.no_bridge.show()
self.detect_automatic_radio.show()
self.detect_manual_radio.show()
def _toggle_no_bridge(self):
self.use_bridge = not self.use_bridge
def _detect_automatic_toggled(self):
self.country_combobox.setEnabled(False)
self.country_combobox.hide()
@ -680,16 +686,11 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
self.connection_status_label.setText(
strings._("gui_autoconnect_trying_to_connect_to_tor")
)
self.connect_clicked.emit()
def _try_again_clicked(self):
self.connection_status_label.setText(
strings._("gui_autoconnect_trying_to_connect_to_tor")
)
self.country_combobox.setEnabled(False)
self.country_combobox.hide()
self.hide_buttons()
print(self.use_bridge)
if not self.use_bridge:
self.try_again_clicked.emit()
else:
self.connect_clicked.emit()
def _open_tor_settings(self):
self.open_tor_settings.emit()

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1007 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1002 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Some files were not shown because too many files have changed in this diff Show More