1 <?xml version="1.0" encoding="UTF-8"?> |
1 <?xml version="1.0" encoding="UTF-8"?> |
2 <container xmlns="http://www.symbianfoundation.org/xml/implml/1"> |
2 <container xmlns="http://www.symbianfoundation.org/xml/implml/1"> |
|
3 <tag name="target" value="core"/> |
|
4 <tag name="target" value="rofs2"/> |
|
5 <tag name="target" value="rofs3"/> |
|
6 <tag name="target" value="uda"/> |
|
7 <tag name="target" value="emmc"/> |
|
8 <phase name='post'/> <!-- post phase for making sure that data for all homescreen widgets is available in sequence --> |
|
9 |
|
10 <ruleml xmlns="http://www.s60.com/xml/ruleml/3"> |
|
11 <rule>True configures ${HomescreenPlugins_2.Plugins} = {% mapBundleIds(@{DFSFeatures.HomescreenWidgets}, @{HomescreenPlugins_2.Plugins}) %}</rule> |
|
12 <eval_globals> |
|
13 import logging |
|
14 #logger = logging.getLogger('cone.homescreen3') |
|
15 def mapBundleIds(dfswidgets, plugins): |
|
16 # create a uid-bundle dictionary |
|
17 dict = {} |
|
18 #logger.debug('ws %s' % dfswidgets.value) |
|
19 for widget in dfswidgets.value: |
|
20 dict[widget[dfswidgets._order.index('Uid')].lower()] = widget[dfswidgets._order.index('Bundle')] |
|
21 |
|
22 #logger.debug('d %s' % dict) |
|
23 new_plugins = [] |
|
24 for plugin in plugins.value: |
|
25 # update bundle only if it's 0 or None |
|
26 if plugin[plugins._order.index('Uid')] is not None and (plugin[plugins._order.index('BundleIdentifier')] == '0' or plugin[plugins._order.index('BundleIdentifier')] == None): |
|
27 bundle = dict.get(plugin[plugins._order.index('Uid')].lower()) |
|
28 if bundle is not None: |
|
29 #logger.debug('Bundle id updated %s' % bundle) |
|
30 plugin[plugins._order.index('BundleIdentifier')] = bundle |
|
31 new_plugins.append(plugin) |
|
32 |
|
33 return new_plugins |
|
34 </eval_globals> |
|
35 </ruleml> |
3 <file xmlns="http://www.s60.com/xml/genconfml/1" name="viewconfiguration.xml" target="\private\200159c0\install\view_200286e4\hsps\00\"> |
36 <file xmlns="http://www.s60.com/xml/genconfml/1" name="viewconfiguration.xml" target="\private\200159c0\install\view_200286e4\hsps\00\"> |
4 <setting ref="HomescreenPlugins_2/MaxWidgets"/> |
37 <setting ref="HomescreenPlugins_2/MaxWidgets"/> |
5 <setting ref="HomescreenPlugins_2/UseEmptyWidgets"/> |
38 <setting ref="HomescreenPlugins_2/UseEmptyWidgets"/> |
6 <setting ref="HomescreenPlugins_2/ItemIdEmptyWidgets"/> |
39 <setting ref="HomescreenPlugins_2/ItemIdEmptyWidgets"/> |
7 <setting ref="HomescreenPlugins_2/PropertyEmptyWidgets"/> |
40 <setting ref="HomescreenPlugins_2/PropertyEmptyWidgets"/> |