[tuxdroid-svn] r5993 - 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-16 13:05:09
|
Author: jerome Date: 2009-12-16 14:04:56 +0100 (Wed, 16 Dec 2009) New Revision: 5993 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py Log: * Removed a print debug. * Cut off phone numbers for tts. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-12-16 12:10:25 UTC (rev 5992) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-12-16 13:04:56 UTC (rev 5993) @@ -147,7 +147,10 @@ name = '' #Getting tts name to use. if uData['display_name'] != u'': - name = StringUtils.toPrettyString(uData['display_name']) + if uData['display_name'][1:].isalnum() and ( uData['display_name'][:1].find("+") != -1 ): + name = StringUtils.phoneNumberToTTS(uData['handle']) + else: + name = StringUtils.toPrettyString(uData['display_name']) elif uData['full_name'] != u'': name = StringUtils.toPrettyString(uData['full_name']) else: @@ -268,7 +271,10 @@ name = '' #Getting tts name to use. if uData['display_name'] != u'': - name = StringUtils.toPrettyString(uData['display_name']) + if uData['display_name'][1:].isalnum() and ( uData['display_name'][:1].find("+") != -1 ): + name = StringUtils.phoneNumberToTTS(uData['handle']) + else: + name = StringUtils.toPrettyString(uData['display_name']) elif uData['full_name'] != u'': name = StringUtils.toPrettyString(uData['full_name']) else: Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py 2009-12-16 12:10:25 UTC (rev 5992) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py 2009-12-16 13:04:56 UTC (rev 5993) @@ -351,7 +351,6 @@ def phoneNumberToTTS(myPhoneNumber): '''Cut a phone number to a pretty tts phone number. ''' - print myPhoneNumber finalString = '+' #Removing '+' from the string. myPhoneNumber = myPhoneNumber.replace('+', '') |