Ignore Spaces, etc... from host input

Request by nnamrrehdlopoel who likes to Copy- / Paste Spaces
This commit is contained in:
DerGenaue 2015-10-26 21:30:14 +01:00
parent 9752aad75d
commit 83950df7ac

View File

@ -291,6 +291,7 @@ class ConfigDialog(QtGui.QDialog):
self.processWidget(self, lambda w: self.saveValues(w))
if self.hostCombobox.currentText():
self.config['host'] = self.hostCombobox.currentText() if ":" in self.hostCombobox.currentText() else self.hostCombobox.currentText() + ":" + unicode(constants.DEFAULT_PORT)
self.config['host'] = self.config['host'].translate(None, " \t\n\r")
else:
self.config['host'] = None
self.config['playerPath'] = unicode(self.safenormcaseandpath(self.executablepathCombobox.currentText()))
@ -996,4 +997,4 @@ class ConfigDialog(QtGui.QDialog):
self.processWidget(self, lambda w: self.loadTooltips(w))
self.processWidget(self, lambda w: self.loadValues(w))
self.processWidget(self, lambda w: self.connectChildren(w))
self.populateEmptyServerList()
self.populateEmptyServerList()