Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function generateConfig(widget)
- {
- print(" {")
- for (k in widget.configGroups) {
- print(" widget.currentConfigGroup = '" + widget.configGroups[k] + "'")
- widget.currentConfigGroup = widget.configGroups[k]
- for (l in widget.configKeys) {
- print(" widget.writeConfig('" + widget.configKeys[l] + "', '" + widget.readConfig(widget.configKeys[l]) + "')")
- }
- }
- for (k in widget.globalConfigGroups) {
- print(" widget.globalCurrentConfigGroup = '" + widget.globalConfigGroups[k] + "'")
- widget.globalCurrentConfigGroup = widget.globalConfigGroups[k]
- for (l in widget.globalConfigGroups) {
- print(" widget.writeConfig('" + widget.configKeys[l] + "', '" + widget.readConfig(widget.configKeys[l]) + "')")
- }
- }
- print(" }")
- }
- function exportWidgets(containment)
- {
- var widgets = containment.widgets()
- if (widgets.length < 1) {
- return;
- }
- print('var widget')
- for (j in widgets) {
- var widget = widgets[j]
- print('')
- print("widget = panel.addWidget('" + widget.type + "')")
- print(' # Generate configuration data')
- generateConfig(widget)
- }
- }
- var a = activities()
- for (i in a) {
- print('{')
- print("var activity = new Activity('" + a[i].type + "')")
- print('activity.screen = ' + a[i].screen)
- print('activity.desktop = ' + a[i].desktop)
- exportWidgets(a[i])
- print('}')
- }
- var p = panels()
- for (i in p) {
- //print("Name of panel " + p[i].id + " is " + p[i].type)
- print('{')
- print("var panel = new Panel('" + p[i].type + "')")
- print('panel.location = ' + p[i].location)
- //print("the relative width is: " + (p[i].length / screenGeometry(p[i].screen).width))
- print('panel.height = ' + p[i].height)
- print('panel.length = ' + p[i].length)
- print('panel.offset = ' + p[i].offset)
- //exportWidgets(p[i])
- print('}')
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement