2011-06-13 18:48:09 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<PropertyList>
|
|
|
|
<name>terrasync</name>
|
2013-02-22 15:30:17 +00:00
|
|
|
|
2013-10-24 21:47:22 +00:00
|
|
|
<nasal>
|
|
|
|
<open>
|
2019-04-08 12:16:34 +00:00
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
var computeStatusText = func {
|
|
|
|
# first, check if the system is actually enabled
|
|
|
|
if (!getprop('/sim/terrasync/enabled'))
|
|
|
|
return "Downloading disabled";
|
|
|
|
|
|
|
|
# only happens if terrasync failed to activate, so
|
|
|
|
# indicates a problem
|
|
|
|
if (!getprop('/sim/terrasync/active'))
|
|
|
|
return "Automatic download inactive";
|
|
|
|
|
|
|
|
var errCount = getprop('/sim/terrasync/error-count');
|
|
|
|
if (errCount > 0)
|
|
|
|
return "Errors occurred during download";
|
|
|
|
|
|
|
|
# we need to suggest some remedial action here!
|
|
|
|
if (getprop('/sim/terrasync/stalled'))
|
|
|
|
return "Downloading has stalled. Check your network connection and settings";
|
|
|
|
|
|
|
|
if (getprop('/sim/terrasync/busy')) {
|
|
|
|
var kbytesSec = getprop('/sim/terrasync/transfer-rate-bytes-sec') / 1024;
|
|
|
|
return sprintf('Downloading: %dKB/sec', int(kbytesSec));
|
|
|
|
}
|
|
|
|
|
|
|
|
# we are enabled but not busy, so idle
|
|
|
|
return "Ready";
|
|
|
|
}
|
|
|
|
|
|
|
|
# timer function, update summary status string
|
|
|
|
var updateStatusText = func {
|
|
|
|
var s = computeStatusText();
|
|
|
|
setprop("/sim/gui/dialogs/terrasync/status", s);
|
|
|
|
|
|
|
|
var msg = "";
|
|
|
|
if (getprop("/sim/terrasync/available")) {
|
|
|
|
if (getprop("/sim/terrasync/enabled"))
|
|
|
|
msg = "Automatic download active; monitor your bandwidth on metered connection.";
|
|
|
|
} else {
|
|
|
|
if (getprop("/sim/terrasync/intialized"))
|
|
|
|
msg = "Automatic download not active.";
|
|
|
|
else
|
|
|
|
msg = "Automatic download not supported.";
|
|
|
|
}
|
|
|
|
setprop("/sim/terrasync/ui-message-node", msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
# the TerraSync properties of interest are tied, so we can't use a
|
|
|
|
# listener. Let's poll while the dialog is open; not ideal but not
|
|
|
|
# a major problem.
|
|
|
|
var statusTimer = maketimer(0.4, updateStatusText);
|
|
|
|
statusTimer.start();
|
|
|
|
updateStatusText();
|
|
|
|
|
|
|
|
setprop("/sim/gui/dialogs/terrasync/display-mode", "0");
|
|
|
|
|
|
|
|
]]>
|
2013-10-24 21:47:22 +00:00
|
|
|
</open>
|
|
|
|
|
|
|
|
<close>
|
|
|
|
statusTimer.stop();
|
|
|
|
statusTimer = nil;
|
|
|
|
</close>
|
|
|
|
|
|
|
|
</nasal>
|
|
|
|
|
2011-06-13 18:48:09 +00:00
|
|
|
<layout>vbox</layout>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
2015-05-03 16:13:50 +00:00
|
|
|
<default-padding>4</default-padding>
|
|
|
|
|
2011-06-13 18:48:09 +00:00
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
|
|
|
<text>
|
2019-04-08 12:16:34 +00:00
|
|
|
<label>Automatic Download of Scenery and Data (TerraSync)</label>
|
2011-06-13 18:48:09 +00:00
|
|
|
</text>
|
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<empty><stretch>1</stretch></empty>
|
2011-06-13 18:48:09 +00:00
|
|
|
|
|
|
|
<button>
|
|
|
|
<pref-width>16</pref-width>
|
|
|
|
<pref-height>16</pref-height>
|
|
|
|
<legend></legend>
|
|
|
|
<keynum>27</keynum>
|
|
|
|
<border>2</border>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<hrule/>
|
|
|
|
|
2012-08-27 22:21:50 +00:00
|
|
|
<text>
|
|
|
|
<name>message</name>
|
2011-06-13 18:48:09 +00:00
|
|
|
<color>
|
|
|
|
<red>1.0</red>
|
|
|
|
<green>0.4</green>
|
|
|
|
<blue>0.4</blue>
|
|
|
|
</color>
|
2019-04-08 12:16:34 +00:00
|
|
|
<halign>left</halign>
|
|
|
|
<property>/sim/terrasync/ui-message-node</property>
|
|
|
|
<live>true</live>
|
2011-06-13 18:48:09 +00:00
|
|
|
</text>
|
|
|
|
|
2012-08-27 22:21:50 +00:00
|
|
|
<group>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
2013-10-24 21:47:22 +00:00
|
|
|
<halign>left</halign>
|
2015-05-03 16:13:50 +00:00
|
|
|
<equal>false</equal>
|
|
|
|
|
|
|
|
<!-- only for a gap -->
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>center</halign>
|
|
|
|
<label> </label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<checkbox>
|
|
|
|
<name>terrasync-enabled</name>
|
|
|
|
<halign>left</halign>
|
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
|
|
|
<colspan>3</colspan>
|
2013-10-24 21:47:22 +00:00
|
|
|
<property>/sim/terrasync/enabled</property>
|
2019-04-08 12:16:34 +00:00
|
|
|
<label>Enable automatic scenery download</label>
|
2015-05-03 16:13:50 +00:00
|
|
|
<live>true</live>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>terrasync-enabled</object-name>
|
|
|
|
</binding>
|
|
|
|
<enable>
|
|
|
|
<not-equals>
|
|
|
|
<property>/sim/terrasync/scenery-dir</property>
|
|
|
|
<value></value>
|
|
|
|
</not-equals>
|
|
|
|
</enable>
|
|
|
|
</checkbox>
|
2011-06-13 18:48:09 +00:00
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<!-- only for a gap -->
|
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>1</col>
|
|
|
|
<halign>center</halign>
|
|
|
|
<label> </label>
|
|
|
|
</text>
|
2011-06-13 18:48:09 +00:00
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<checkbox>
|
|
|
|
<name>ai-data-enabled</name>
|
|
|
|
<halign>left</halign>
|
|
|
|
<row>1</row>
|
|
|
|
<col>2</col>
|
|
|
|
<!--
|
|
|
|
<colspan>2</colspan>
|
|
|
|
-->
|
|
|
|
<property>/sim/terrasync/ai-data-enabled</property>
|
2019-04-08 12:16:34 +00:00
|
|
|
<label>Update AI Traffic during FG start</label>
|
2015-05-03 16:13:50 +00:00
|
|
|
<live>true</live>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>ai-data-enabled</object-name>
|
|
|
|
</binding>
|
|
|
|
<enable>
|
2019-04-08 12:16:34 +00:00
|
|
|
<property>/sim/terrasync/enabled</property>
|
|
|
|
<property>/sim/traffic-manager/enabled</property>
|
2015-05-03 16:13:50 +00:00
|
|
|
</enable>
|
|
|
|
</checkbox>
|
2011-06-13 18:48:09 +00:00
|
|
|
|
2019-04-08 12:16:34 +00:00
|
|
|
<button>
|
|
|
|
<row>1</row>
|
|
|
|
<col>3</col>
|
|
|
|
<legend>Update Now</legend>
|
|
|
|
<border>2</border>
|
|
|
|
<equal>true</equal>
|
|
|
|
<enable>
|
|
|
|
<property>/sim/terrasync/enabled</property>
|
|
|
|
<property>/sim/traffic-manager/enabled</property>
|
|
|
|
<property>/sim/terrasync/ai-data-enabled</property>
|
|
|
|
</enable>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/sim/terrasync/ai-data-enabled</property>
|
|
|
|
<value>1</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/sim/terrasync/ai-data-update-now</property>
|
|
|
|
<value>1</value>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- <checkbox>
|
2015-05-03 16:13:50 +00:00
|
|
|
<name>other-data-enabled</name>
|
|
|
|
<halign>left</halign>
|
|
|
|
<row>2</row>
|
|
|
|
<col>2</col>
|
|
|
|
<colspan>2</colspan>
|
|
|
|
<property>/sim/terrasync/other-data-enabled</property>
|
|
|
|
<label>Download other data files</label>
|
|
|
|
<live>true</live>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>other-data-enabled</object-name>
|
|
|
|
</binding>
|
|
|
|
<enable>
|
|
|
|
<property>/sim/terrasync/enabled</property>
|
|
|
|
</enable>
|
|
|
|
</checkbox>
|
2019-04-08 12:16:34 +00:00
|
|
|
-->
|
2015-05-03 16:13:50 +00:00
|
|
|
<text>
|
|
|
|
<name>warning_text</name>
|
|
|
|
<row>3</row>
|
|
|
|
<col>0</col><colspan>4</colspan>
|
|
|
|
<color>
|
|
|
|
<red>1.0</red>
|
|
|
|
<green>0.4</green>
|
|
|
|
<blue>0.4</blue>
|
|
|
|
<alpha>1</alpha>
|
|
|
|
</color>
|
|
|
|
<halign>center</halign>
|
|
|
|
<label/>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<hrule/>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
2011-06-13 18:48:09 +00:00
|
|
|
<halign>left</halign>
|
2015-05-03 16:13:50 +00:00
|
|
|
<default-padding>4</default-padding>
|
2011-06-13 18:48:09 +00:00
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<!-- only for a gap -->
|
|
|
|
<text>
|
|
|
|
<halign>center</halign>
|
|
|
|
<label> </label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>Information</legend>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/sim/gui/dialogs/terrasync/display-mode</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- only for a gap -->
|
|
|
|
<text>
|
|
|
|
<halign>center</halign>
|
|
|
|
<label></label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend> Log </legend>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/sim/gui/dialogs/terrasync/display-mode</property>
|
|
|
|
<value>1</value>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<!-- 'tabbed' group controlled by display-mode property -->
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
2011-06-13 18:48:09 +00:00
|
|
|
<halign>left</halign>
|
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<!-- gap -->
|
|
|
|
<text>
|
|
|
|
<label></label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<valign>fill</valign>
|
|
|
|
<default-padding>0</default-padding>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<halign>left</halign>
|
|
|
|
<valign>top</valign>
|
|
|
|
<equal>false</equal>
|
|
|
|
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<visible>
|
|
|
|
<equals>
|
|
|
|
<property>/sim/gui/dialogs/terrasync/display-mode</property>
|
|
|
|
<value>0</value>
|
|
|
|
</equals>
|
|
|
|
</visible>
|
|
|
|
|
|
|
|
<!-- status text is generated by Nasal dynamically -->
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<colspan>2</colspan>
|
|
|
|
|
|
|
|
<halign>left</halign>
|
|
|
|
<pref-width>200</pref-width>
|
|
|
|
<format>Status: %s</format>
|
|
|
|
<property>/sim/gui/dialogs/terrasync/status</property>
|
|
|
|
<live>true</live>
|
|
|
|
<color>
|
|
|
|
<red>0.7</red>
|
|
|
|
<green>0.7</green>
|
|
|
|
<blue>0.7</blue>
|
|
|
|
<alpha>1</alpha>
|
|
|
|
</color>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<halign>left</halign>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>KBytes downloaded:</label>
|
|
|
|
<color>
|
|
|
|
<red>0.7</red>
|
|
|
|
<green>0.7</green>
|
|
|
|
<blue>0.7</blue>
|
|
|
|
<alpha>1</alpha>
|
|
|
|
</color>
|
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>1</col>
|
|
|
|
<format>%d</format>
|
|
|
|
<property>/sim/terrasync/downloaded-kbytes</property>
|
|
|
|
<live>true</live>
|
|
|
|
<halign>right</halign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<color>
|
|
|
|
<red>0.7</red>
|
|
|
|
<green>0.7</green>
|
|
|
|
<blue>0.7</blue>
|
|
|
|
<alpha>1</alpha>
|
|
|
|
</color>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<halign>left</halign>
|
|
|
|
<row>2</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>Processed elements:</label>
|
|
|
|
<color>
|
|
|
|
<red>0.7</red>
|
|
|
|
<green>0.7</green>
|
|
|
|
<blue>0.7</blue>
|
|
|
|
<alpha>1</alpha>
|
|
|
|
</color>
|
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<row>2</row>
|
|
|
|
<col>1</col>
|
|
|
|
<format>%s</format>
|
|
|
|
<property>/sim/terrasync/update-count</property>
|
|
|
|
<live>true</live>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<halign>right</halign>
|
|
|
|
<color>
|
|
|
|
<red>0.7</red>
|
|
|
|
<green>0.7</green>
|
|
|
|
<blue>0.7</blue>
|
|
|
|
<alpha>1</alpha>
|
|
|
|
</color>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<halign>left</halign>
|
|
|
|
<row>3</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>Processed scenery tiles:</label>
|
|
|
|
<color>
|
|
|
|
<red>0.7</red>
|
|
|
|
<green>0.7</green>
|
|
|
|
<blue>0.7</blue>
|
|
|
|
<alpha>1</alpha>
|
|
|
|
</color>
|
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<row>3</row>
|
|
|
|
<col>1</col>
|
|
|
|
<format>%s</format>
|
|
|
|
<property>/sim/terrasync/tile-count</property>
|
|
|
|
<live>true</live>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<halign>right</halign>
|
|
|
|
<color>
|
|
|
|
<red>0.7</red>
|
|
|
|
<green>0.7</green>
|
|
|
|
<blue>0.7</blue>
|
|
|
|
<alpha>1</alpha>
|
|
|
|
</color>
|
|
|
|
</text>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<loglist>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
|
|
|
|
<visible>
|
|
|
|
<equals>
|
|
|
|
<property>/sim/gui/dialogs/terrasync/display-mode</property>
|
|
|
|
<value>1</value>
|
|
|
|
</equals>
|
|
|
|
</visible>
|
|
|
|
|
|
|
|
<halign>fill</halign>
|
|
|
|
<valign>fill</valign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<pref-width>600</pref-width>
|
|
|
|
<pref-height>300</pref-height>
|
|
|
|
<logclass>terrasync</logclass>
|
|
|
|
<padding>6</padding>
|
|
|
|
</loglist>
|
|
|
|
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<!-- gap -->
|
|
|
|
<text>
|
|
|
|
<label></label>
|
|
|
|
</text>
|
|
|
|
|
2013-02-09 11:34:44 +00:00
|
|
|
</group> <!-- end of tabbed group -->
|
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<hrule/>
|
2011-06-13 18:48:09 +00:00
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>3</default-padding>
|
|
|
|
<empty><stretch>true</stretch></empty>
|
2011-06-13 18:48:09 +00:00
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<button>
|
2019-04-08 12:16:34 +00:00
|
|
|
<legend>Close</legend>
|
2015-05-03 16:13:50 +00:00
|
|
|
<border>2</border>
|
|
|
|
<equal>true</equal>
|
|
|
|
<key>Esc</key>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
</group>
|
2011-06-13 18:48:09 +00:00
|
|
|
|
2012-08-27 22:21:50 +00:00
|
|
|
</group>
|
|
|
|
|
2011-06-13 18:48:09 +00:00
|
|
|
</PropertyList>
|