Author: jerome
Date: 2009-03-13 10:15:12 +0100 (Fri, 13 Mar 2009)
New Revision: 4043

Modified:
   
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/executables/tuxdroid-gadget-skype.py
Log:
* Regrouped some initialization functions.

Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/executables/tuxdroid-gadget-skype.py
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/executables/tuxdroid-gadget-skype.py
   2009-03-13 09:08:27 UTC (rev 4042)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/executables/tuxdroid-gadget-skype.py
   2009-03-13 09:15:12 UTC (rev 4043)
@@ -94,12 +94,31 @@
         except:
             print("message: \"" + "I cannot get connected to your Skype. 
Please, verify you are connected and verify I can access to skype." + "\"")
             self.__destroy()
-
-
-#########################################################
-#########            private functions           ########
-
-
+     
+     
+     
+     def __destroy(self):
+         '''
+         Destroy current connection object.
+         '''
+         try:
+             if self.__skype != None:
+                 self.__resetTuxMotors()
+                 self.__skype._API.Close()
+                 self.__skype = None
+                 self.__apiAttachState = -1
+             
+             if self.__tux != None:
+                 self.__tux.access.release()
+                 self.__tux.server.disconnect()
+                 self.__tux.destroy()
+             
+             self.__activeMain = False
+         except:
+             pass
+     
+     
+     
      def __initSkypeGadget(self):
         '''
         Initialize the skype gadget when skype api is connected.
@@ -110,7 +129,6 @@
 
 
 
-
      def __initTuxCallbacks(self):
         '''
         Init the Tux Droid callbacks
@@ -126,7 +144,10 @@
         self.__okEventID = 
self.__tux.button.remote.registerEventOnPressed(self.onHeadButtonPushed, 
TuxAPIConst.K_OK)
 
 
+#########################################################
+#########            private functions           ########
 
+
      def onLeftButtonPushed(self, value, delay):
          '''
          On left switch / remote event.
@@ -172,28 +193,6 @@
 
 
 
-     def __destroy(self):
-         """
-         Destroy current connection object.
-         """
-         try:
-             if self.__skype != None:
-                 self.__resetTuxMotors()
-                 self.__skype._API.Close()
-                 self.__skype = None
-                 self.__apiAttachState = -1
-             
-             if self.__tux != None:
-                 self.__tux.access.release()
-                 self.__tux.server.disconnect()
-                 self.__tux.destroy()
-             
-             self.__activeMain = False
-         except:
-             pass
-
-
-
      def __setTuxAudio(self):
          '''
          Set tux as audio peripheral.


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to