[tuxdroid-svn] r6016 - software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/execut
Status: Beta
Brought to you by:
ks156
From: jerome <c2m...@c2...> - 2009-12-28 09:52:38
|
Author: jerome Date: 2009-12-28 10:52:05 +0100 (Mon, 28 Dec 2009) New Revision: 6016 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py Log: * Fixed a bug starting plugin in Linux. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2009-12-25 10:42:23 UTC (rev 6015) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2009-12-28 09:52:05 UTC (rev 6016) @@ -297,19 +297,18 @@ ''' Run plugin command. ''' - #Creating and starting server. - self.serv = IPNServer('127.0.0.1', 48536) - self.serv.registerOnClientAddedCallBack(self.ServerOnClientAdded) - self.serv.registerOnClientNotificationCallBack(self.ServerOnClientNotification) - self.serv.start() - #Initialize skype client and api objects. self.connectorObj = connector.Connector() self.connectorObj.OnAPIReady = self.initializeDaemon #Daemon mode, so we don't start skype automatically. self.connectorObj.start(StartSkype=False) + self.serv = IPNServer('127.0.0.1', 48536) + self.serv.registerOnClientAddedCallBack(self.ServerOnClientAdded) + self.serv.registerOnClientNotificationCallBack(self.ServerOnClientNotification) + self.serv.start() + #Finally, starting daemon main loop mainl = threading.Thread(target=self.mainloop) mainl.start() @@ -514,13 +513,14 @@ time.sleep(1.0) #Setting Tux Droid as audio peripheral. - + ''' try: #in try statement to take calls in care. if ( self.synchronious != None ) and ( not self.synchronious.isTuxDroidAudioCard() ): self.throwTrace(self.synchronious.setAudioCards()) except: pass + ''' ##---------------------------------------------------------------- @@ -583,18 +583,22 @@ #-------------- Outgoing call commands --------------# elif Message == GET_CONTACTS_LIST: - try: - self.onlineList = self.synchronious.getOnlineList() - except: - self.onlineList = [] - self.onlineList.append("Quit gadget") - time.sleep(0.3) + if self.initialized: + try: + self.onlineList = self.synchronious.getOnlineList() + except: + self.onlineList = [] + + self.onlineList.append("Quit gadget") + time.sleep(0.3) - #at least one user find. - if len(self.onlineList) > 1: - self.currentContact = 0 - self.serv.notify( COMMAND_TTS + self.onlineList[0] ) - + #at least one user find. + if len(self.onlineList) > 1: + self.currentContact = 0 + self.serv.notify( COMMAND_TTS + self.onlineList[0] ) + else: + self.onlineList = ["Quit gadget", ] + self.serv.notify(COMMAND_TTS + "There had a problem with Skype Client, please, try later again.") elif Message == NEXT_CONTACT: thread = threading.Thread(target=self.nextContact) |