Cooperation/CooperationClient.py

changeset 3190
a9a94491c4fd
parent 3160
209a07d7e401
child 3484
645c12de6b0c
equal deleted inserted replaced
3189:9a21c547de5f 3190:a9a94491c4fd
81 81
82 if found: 82 if found:
83 break 83 break
84 84
85 if self.__username == "": 85 if self.__username == "":
86 self.__username = self.trUtf8("unknown") 86 self.__username = self.tr("unknown")
87 87
88 self.__listening = False 88 self.__listening = False
89 self.__serversErrorString = "" 89 self.__serversErrorString = ""
90 90
91 def chatWidget(self): 91 def chatWidget(self):
289 for participant in participants: 289 for participant in participants:
290 host, port = participant.split("@") 290 host, port = participant.split("@")
291 port = int(port) 291 port = int(port)
292 292
293 if port == 0: 293 if port == 0:
294 msg = self.trUtf8("Illegal address: {0}@{1}\n").format( 294 msg = self.tr("Illegal address: {0}@{1}\n").format(
295 host, port) 295 host, port)
296 self.connectionError.emit(msg) 296 self.connectionError.emit(msg)
297 else: 297 else:
298 if not self.hasConnection(QHostAddress(host), port): 298 if not self.hasConnection(QHostAddress(host), port):
299 connection = Connection(self) 299 connection = Connection(self)
382 self.__serversErrorString = server.errorString() 382 self.__serversErrorString = server.errorString()
383 else: 383 else:
384 self.__serversErrorString = self.__servers[0].errorString() 384 self.__serversErrorString = self.__servers[0].errorString()
385 else: 385 else:
386 res = False 386 res = False
387 self.__serversErrorString = self.trUtf8("No servers present.") 387 self.__serversErrorString = self.tr("No servers present.")
388 388
389 if res: 389 if res:
390 self.__serversErrorString = "" 390 self.__serversErrorString = ""
391 self.__listening = res 391 self.__listening = res
392 return res, port 392 return res, port

eric ide

mercurial