Author: remi
Date: 2009-09-22 14:53:53 +0200 (Tue, 22 Sep 2009)
New Revision: 5482
Modified:
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
Log:
* Fixed bug with gadget start button in "all" gadgets tab.
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-09-22 10:43:13 UTC (rev 5481)
+++
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
2009-09-22 12:53:53 UTC (rev 5482)
@@ -465,7 +465,8 @@
if ugcObj.getDescription().getUuid() == uuid:
self.__onDemandIndex = i
self.computeOnDemandDictForThumbnailBar()
- break
+ return True
+ return False
def computeOnDemandDictForThumbnailBar(self):
"""
@@ -946,7 +947,7 @@
return
ugc.start(ugc.getDefaultRunCommandName())
- def startCurrentGadget(self):
+ def startCurrentGadget(self, ugc = None):
"""
"""
if not self.isStarted():
@@ -961,7 +962,8 @@
return
# Else load current selected on demand gadget
if len(self.__onDemandList) > 0:
- ugc = self.__onDemandList[self.__onDemandIndex]
+ if ugc == None:
+ ugc = self.__onDemandList[self.__onDemandIndex]
if not self.__checkLastStopActionTime():
return
t = threading.Thread(target = ugc.start, args =
(ugc.getDefaultRunCommandName(),))
@@ -1393,8 +1395,12 @@
headersStruct = self.getDefaultHeadersStruct()
contentStruct = self.getDefaultContentStruct()
uuid = parameters['uuid']
-
resourceRobotContentInteractions.getPguContextsManager().selectOnDemandByUuid(uuid)
- t = threading.Thread(target =
resourceRobotContentInteractions.getPguContextsManager().startCurrentGadget)
+ if
resourceRobotContentInteractions.getPguContextsManager().selectOnDemandByUuid(uuid):
+ ugc = None
+ else:
+ ugc = resourceUgcServer.getUgcContainer().getUgcByUuid(uuid)
+ t = threading.Thread(target =
resourceRobotContentInteractions.getPguContextsManager().startCurrentGadget,
+ args = (ugc,))
t.start()
contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
return headersStruct, contentStruct
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn