Author: remi
Date: 2009-07-07 13:44:38 +0200 (Tue, 07 Jul 2009)
New Revision: 5073

Modified:
   
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/attitunes.xsl
   
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py
   
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
Log:
* Added a way to automatically refresh the attitunes list in the "attitunes" 
page when Attitunes Studio is closed.

Modified: 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/attitunes.xsl
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/attitunes.xsl
        2009-07-07 11:26:05 UTC (rev 5072)
+++ 
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/attitunes.xsl
        2009-07-07 11:44:38 UTC (rev 5073)
@@ -71,8 +71,12 @@
                     return;
                 }
                 var name = result.get("name");
-                if (name != knowedPlayingAttituneName)
+                if (name == "1")
                 {
+                    fillAttituneRows(knowedAttitunesFilter);
+                }
+                else if (name != knowedPlayingAttituneName)
+                {
                     knowedPlayingAttituneName = name;
                     if (knowedAttitunesDict != null)
                     {

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py
  2009-07-07 11:26:05 UTC (rev 5072)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py
  2009-07-07 11:44:38 UTC (rev 5073)
@@ -159,6 +159,7 @@
     def __attituneStartingLoop(self, attitune, duration):
         self.__setAttituneRunName(attitune.getDescription().getName())
         self.__setAttituneRun(True)
+        duration += 0.5
         timeout = int(duration * 10)
         self.logger.logInfo("Attitune starting [%s]" % (
             attitune.getDescription().getName(),))
@@ -339,6 +340,8 @@
     def getAttitunesDictAll(self):
         """
         """
+        if self.getAttituneRunName() == "1":
+            self.__setAttituneRunName("0")
         result = {}
         count = 0
         attitunes = self.getAttitunesContainer().getAttitunes()
@@ -355,6 +358,12 @@
             count += 1
         result['count'] = count
         return result
+        
+    def checkForUpdates(self):
+        """
+        """
+        self.__attitunesContainer.check()
+        self.__setAttituneRunName("1")
 
 # Create an instance of the resource
 resourceAttituneManager = TDSResourceAttituneManager("resourceAttituneManager")

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
      2009-07-07 11:26:05 UTC (rev 5072)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
      2009-07-07 11:44:38 UTC (rev 5073)
@@ -1163,7 +1163,7 @@
         # When Attitune Studio is stopped, we need to observe eventual changes
         # In the deployed attitune directories.
         if uuid == "548f7a9a-567d-773e-a0dd-102fe68a1b49":
-            resourceAttituneManager.getAttitunesContainer().check()
+            resourceAttituneManager.checkForUpdates()
 
     def __onHeadBtEvent(self, *args):
         """


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to