
diff -r 2e2dc3d30ca8 -r 341166945d65 homescreenapp/hsapplication/conf/base/implml/homescreendb_templates/fill.sql
--- a/homescreenapp/hsapplication/conf/base/implml/homescreendb_templates/fill.sql	Thu Jun 24 13:11:40 2010 +0100
+++ b/homescreenapp/hsapplication/conf/base/implml/homescreendb_templates/fill.sql	Fri Jun 25 19:19:22 2010 +0300
@@ -1,6 +1,4 @@
-{%- set portraitWallpaper = feat_tree.HomeScreenDbSettings.portraitWallpaper._value or '' -%}
-{%- set landscapeWallpaper = feat_tree.HomeScreenDbSettings.landscapeWallpaper._value or '' -%}
-INSERT INTO Scene (portraitWallpaper, landscapeWallpaper) VALUES ('{{portraitWallpaper}}', '{{landscapeWallpaper}}');
+INSERT INTO Scene (id) VALUES (1);
 
 {% for index in range(feat_tree.HomeScreenDbSettings.Pages._value|length) -%}
     {%- set id = feat_tree.HomeScreenDbSettings.Pages.id._value[index] -%}
@@ -34,47 +32,9 @@
     INSERT INTO WidgetPreferences (key, value, widgetId) VALUES ('{{key}}', '{{value}}', {{widgetId}});
 {% endfor %}
 
