def __init__(self, authenticator, reply, parent=None): super().__init__(parent) self._authenticator = authenticator self.ui = Ui_PasswordDialog() self.ui.setupUi(self) self.ui.info_text.setText( _("The server %s requires you to login. Please enter your username and password." ) % reply.url().host()) self.ui.username.setText(reply.url().userName()) self.ui.password.setText(reply.url().password()) self.ui.buttonbox.accepted.connect(self.set_new_password)
def __init__(self, authenticator, proxy, parent=None): super().__init__(parent) self._authenticator = authenticator self._proxy = proxy self.ui = Ui_PasswordDialog() self.ui.setupUi(self) self.ui.info_text.setText( _("The proxy %s requires you to login. Please enter your username and password." ) % config.setting["proxy_server_host"]) self.ui.username.setText(config.setting["proxy_username"]) self.ui.password.setText(config.setting["proxy_password"]) self.ui.buttonbox.accepted.connect(self.set_proxy_password)
def __init__(self, authenticator, proxy, parent=None): QtGui.QDialog.__init__(self, parent) self._authenticator = authenticator self._proxy = proxy self.ui = Ui_PasswordDialog() self.ui.setupUi(self) self.ui.info_text.setText( _("The proxy %s requires you to login. Please enter your username and password." ) % self.config.setting["proxy_server_host"]) self.ui.save_authentication.setChecked( self.config.persist["save_authentication"]) self.ui.username.setText(self.config.setting["proxy_username"]) self.ui.password.setText(self.config.setting["proxy_password"]) self.ui.save_authentication.hide() self.connect(self.ui.buttonbox, QtCore.SIGNAL('accepted()'), self.set_proxy_password)
def __init__(self, authenticator, reply, parent=None): QtGui.QDialog.__init__(self, parent) self._authenticator = authenticator self.ui = Ui_PasswordDialog() self.ui.setupUi(self) self.ui.info_text.setText(_("The server %s requires you to login. Please enter your username and password.") % reply.url().host()) # TODO: Implement proper password storage for arbitrary servers if self._is_musicbrainz_server(reply.url().host(), reply.url().port()): self.ui.save_authentication.setChecked(config.persist["save_authentication"]) self.ui.username.setText(config.setting["username"]) self.ui.password.setText(config.setting["password"]) else: self.ui.username.setText(reply.url().userName()) self.ui.password.setText(reply.url().password()) self.ui.save_authentication.setChecked(False) self.ui.save_authentication.hide() self.ui.buttonbox.accepted.connect(self.set_new_password)