def __init__(self, parent, account, app): """ :param parent: parent object of the EIPPreferencesWindow. :type parent: QWidget :param account: the currently active account :type account: Account :param app: shared App instance :type app: App """ QtGui.QWidget.__init__(self, parent) self.AUTOMATIC_GATEWAY_LABEL = self.tr("Automatic") self.account = account self.app = app # Load UI self.ui = Ui_PreferencesVpnPage() self.ui.setupUi(self) self.ui.flash_label.setVisible(False) self.hide_flash() # Connections self.ui.gateways_list.clicked.connect(self._save_selected_gateway) sig = self.app.signaler sig.eip_get_gateways_list.connect(self._update_gateways_list) sig.eip_get_gateways_list_error.connect(self._gateways_list_error) sig.eip_uninitialized_provider.connect( self._gateways_list_uninitialized) # Trigger update self.app.backend.eip_get_gateways_list(domain=self.account.domain)