[tuxdroid-svn] r4570 - softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/gadgets
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-04-21 09:51:34
|
Author: remi
Date: 2009-04-21 11:51:21 +0200 (Tue, 21 Apr 2009)
New Revision: 4570
Modified:
softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/gadgets/Gadget.py
Log:
* hidden parameters list is now passed to the gadget configurations
Modified: softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/gadgets/Gadget.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/gadgets/Gadget.py 2009-04-21 09:51:01 UTC (rev 4569)
+++ softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/gadgets/Gadget.py 2009-04-21 09:51:21 UTC (rev 4570)
@@ -427,13 +427,15 @@
# --------------------------------------------------------------------------
# Create a configured gadget from this gadget.
# --------------------------------------------------------------------------
- def createConfiguration(self, name = None, parameters = {}):
+ def createConfiguration(self, name = None, parameters = {},
+ hiddenParameters = []):
"""Create a configured gadget from this gadget.
@param name: Name of the configuration.
if name is None, the gadget name is set.
@param parameters: Parameters of the gadget as dictionary.
if no parameter is defined the default ones are set.
if a parameter is wrong or missing the default one is set.
+ @param hiddenParameters: Hidden parameters list.
@return: The success of the configuration creation.
"""
if name == None:
@@ -447,10 +449,14 @@
args += "%s=%s|" % (key, parameters[key])
if len(args) > 0:
args = args[:-1]
+ hParams = ""
+ for h in hiddenParameters:
+ hParams += "%s|" % h
argsToSend = {
'uuid' : self.__description.getUuid(),
'name' : name,
'parameters' : args,
+ 'hiddenParameters' : hParams,
}
cmd = "gadget_framework/create_configuration?"
return self._sendCommandBooleanResult(cmd, argsToSend)
|