Пример #1
0
 def __init__(self, parent=None):
     super(LoginDialog, self).__init__(parent)
     # ggpo.gui.loadUi(__file__, self)
     if IS_WINDOWS:
         download_url = 'http://www.fightcade.com/download/windows'
     if IS_OSX:
         download_url = 'http://www.fightcade.com/download/osx'
     if IS_LINUX:
         download_url = 'http://www.fightcade.com/download/linux'
     self.setupUi(self)
     self.uiNewVersionLink.clicked.connect(lambda: openURL(download_url))
     self.uiNewVersionLink.setVisible(False)
     self.uiRegisterLink.setVisible(False)
     versionLabel = 'v' + copyright.versionString()
     self.uiVersionLbl.setText(versionLabel)
     self.controller = None
     if Settings.value(Settings.SAVE_USERNAME_PASSWORD):
         self.uiSavePasswordChk.setChecked(True)
     username = Settings.value(Settings.USERNAME)
     password = Settings.value(Settings.PASSWORD)
     if username:
         self.uiUsernameLine.setText(username)
     if password:
         self.uiPasswordLine.setText(base64.decodestring(password))
     if not username and not password:
         self.uiRegisterLink.setVisible(True)
     self.uiSavePasswordChk.toggled.connect(self.savePassword)
     self.uiUsernameLine.returnPressed.connect(self.login)
     self.uiPasswordLine.returnPressed.connect(self.login)
     self.uiLoginBtn.clicked.connect(self.login)
     self.uiRegisterLink.clicked.connect(
         lambda: openURL('http://www.fightcade.com/#register'))
Пример #2
0
 def __init__(self, parent=None):
     super(LoginDialog, self).__init__(parent)
     # ggpo.gui.loadUi(__file__, self)
     if IS_WINDOWS:
         download_url='http://www.fightcade.com/download/windows'
     if IS_OSX:
         download_url='http://www.fightcade.com/download/osx'
     if IS_LINUX:
         download_url='http://www.fightcade.com/download/linux'
     self.setupUi(self)
     self.uiNewVersionLink.clicked.connect(
         lambda: openURL(download_url))
     self.uiNewVersionLink.setVisible(False)
     self.uiRegisterLink.setVisible(False)
     versionLabel = 'v' + copyright.versionString()
     self.uiVersionLbl.setText(versionLabel)
     self.controller = None
     if Settings.value(Settings.SAVE_USERNAME_PASSWORD):
         self.uiSavePasswordChk.setChecked(True)
     username = Settings.value(Settings.USERNAME)
     password = Settings.value(Settings.PASSWORD)
     if username:
         self.uiUsernameLine.setText(username)
     if password:
         self.uiPasswordLine.setText(base64.decodestring(password))
     if not username and not password:
         self.uiRegisterLink.setVisible(True)
     self.uiSavePasswordChk.toggled.connect(self.savePassword)
     self.uiUsernameLine.returnPressed.connect(self.login)
     self.uiPasswordLine.returnPressed.connect(self.login)
     self.uiLoginBtn.clicked.connect(self.login)
     self.uiRegisterLink.clicked.connect(
         lambda: openURL('http://www.fightcade.com/#register'))
Пример #3
0
 def __init__(self, parent=None):
     super(LoginDialog, self).__init__(parent)
     # ggpo.gui.loadUi(__file__, self)
     self.setupUi(self)
     self.uiNewVersionLink.clicked.connect(
         lambda: openURL('https://github.com/doctorguile/pyqtggpo/releases'))
     self.uiNewVersionLink.setVisible(False)
     versionLabel = 'v' + copyright.versionString()
     self.uiVersionLbl.setText(versionLabel)
     self.controller = None
     if Settings.value(Settings.SAVE_USERNAME_PASSWORD):
         self.uiSavePasswordChk.setChecked(True)
     if Settings.value(Settings.AUTOLOGIN):
         self.uiAutologinChk.setChecked(True)
     username = Settings.value(Settings.USERNAME)
     password = Settings.value(Settings.PASSWORD)
     serverAddress = Settings.value(Settings.SERVER_ADDRESS) or 'ggpo.net'
     if username:
         self.uiUsernameLine.setText(username)
     if password:
         self.uiPasswordLine.setText(base64.decodestring(password))
     self.uiServerLine.setText(serverAddress)
     self.uiSavePasswordChk.toggled.connect(self.savePassword)
     self.uiUsernameLine.returnPressed.connect(self.login)
     self.uiPasswordLine.returnPressed.connect(self.login)
     self.uiServerLine.returnPressed.connect(self.login)
     self.uiLoginBtn.clicked.connect(self.login)
     self.uiRegisterLink.clicked.connect(
         lambda: openURL('http://ggpo.net/forums/ucp.php?mode=register'))