Debian Codegraph @

gui/dialogs/flight-recorder-save.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <PropertyList>
4 <name>flight-recorder-save</name>
5 <layout>vbox</layout>
6 <resizable>true</resizable>
7 <default-padding>3</default-padding>
8 <nasal>
9 <open><![CDATA[
10 var setdefault = func (prop, value) { if (getprop(prop) == nil) setprop(prop, value);}
11 setdefault("/sim/gui/dialogs/flightrecorder/start-time", "00:00:00");
12 setdefault("/sim/gui/dialogs/flightrecorder/stop-time", "99:00:00");
13 setdefault("/sim/gui/dialogs/flightrecorder/save-all", 1);
14 setdefault("/sim/gui/dialogs/flightrecorder/author-name", "");
15 props.globals.getNode("/sim/gui/dialogs/flightrecorder/author-name", 1).setAttribute("userarchive", 1);
16 ]]></open>
17 </nasal>
18 <!-- titlebar -->
19 <group>
20 <layout>hbox</layout>
21
22 <text>
23 <label>Save Flight Recorder Tape</label>
24 </text>
25
26 <empty><stretch>1</stretch></empty>
27
28 <button>
29 <legend>X</legend>
30 <key>Esc</key>
31 <pref-width>20</pref-width>
32 <pref-height>20</pref-height>
33 <binding>
34 <command>dialog-close</command>
35 </binding>
36 </button>
37 </group>
38 <hrule/>
39
40 <!-- main dialog area -->
41
42 <group>
43 <layout>table</layout>
44
45 <text>
46 <row>0</row><col>0</col>
47 <label>Tape Directory:</label>
48 <halign>left</halign>
49 <valign>top</valign>
50 </text>
51 <text>
52 <row>0</row><col>1</col>
53 <halign>left</halign>
54 <valign>top</valign>
55 <label>MMMMMMMMMMMMMMMMM</label>
56 <stretch>1</stretch>
57 <format>%s</format>
58 <property>/sim/replay/tape-directory</property>
59 <live>true</live>
60 <color>
61 <red>0.7</red>
62 <green>0.7</green>
63 <blue>0.7</blue>
64 <alpha>1</alpha>
65 </color>
66 </text>
67 <button>
68 <equal>false</equal>
69 <row>0</row><col>2</col>
70 <legend>Change</legend>
71 <halign>left</halign>
72 <valign>top</valign>
73 <binding>
74 <command>nasal</command>
75 <script>
76 #var set_tapedir_sel = nil;
77 #var set_tapedir = func {
78 #if (set_tapedir_sel == nil)
79 var set_tapedir_sel = gui.DirSelector.new(
80 func(result) { setprop("/sim/replay/tape-directory", result.getValue()); },
81 "Select Tape Directory", "Ok", getprop("/sim/replay/tape-directory"));
82 set_tapedir_sel.open();
83 #}
84 </script>
85 </binding>
86 </button>
87 <text>
88 <row>1</row><col>0</col>
89 <label>Author/Pilot:</label>
90 <halign>left</halign>
91 </text>
92 <input>
93 <row>1</row><col>1</col>
94 <halign>fill</halign>
95 <length>30</length>
96 <width>200</width>
97 <stretch>true</stretch>
98 <property>/sim/gui/dialogs/flightrecorder/author-name</property>
99 </input>
100
101 <!--
102 <text>
103 <row>1</row><col>0</col>
104 <label>Quality:</label>
105 <halign>left</halign>
106 </text>
107 <combo>
108 <name>quality</name>
109 <halign>left</halign>
110 <row>1</row><col>1</col>
111 <pref-width>100</pref-width>
112 <property>/sim/gui/dialogs/flightrecorder/quality</property>
113 <editable>false</editable>
114 <value>maximum</value>
115 <value>medium</value>
116 <value>low</value>
117 </combo>
118
119 <text>
120 <row>2</row><col>0</col>
121 <label>Time Range:</label>
122 <halign>left</halign>
123 </text>
124
125 <group>
126 <row>2</row><col>1</col><colspan>2</colspan>
127 <layout>hbox</layout>
128 <checkbox>
129 <row>4</row><col>0</col>
130 <property>/sim/gui/dialogs/flightrecorder/save-all</property>
131 <label>All</label>
132 <name>save-all</name>
133 <binding>
134 <command>dialog-apply</command>
135 <object-name>save-all</object-name>
136 </binding>
137 </checkbox>
138 <text>
139 <label>From:</label>
140 <halign>right</halign>
141 <enable>
142 <not>
143 <property>/sim/gui/dialogs/flightrecorder/save-all</property>
144 </not>
145 </enable>
146 </text>
147 <input>
148 <halign>left</halign>
149 <width>50</width>
150 <property>/sim/gui/dialogs/flightrecorder/start-time</property>
151 <enable>
152 <not>
153 <property>/sim/gui/dialogs/flightrecorder/save-all</property>
154 </not>
155 </enable>
156 </input>
157 <text>
158 <label>To:</label>
159 <halign>right</halign>
160 <enable>
161 <not>
162 <property>/sim/gui/dialogs/flightrecorder/save-all</property>
163 </not>
164 </enable>
165 </text>
166 <input>
167 <halign>left</halign>
168 <width>50</width>
169 <property>/sim/gui/dialogs/flightrecorder/stop-time</property>
170 <enable>
171 <not>
172 <property>/sim/gui/dialogs/flightrecorder/save-all</property>
173 </not>
174 </enable>
175 </input>
176 <empty><stretch>1</stretch></empty>
177 </group>
178 -->
179 <text>
180 <row>5</row>
181 <col>0</col>
182 <colspan>3</colspan>
183 <label>Description:</label>
184 <halign>left</halign>
185 <valign>top</valign>
186 </text>
187 </group>
188
189 <group>
190 <layout>vbox</layout>
191 <stretch>10</stretch>
192 <halign>fill</halign>
193 <valign>fill</valign>
194 <textbox>
195 <wrap>false</wrap>
196 <live>false</live>
197 <name>description-string</name>
198 <halign>fill</halign>
199 <valign>fill</valign>
200 <stretch>1</stretch>
201 <pref-width>550</pref-width>
202 <pref-height>200</pref-height>
203 <editable>true</editable>
204 <top-line>1</top-line>
205 <property>/sim/gui/dialogs/flightrecorder/description-string</property>
206 <binding>
207 <command>dialog-apply</command>
208 <object-name>description-string</object-name>
209 </binding>
210 </textbox>
211 </group>
212
213 <!-- button area -->
214 <hrule/>
215 <group>
216 <layout>hbox</layout>
217 <default-padding>10</default-padding>
218 <empty><stretch>true</stretch></empty>
219
220 <button>
221 <legend>Save</legend>
222 <equal>true</equal>
223 <binding>
224 <command>dialog-apply</command>
225 </binding>
226 <binding>
227 <command>nasal</command>
228 <script>
229 var descr = getprop("/sim/gui/dialogs/flightrecorder/description-string");
230 var author = getprop("/sim/gui/dialogs/flightrecorder/author-name");
231 var quality = getprop("/sim/gui/dialogs/flightrecorder/quality");
232 var rangeall = getprop("/sim/gui/dialogs/flightrecorder/save-all");
233 var starttime = getprop("/sim/gui/dialogs/flightrecorder/start-time");
234 var stoptime = getprop("/sim/gui/dialogs/flightrecorder/stop-time");
235 if (rangeall)
236 {
237 starttime="";stoptime="";
238 }
239 var Extra = props.Node.new({
240 "user-data":{ "description": descr, "author-name": author },
241 "tape-data": { "quality": quality, "start": starttime, "stop": stoptime }
242 });
243 fgcommand("save-tape", Extra);
244 </script>
245 </binding>
246 <binding>
247 <command>dialog-close</command>
248 </binding>
249 </button>
250
251 <button>
252 <legend>Cancel</legend>
253 <default>true</default>
254 <equal>true</equal>
255 <binding>
256 <command>dialog-close</command>
257 </binding>
258 </button>
259
260 <empty><stretch>true</stretch></empty>
261 </group>
262
263 </PropertyList>