예제 #1
0
파일: pytalk.py 프로젝트: nerdogan/PyTalk
 def connection(self, status=STATUS.available):
     if not self.connectorThread:
         self.connectorThread = ConnectorThread(status)
         self.connectorThread.start()
         self.connect(self.connectorThread, SIGNAL("message"), self.BuddyList.message)
         self.connect(self.connectorThread, SIGNAL("error"), self.error)
         self.connect(self.connectorThread, SIGNAL("connected()"), self.connected)
         self.connect(self.connectorThread, SIGNAL("disconnected()"), self.disconnect)
         self.connect(self.connectorThread, SIGNAL("presence"), self.BuddyList.presence)
         self.connect(self.connectorThread, SIGNAL("debug"), self.debug)
         self.connect(self.connectorThread, SIGNAL("subscriptionRequest"), self.subscriptionRequest)
         self.connect(self.connectorThread, SIGNAL("addBuddy"), self.addBuddy)
     elif self.connectorThread.isConnected():
         self.connectorThread.changeStatus(status, self.statusEdit.text())
         self.statusEdit.clearFocus()