[tuxdroid-svn] r5716 - software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicatio
Status: Beta
Brought to you by:
ks156
|
From: ks156 <c2m...@c2...> - 2009-10-16 10:40:08
|
Author: ks156
Date: 2009-10-16 12:39:52 +0200 (Fri, 16 Oct 2009)
New Revision: 5716
Modified:
software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetOnline.py
software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetsContainer.py
software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetsOnlineContainer.py
Log:
* Merged rev 5714 from the trunk. Other rev will be merged after the release.
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetOnline.py
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetOnline.py 2009-10-16 09:57:19 UTC (rev 5715)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetOnline.py 2009-10-16 10:39:52 UTC (rev 5716)
@@ -143,3 +143,15 @@
result = "%sscg/%s.scg" % (ONLINE_GADGETS_BASE_URL,
self.getSymbolicName())
return result
+
+ # --------------------------------------------------------------------------
+ # Get the parent plugin Uuid.
+ # --------------------------------------------------------------------------
+ def getParentPluginUuid(self):
+ """Get the parent plugin Uuid.
+ @return: The parent plugin Uuid.
+ """
+ if self.__dictionary.has_key('parentPluginUuid'):
+ return self.__dictionary['parentPluginUuid']
+ else:
+ return "0"
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetsContainer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetsContainer.py 2009-10-16 09:57:19 UTC (rev 5715)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetsContainer.py 2009-10-16 10:39:52 UTC (rev 5716)
@@ -100,6 +100,15 @@
return self.__gadgetsOnlineContainer
# --------------------------------------------------------------------------
+ # Get the plugins container.
+ # --------------------------------------------------------------------------
+ def getPluginsContainer(self):
+ """Get the plugins container.
+ @return: A PluginsContainer object.
+ """
+ return self.__pluginsContainer
+
+ # --------------------------------------------------------------------------
# Generate a single name.
# --------------------------------------------------------------------------
def generateSingleName(self, gadgetName, language):
@@ -167,6 +176,7 @@
gadgetData['category'] = gadget.getDescription().getCategory()
gadgetData['author'] = gadget.getDescription().getAuthor()
gadgetData['platform'] = gadget.getDescription().getPlatform()
+ gadgetData['parentPluginUuid'] = gadget.getParentPlugin().getDescription().getUuid()
gadgetData['name'] = {}
gadgetData['description'] = {}
gadgetData['helpFile'] = {}
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetsOnlineContainer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetsOnlineContainer.py 2009-10-16 09:57:19 UTC (rev 5715)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/util/applicationserver/gadget/GadgetsOnlineContainer.py 2009-10-16 10:39:52 UTC (rev 5716)
@@ -154,6 +154,13 @@
cat = onlineGadget.getCategory()
if not cat.lower() in categories:
categories.append(cat.lower())
+ # Check the parent plugin
+ parentPluginUuid = onlineGadget.getParentPluginUuid()
+ if parentPluginUuid != "0":
+ pluginsContainer = self.__gadgetsContainer.getPluginsContainer()
+ parentPlugin = pluginsContainer.getPluginByUuid(parentPluginUuid)
+ if parentPlugin == None:
+ continue
# Check the category
if category != "all_gadgets":
if cat.lower() != category.lower():
|