Depreciate the old-load/save-dialog code.
This commit is contained in:
parent
e61b42ac68
commit
c24684b0bf
3 changed files with 86 additions and 2 deletions
41
gui/dialogs/load_flight.xml
Normal file
41
gui/dialogs/load_flight.xml
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<PropertyList>
|
||||
<name>load_flight</name>
|
||||
<layout>vbox</layout>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
<text><label>File Name:</label></text>
|
||||
<input>
|
||||
<halign>fill</halign>
|
||||
<stretch>true</stretch>
|
||||
<property>/tmp/flight/file</property>
|
||||
</input>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<empty><stretch>true</stretch></empty>
|
||||
<button>
|
||||
<legend>OK</legend>
|
||||
<equal>true</equal>
|
||||
<binding><command>dialog-apply</command></binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
fgcommand("load", props.globals.getNode("/tmp/flight") );
|
||||
</script>
|
||||
</binding>
|
||||
<binding><command>dialog-close</command></binding>
|
||||
</button>
|
||||
<empty><stretch>true</stretch></empty>
|
||||
<button>
|
||||
<legend>Cancel</legend>
|
||||
<equal>true</equal>
|
||||
<binding><command>dialog-close</command></binding>
|
||||
</button>
|
||||
<empty><stretch>true</stretch></empty>
|
||||
</group>
|
||||
</PropertyList>
|
41
gui/dialogs/save_flight.xml
Normal file
41
gui/dialogs/save_flight.xml
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<PropertyList>
|
||||
<name>save_flight</name>
|
||||
<layout>vbox</layout>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
<text><label>File Name:</label></text>
|
||||
<input>
|
||||
<halign>fill</halign>
|
||||
<stretch>true</stretch>
|
||||
<property>/tmp/flight/file</property>
|
||||
</input>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<empty><stretch>true</stretch></empty>
|
||||
<button>
|
||||
<legend>OK</legend>
|
||||
<equal>true</equal>
|
||||
<binding><command>dialog-apply</command></binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
fgcommand("save", props.globals.getNode("/tmp/flight") );
|
||||
</script>
|
||||
</binding>
|
||||
<binding><command>dialog-close</command></binding>
|
||||
</button>
|
||||
<empty><stretch>true</stretch></empty>
|
||||
<button>
|
||||
<legend>Cancel</legend>
|
||||
<equal>true</equal>
|
||||
<binding><command>dialog-close</command></binding>
|
||||
</button>
|
||||
<empty><stretch>true</stretch></empty>
|
||||
</group>
|
||||
</PropertyList>
|
|
@ -6,14 +6,16 @@
|
|||
<item>
|
||||
<label>Save</label>
|
||||
<binding>
|
||||
<command>old-save-dialog</command>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>save_flight</dialog-name>
|
||||
</binding>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<label>Load</label>
|
||||
<binding>
|
||||
<command>old-load-dialog</command>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>load_flight</dialog-name>
|
||||
</binding>
|
||||
</item>
|
||||
|
||||
|
|
Loading…
Reference in a new issue