Author: jerome
Date: 2009-03-11 21:09:19 +0100 (Wed, 11 Mar 2009)
New Revision: 3966
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/resources/gadget.xml
Log:
* Added a parameter to start skype when the gadget starts.
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-11 18:49:09 UTC (rev 3965)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/executables/tuxdroid-gadget-skype.py
2009-03-11 20:09:19 UTC (rev 3966)
@@ -27,6 +27,7 @@
import commands
import threading
import time
+import os
import subprocess
from tuxisalive.api import *
@@ -63,13 +64,21 @@
#Users gadget parameters.
speaker = "Ryan"
pitch = 120
+ startSkype = True
+ if "tgp_startSkype" in os.environ:
+ startSkype = os.environ["tgp_startSkype"]
+ else:
+ print("Error: not in environ")
-
def __init__(self):
'''
Constructor
'''
+
+ if self.startSkype:
+ self.__startSkype()
+
self.__tux = TuxAPI("127.0.0.1", 270)
self.__tux.server.autoConnect(TuxAPIConst.CLIENT_LEVEL_FREE,
"SkypeGadget", "tuxdroid-skype-gadget")
self.__tux.server.waitConnected(3.0)
@@ -261,6 +270,18 @@
value = process.stdout.read()
value = value.split()
return ("skype.exe" in value) or ("Skype.exe" in value)
+
+
+
+ def __startSkype(self):
+ '''
+ This function starts skype.
+ '''
+ cmd = ["skype", ]
+ process = subprocess.Popen(cmd, stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
+ ret = process.stdout.read()
+ ret = ret.split();
+ print(ret)
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/resources/gadget.xml
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/resources/gadget.xml
2009-03-11 18:49:09 UTC (rev 3965)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-skype/trunk/tuxdroid-skype-gadget/resources/gadget.xml
2009-03-11 20:09:19 UTC (rev 3966)
@@ -12,10 +12,17 @@
<executionMode>command</executionMode>
<uuid>8349ed52-572d-4c3f-a7b8-f6d4a5ae2c0</uuid>
</description>
- <parameters>
+ <parameters>
+ <parameter
+ category="User parameters"
+ name="startSkype"
+ description="Start skype with the gadget"
+ type="boolean"
+ defaultValue="false"
+ />
</parameters>
<commands>
- <commanda
+ <commands
name="run"
description="Takes control of skype" />
</commands>
------------------------------------------------------------------------------
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