Allow list of addresses in configuration

This commit is contained in:
Emanuele 2020-12-20 00:11:17 +01:00
parent f20c2c1f80
commit d31970a2fd

View file

@ -141,8 +141,13 @@ class rMViewApp(QApplication):
self.viewer.move(fg.topLeft())
def ensureConnConfig(self):
if self.config['ssh'].get('address') is None:
address, ok = QInputDialog.getText(self.viewer, "Configuration","IP Address of your reMarkable:", QLineEdit.Normal, "10.11.99.1")
address = self.config['ssh'].get('address', ["10.11.99.1"])
if type(address) is list:
address, ok = QInputDialog.getItem(self.viewer, "Connection", "Address:", address)
if ok and address:
self.config['ssh']['address'] = address
else:
self.quit()
if self.config['ssh'].get('ask_password'):
password, ok = QInputDialog.getText(self.viewer, "Configuration","reMarkable password:", QLineEdit.Password)