Author: jerome
Date: 2009-12-03 14:51:26 +0100 (Thu, 03 Dec 2009)
New Revision: 5930

Modified:
   
software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py
Log:
* Emoticons detection only on received message.

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-03 13:43:20 UTC (rev 5929)
+++ 
software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py
   2009-12-03 13:51:26 UTC (rev 5930)
@@ -616,26 +616,10 @@
     def __on_message_status__(self, Message, Status):
         '''
         '''
-        #Checking first for available emoticon, if one found, then do not 
-        #trigger message event BUT emoticon event.
-        emoticon_available, type = self.__check_emoticons__(Message.Body)
-        if emoticon_available:
-            if self.OnAvailableEmoticon != None:
-                    arg = [EMOTICONS_TO_ATTITUNES[type], ]
-                    thread = threading.Thread(target = 
self.OnAvailableEmoticon, args = arg)
-                    thread.start()
-            return
-        #Same as emoticons but with tts sentences.
-        tts_available, message = self.__check_tts_sentence__(Message.Body)
-        if tts_available:
-            if self.OnAvailableTTSSentence != None:
-                thread = threading.Thread(target = 
self.OnAvailableTTSSentence, args = [message, ])
-                thread.start()
-            return
-        
         exclude_list = ['<partlist', '<part identity', '</name>', '<name>']
         exclude_message = False
         if Status == 'RECEIVED':
+            
             #Checking if message body is not empty.
             #Handle empty lists api case.
             try:
@@ -643,6 +627,24 @@
             except:
                 exclude_message = True
             
+            
+            #Checking first for available emoticon, if one found, then do not 
+            #trigger message event BUT emoticon event.
+            emoticon_available, type = self.__check_emoticons__(Message.Body)
+            if emoticon_available:
+                if self.OnAvailableEmoticon != None:
+                        arg = [EMOTICONS_TO_ATTITUNES[type], ]
+                        thread = threading.Thread(target = 
self.OnAvailableEmoticon, args = arg)
+                        thread.start()
+                return
+            #Same as emoticons but with tts sentences.
+            tts_available, message = self.__check_tts_sentence__(Message.Body)
+            if tts_available:
+                if self.OnAvailableTTSSentence != None:
+                    thread = threading.Thread(target = 
self.OnAvailableTTSSentence, args = [message, ])
+                    thread.start()
+                return
+            
             #Excluding 'identity call' messages in case of most recent Skype 
clients.
             
             for excluded in exclude_list:


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Tux-droid-svn mailing list
Tux-droid-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to