aboutsummaryrefslogtreecommitdiff
path: root/desktop/onionshare/connection_tab.py
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/onionshare/connection_tab.py')
-rw-r--r--desktop/onionshare/connection_tab.py33
1 files changed, 1 insertions, 32 deletions
diff --git a/desktop/onionshare/connection_tab.py b/desktop/onionshare/connection_tab.py
index ccfc00df..c1398cbd 100644
--- a/desktop/onionshare/connection_tab.py
+++ b/desktop/onionshare/connection_tab.py
@@ -566,19 +566,6 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
for country_code in countries:
self.country_combobox.addItem(countries[country_code], country_code)
- self.country_combobox.currentIndexChanged.connect(self._country_changed)
-
- # Country shape
- self.country_image_label = QtWidgets.QLabel()
- self.country_image_label.setFixedSize(200, 200)
- country_image_layout = QtWidgets.QHBoxLayout()
- country_image_layout.addStretch()
- country_image_layout.addWidget(self.country_image_label)
- country_image_layout.addStretch()
- country_image_layout.setContentsMargins(0, 0, 0, 0)
- self.country_image = QtWidgets.QWidget()
- self.country_image.setLayout(country_image_layout)
-
# Task label
self.task_label = QtWidgets.QLabel()
self.task_label.setStyleSheet(common.gui.css["autoconnect_task_label"])
@@ -639,7 +626,6 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
layout.addWidget(self.description_label)
layout.addLayout(detect_layout)
layout.addWidget(self.country_combobox)
- layout.addWidget(self.country_image)
layout.addWidget(self.task_label)
layout.addWidget(cta_widget)
layout.addWidget(self.progress)
@@ -647,7 +633,6 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
layout.addWidget(self.error_label)
self.setLayout(layout)
- self._country_changed()
self.detect_automatic_radio.setChecked(True)
def hide_buttons(self):
@@ -667,30 +652,13 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
self.detect_automatic_radio.show()
self.detect_manual_radio.show()
- def _country_changed(self, index=None):
- self.country_code = str(self.country_combobox.currentData()).lower()
- path = GuiCommon.get_resource_path(
- os.path.join(
- "images",
- "countries",
- f"{self.country_code}-{self.common.gui.color_mode}.png",
- )
- )
- pixmap = QtGui.QPixmap.fromImage(QtGui.QImage(path)).scaled(
- self.country_image_label.width() - 10,
- self.country_image_label.height() - 10,
- )
- self.country_image_label.setPixmap(pixmap)
-
def _detect_automatic_toggled(self):
self.country_combobox.setEnabled(False)
self.country_combobox.hide()
- self.country_image.hide()
def _detect_manual_toggled(self):
self.country_combobox.setEnabled(True)
self.country_combobox.show()
- self.country_image.show()
def _connect_clicked(self):
self.country_combobox.setEnabled(False)
@@ -705,6 +673,7 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
strings._("gui_autoconnect_trying_to_connect_to_tor")
)
self.country_combobox.setEnabled(False)
+ self.country_combobox.hide()
self.hide_buttons()
self.try_again_clicked.emit()