-{%- set snappingEnabled = feat_tree.HomeScreenDbSettings.SnapConfiguration.snappingEnabled._value -%}    
-{%- set showEffects = feat_tree.HomeScreenDbSettings.SnapConfiguration.showEffects._value -%} 
-{%- set snapForce = feat_tree.HomeScreenDbSettings.SnapConfiguration.snapForce._value -%}    
-{%- set snapGap = feat_tree.HomeScreenDbSettings.SnapConfiguration.snapGap._value -%}    
-{%- set borderGap = feat_tree.HomeScreenDbSettings.SnapConfiguration.borderGap._value -%}    
-{%- set timeout = feat_tree.HomeScreenDbSettings.SnapConfiguration.timeout._value -%}    
-INSERT INTO SnapConfiguration (snappingEnabled, showEffects, snapForce, snapGap, borderGap, timeout) VALUES ({{snappingEnabled}}, {{showEffects}}, {{snapForce}}, {{snapGap}}, {{borderGap}}, {{timeout}});
-
-{%- set bounceEffect = feat_tree.HomeScreenDbSettings.GeneralConfiguration.bounceEffect._value -%}
-{%- set tapAndHoldDistance = feat_tree.HomeScreenDbSettings.GeneralConfiguration.tapAndHoldDistance._value -%}
-{%- set widgetTapAndHoldTimeout = feat_tree.HomeScreenDbSettings.GeneralConfiguration.widgetTapAndHoldTimeout._value -%}
-{%- set sceneTapAndHoldTimeout = feat_tree.HomeScreenDbSettings.GeneralConfiguration.sceneTapAndHoldTimeout._value -%}
-{%- set pageChangeZoneWidth = feat_tree.HomeScreenDbSettings.GeneralConfiguration.pageChangeZoneWidth._value -%}
-{%- set pageIndicatorSpacing = feat_tree.HomeScreenDbSettings.GeneralConfiguration.pageIndicatorSpacing._value -%}
-{%- set pageChangeAnimationDuration = feat_tree.HomeScreenDbSettings.GeneralConfiguration.pageChangeAnimationDuration._value -%}
-{%- set pageChangeZoneAnimationDuration = feat_tree.HomeScreenDbSettings.GeneralConfiguration.pageChangeZoneAnimationDuration._value -%}
-{%- set pageChangeZoneReverseAnimationDuration = feat_tree.HomeScreenDbSettings.GeneralConfiguration.pageChangeZoneReverseAnimationDuration._value -%}
-{%- set pageRemovedAnimationDuration = feat_tree.HomeScreenDbSettings.GeneralConfiguration.pageRemovedAnimationDuration._value -%}
-{%- set newPageAddedAnimationDuration = feat_tree.HomeScreenDbSettings.GeneralConfiguration.newPageAddedAnimationDuration._value -%}
-{%- set widgetDragEffectDuration = feat_tree.HomeScreenDbSettings.GeneralConfiguration.widgetDragEffectDuration._value -%}
-{%- set widgetDropEffectDuration = feat_tree.HomeScreenDbSettings.GeneralConfiguration.widgetDropEffectDuration._value -%}
-{%- set boundaryFeedbackEffectDistance = feat_tree.HomeScreenDbSettings.GeneralConfiguration.boundaryFeedbackEffectDistance._value -%}
-{%- set defaultPageId = feat_tree.HomeScreenDbSettings.GeneralConfiguration.defaultPageId._value -%}
-{%- set maximumPageCount = feat_tree.HomeScreenDbSettings.GeneralConfiguration.maximumPageCount._value -%}
-{%- set maximumWidgetHeight = feat_tree.HomeScreenDbSettings.GeneralConfiguration.maximumWidgetHeight._value -%}
-{%- set maximumWidgetWidth = feat_tree.HomeScreenDbSettings.GeneralConfiguration.maximumWidgetWidth._value -%}
-{%- set minimumWidgetHeight = feat_tree.HomeScreenDbSettings.GeneralConfiguration.minimumWidgetHeight._value -%}
-{%- set minimumWidgetWidth = feat_tree.HomeScreenDbSettings.GeneralConfiguration.minimumWidgetWidth._value -%}
-{%- set shortcutLabelsVisible = feat_tree.HomeScreenDbSettings.GeneralConfiguration.shortcutLabelsVisible._value -%}
-{%- set pageChangePanDistance = feat_tree.HomeScreenDbSettings.GeneralConfiguration.pageChangePanDistance._value -%}
-INSERT INTO GeneralConfiguration (bounceEffect, tapAndHoldDistance, widgetTapAndHoldTimeout, sceneTapAndHoldTimeout, pageChangeZoneWidth, pageIndicatorSpacing, pageChangeAnimationDuration, pageChangeZoneAnimationDuration, pageChangeZoneReverseAnimationDuration, pageRemovedAnimationDuration, newPageAddedAnimationDuration, widgetDragEffectDuration, widgetDropEffectDuration, boundaryFeedbackEffectDistance, defaultPageId, maximumPageCount, maximumWidgetHeight, maximumWidgetWidth, minimumWidgetHeight, minimumWidgetWidth, shortcutLabelsVisible, pageChangePanDistance) VALUES ({{bounceEffect}}, {{tapAndHoldDistance}}, {{widgetTapAndHoldTimeout}}, {{widgetTapAndHoldTimeout}}, {{pageChangeZoneWidth}}, {{pageIndicatorSpacing}}, {{pageChangeAnimationDuration}}, {{pageChangeZoneAnimationDuration}}, {{pageChangeZoneReverseAnimationDuration}}, {{pageRemovedAnimationDuration}}, {{newPageAddedAnimationDuration}}, {{widgetDragEffectDuration}}, {{widgetDropEffectDuration}}, {{boundaryFeedbackEffectDistance}}, {{defaultPageId}}, {{maximumPageCount}}, {{maximumWidgetHeight}}, {{maximumWidgetWidth}}, {{minimumWidgetHeight}}, {{minimumWidgetWidth}}, {{shortcutLabelsVisible}}, {{pageChangePanDistance}});
-
-{%- set pageChangeFeedbackType = feat_tree.HomeScreenDbSettings.FeedbackConfiguration.pageChangeFeedbackType._value -%}
-{%- set widgetPickFeedbackType = feat_tree.HomeScreenDbSettings.FeedbackConfiguration.widgetPickFeedbackType._value -%}
-{%- set widgetDropFeedbackType = feat_tree.HomeScreenDbSettings.FeedbackConfiguration.widgetDropFeedbackType._value -%}
-{%- set widgetRepositionFeedbackType = feat_tree.HomeScreenDbSettings.FeedbackConfiguration.widgetRepositionFeedbackType._value -%}
-{%- set widgetOverTrashbinFeedbackType = feat_tree.HomeScreenDbSettings.FeedbackConfiguration.widgetOverTrashbinFeedbackType._value -%}
-{%- set widgetDropToTrashbinFeedbackType = feat_tree.HomeScreenDbSettings.FeedbackConfiguration.widgetDropToTrashbinFeedbackType._value -%}
-{%- set shortcutWidgetTapFeedbackType = feat_tree.HomeScreenDbSettings.FeedbackConfiguration.shortcutWidgetTapFeedbackType._value -%}
-{%- set widgetMoveBlockedFeedbackType = feat_tree.HomeScreenDbSettings.FeedbackConfiguration.widgetMoveBlockedFeedbackType._value -%}
-{%- set clockWidgetTapFeedbackType = feat_tree.HomeScreenDbSettings.FeedbackConfiguration.clockWidgetTapFeedbackType._value -%}
-{%- set widgetSnappingFeedbackType = feat_tree.HomeScreenDbSettings.FeedbackConfiguration.widgetSnappingFeedbackType._value -%}
-INSERT INTO FeedbackConfiguration (pageChangeFeedbackType, widgetPickFeedbackType, widgetDropFeedbackType, widgetRepositionFeedbackType, widgetOverTrashbinFeedbackType, widgetDropToTrashbinFeedbackType, shortcutWidgetTapFeedbackType, widgetMoveBlockedFeedbackType, clockWidgetTapFeedbackType, widgetSnappingFeedbackType) VALUES ('{{pageChangeFeedbackType}}', '{{widgetPickFeedbackType}}', '{{widgetDropFeedbackType}}', '{{widgetRepositionFeedbackType}}', '{{widgetOverTrashbinFeedbackType}}', '{{widgetDropToTrashbinFeedbackType}}', '{{shortcutWidgetTapFeedbackType}}', '{{widgetMoveBlockedFeedbackType}}', '{{clockWidgetTapFeedbackType}}', '{{widgetSnappingFeedbackType}}');
-
+{% for index in range(feat_tree.HomeScreenDbSettings.Configuration._value|length) -%}
+    {%- set key = feat_tree.HomeScreenDbSettings.Configuration.key._value[index] or '' -%}
+    {%- set value = feat_tree.HomeScreenDbSettings.Configuration.value._value[index] -%}
+    
+    INSERT INTO Configuration (key, value) VALUES ('{{key}}', '{{value}}');
+{% endfor %}




