-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.xul
363 lines (344 loc) · 11.8 KB
/
main.xul
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="main.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://gipsy/locale/main.dtd">
<window
id="gps-window"
title="&gipsy.title;"
orient="vertical"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
persist="width height" >
<stringbundle id="bundle" src="chrome://gipsy/locale/main.properties"/>
<script src="xutil.js" />
<script src="countries.js" />
<script src="gmap.js" />
<script src="gprofile.js" />
<script src="main.js" />
<script src="flighttree.js" />
<script src="gpstree.js" />
<menupopup id="tree_popup" onpopupshowing="ctx_setup_usercmd()" >
<menuitem label="&open;..." oncommand="treeView.launch_file()"
id="popup_launch" style="display:none" />
<menuitem label="&show.source;" oncommand="treeView.show_file()" />
<menuitem label="&gpx.save;" oncommand="treeView.export_file('gpx', 'tracklog')" />
<menuitem label="GPX thermals" style="display:none" id="gpxthermals"
oncommand="treeView.export_file('gpx', 'thermals')" />
<menuitem label="&kml.save;" oncommand="treeView.export_file('kml', 'tracklog')" />
<menuitem label="&svg.save;" oncommand="treeView.export_file('svg', 'tracklog')" />
<menuitem label="&create.logbook;" oncommand="treeView.export_file('html', 'flighttrack')" />
<menuitem label="&delete;" oncommand="treeView.delete_cmd()" />
<menuseparator />
<menuitem label="&properties;" oncommand="treeView.properties_cmd()" />
<menuseparator />
<menuitem label="User command 1" oncommand="treeView.user_command(1)" id="ctx_usercmd1" />
<menuitem label="User command 2" oncommand="treeView.user_command(2)" id="ctx_usercmd2" />
<menuitem label="User command 3" oncommand="treeView.user_command(3)" id="ctx_usercmd3" />
</menupopup>
<menupopup id="gps_popup">
<menuitem label="Garmin GPS" oncommand="gpsView.set_gps_type('garmin')" />
<menuitem label="Aircotec - MXP 57600" oncommand="gpsView.set_gps_type('aircotec')" />
<menuitem label="5020/5030/Compeo/Competino" oncommand="gpsView.set_gps_type('compeo')" />
<menuitem label="MLR/Digifly/CoMo" oncommand="gpsView.set_gps_type('mlr')" id="mlr_gps" />
<menuitem label="Flymaster" oncommand="gpsView.set_gps_type('flymaster')" id="flymaster_gps" />
<!-- <menuitem label="Brauniger IQ Basic/Flytec 6015" oncommand="gpsView.set_gps_type('iq')" id="iq_gps" /> -->
</menupopup>
<menubar>
<menu label="&file;" accesskey="&file.key;">
<menupopup>
<menuitem label="&menu.sendxc;"
oncommand="window.openDialog('chrome://gipsy/content/synchro.xul', 'gipsy_synchro', 'dialog=yes,chrome,modal=no');"
id="xsend_menu" />
<menuitem label="&menu.importgpx;"
oncommand="import_gpx();"
/>
<menuseparator />
<menuitem label="&preferences;"
oncommand="window.openDialog('chrome://gipsy/content/preferences.xul', 'gipsy_prefs', 'chrome,modal=no')"
accesskey="&preferences.key;" />
<menuitem label="&menu.googlemapdownload;"
oncommand="download_map_definitions()" />
<menuseparator />
<menuitem label="&close;" oncommand="window.close()"
accesskey="&close.key;"/>
</menupopup>
</menu>
<menu label="&help;" accesskey="&help.key;">
<menupopup>
<menuitem label="&problem;"
oncommand="window.openDialog('chrome://gipsy/content/help.xul', 'gipsy_help', 'dialog=yes,chrome,modal=yes');" />
<menuitem label="&about;"
oncommand="window.openDialog('chrome://gipsy/content/about.xul', 'gipsy_about', 'dialog=yes,chrome,modal=yes,width=270,height=160,top=200,left=400');" />
</menupopup>
</menu>
</menubar>
<tabbox flex="1" >
<tabs id="tl_tabs" >
<tab label="&tab.flights;" />
<tab label="&tab.devices;" />
</tabs>
<tabpanels flex="1" id="tl_panels">
<tabpanel style="overflow:auto">
<hbox flex="1" >
<vbox id="treehbox" width="400" persist="width" flex="1">
<hbox>
<button label="&collapse.all;"
oncommand="expand_all()" />
<label value="&pilot.filter;:" />
<spacer flex="1" />
<menulist id="pilot_filter"
oncommand="pilot_filter_change()">
<menupopup>
<menuitem label="&pilot.all;" />
</menupopup>
</menulist>
</hbox>
<tree flex="1" id="flight_tree" onselect="tree_flight_select()" >
<treecols>
<treecol id="col_date" flex="1" label="&date.utc;"
primary="true" persist="width"/>
<splitter class="tree-splitter"/>
<treecol id="col_site" flex="1" label="&launch;"
persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="col_landing" flex="1" label="&landing;"
persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="col_pilot" flex="1" hidden="true" label="&pilot;"
persist="hidden width" />
<splitter class="tree-splitter"/>
<treecol id="col_glider" flex="1" hidden="true"
label="&glider;" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="col_file" flex="1" hidden="true"
label="&filename;" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="col_optleague" flex="1" hidden="true"
label="&contest;" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="col_opttype" flex="1" hidden="true"
label="&route;" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="col_optdistance" flex="1" hidden="true"
label="&distance;" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="col_optpoints" flex="1" hidden="true"
label="&points;" persist="hidden width"/>
</treecols>
<treechildren contextmenu="tree_popup" />
</tree>
<tabbox id="stat_box_tabs" persist="selectedIndex">
<tabs>
<tab label="&flight.info;" />
<tab label="&statistics;" />
<tab label="XContest" />
<tab label="&pilot.info;" />
</tabs>
<tabpanels>
<tabpanel >
<vbox flex="1" style="overflow:auto;" >
<grid>
<columns>
<column/>
<column flex="1" />
</columns>
<rows>
<row>
<label value="&date;:" />
<label id="f_date" />
</row>
<row>
<label value="" />
<label id="f_utc_date" />
</row>
<row>
<label value="&launch;:" />
<label id="f_site" />
</row>
<row>
<label value="&landing;:" />
<label id="f_landing" />
</row>
<row>
<label value="&stat.sdist;:" />
<label id="f_dist_startland" />
</row>
</rows>
</grid>
<textbox readonly="true" multiline="true" flex="1" id="f_comment" />
</vbox>
</tabpanel>
<tabpanel>
<grid>
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row>
<label value="&duration;:" />
<label id="f_duration" />
</row>
<row>
<label value="&stat.maxheight;:" />
<label id="f_height_max" />
</row>
<row>
<label value="&stat.heightdiff;:" />
<label id="f_height_diff" />
</row>
<row>
<label value="&stat.maxvario;:" />
<label id="f_vario_max" />
</row>
<row>
<label value="&stat.minvario;:" />
<label id="f_vario_min" />
</row>
<row>
<label value="&stat.maxspeed;:" />
<label id="f_speed_max" />
</row>
<row>
<label value="&stat.totdist;:" />
<label id="f_dist_flown" />
</row>
<row>
<label value="&stat.totheight;:" />
<label id="f_height_upsum" />
</row>
</rows>
</grid>
</tabpanel>
<tabpanel>
<grid>
<columns>
<column/>
<column flex="1"/>
<column/>
</columns>
<rows>
<row>
<label value="&xcontest.login;:" />
<label id="f_xcontestid" />
</row>
<row>
<label value="&synchronization;:" />
<label id="f_synchro" flex="1"/>
<button label="&upload;" id="f_synchro_upload"
hidden="true" oncommand="start_upload()" />
</row>
<row id="xcontest_row" hidden="true">
<button label="&xcontest.show;"
oncommand="open_xcontest_browser()" />
<menulist id="xcontest_list" />
</row>
</rows>
</grid>
</tabpanel>
<tabpanel>
<vbox style="overflow:auto;" flex="1">
<grid>
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row>
<label value="&pilot;:" />
<label id="f_pilot" />
</row>
<row>
<label value="&glider;:" />
<label id="f_glider" />
</row>
<row>
<label value="&gps;:" />
<label id="f_gpsname" />
</row>
<row>
<label value="&filename;:" />
</row>
</rows>
</grid>
<label id="f_fname" />
</vbox>
</tabpanel>
</tabpanels>
</tabbox>
</vbox>
<!-- fire resize event -->
<splitter oncommand="fire_resize_event();"/>
<vbox flex="1">
<radiogroup orient="horizontal"
oncommand="update_maptype()">
<hbox>
<radio label="&map.no;" id="map_nomap" persist="selected" />
<radio label="&map.googlemap;" id="map_googlemap" persist="selected" />
<radio label="GoogleSat" id="map_googlesat" persist="selected" />
<radio label="Google Terrain" id="map_terrain" persist="selected" />
<radio label="Topo XC" id="map_pgweb" persist="selected" />
</hbox>
</radiogroup>
<hbox>
<checkbox id="map_overlay" persist="checked"
label="&map.googlemaplayer;" oncommand="update_maptype()" />
<checkbox id="map_airspace" persist="checked"
label="&map.airspace;" oncommand="update_maptype()" />
<checkbox id="map_optimization" persist="checked"
label="&map.optimization;" oncommand="gmap.set_showopt(elem('map_optimization').checked)" />
<checkbox id="map_weather" persist="checked" style="display:none"
label="Weather" oncommand="if (!elem('map_weather').checked) gmap.set_overlay(null);" />
</hbox>
<grid flex="1">
<columns>
<column flex="1" />
</columns>
<rows>
<row flex="1">
<html:div flex="1" id="gmap" />
</row>
</rows>
</grid>
<html:div id="map-status">
<span>»&map.altitude;</span>
<strong id="prof-alt"> </strong>
<span>»&map.vario;</span>
<strong id="prof-vario"></strong>
<span>»&map.speed;</span>
<strong id="prof-speed"></strong>
<span>»&map.time;</span>
<strong id="prof-time"></strong>
</html:div>
<html:div id="gprofile"/>
</vbox>
</hbox>
</tabpanel>
<tabpanel id="device_panel">
<vbox flex="1">
<hbox flex="0">
<button label="&gps.help;"
oncommand="window.open('chrome://gipsy/content/gps_linux.html')" />
</hbox>
<tree flex="1" hidecolumnpicker="true" id="gps_tree"
editable="true" onclick="gps_tree_clicked(event)"
seltype="single" >
<treecols>
<treecol label="&enabled;" type="checkbox" editable="true"
id="gps_enabled" />
<treecol label="&device;" flex="1" id="gps_dev" />
<treecol label="&gps.type;" flex="0" id="gps_type"/>
<treecol label="&gps.name;" flex="1" id="gps_name" />
<treecol label="&progress;" type="progressmeter" flex="1"
id="gps_progress" />
</treecols>
<treechildren contextmenu="gps_popup" />
</tree>
</vbox>
</tabpanel>
</tabpanels>
</tabbox>
<statusbar id="statusbar">
<statusbarpanel id="synchro_panel" />
</statusbar>
</window>