CVS: data/gui/dialogs route-manager.xml, 1.16, 1.17

James Turner <[email protected]> Mon, 26 Apr 2010 10:24:37 -0500
Newsgroups gmane.games.flightgear.cvc
Message-ID <[email protected]>
Update of /var/cvs/FlightGear-0.9/data/gui/dialogs
In directory baron.flightgear.org:/tmp/cvs-serv23593

Modified Files:
	route-manager.xml 
Log Message:
Fix tabs in route-manager, and remove the 'x' button in favour of live input widgets.


Index: route-manager.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/gui/dialogs/route-manager.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- route-manager.xml	13 Apr 2010 07:58:16 -0000	1.16
+++ route-manager.xml	26 Apr 2010 15:22:26 -0000	1.17
@@ -12,437 +12,442 @@
 -->
 
 <PropertyList>
-	<name>route-manager</name>
-	<layout>vbox</layout>
-	<resizable>true</resizable>
-
-	<nasal>
-		<open>
-			var ft = getprop("/sim/startup/units") == "feet";
-			var dlg = props.globals.getNode("/sim/gui/dialogs/route-manager", 1);
-			var selection = dlg.getNode("selection", 1);
-			var input = dlg.getNode("input", 1);    
-			var routem = props.globals.getNode("/autopilot/route-manager", 1);
-
-			selection.setIntValue(-1);
-			input.setValue("");
-
-			var list = cmdarg().getNode("list");
-			var cmd = routem.getNode("input", 1);
-			var route = routem.getNode("route", 1);
-			
-			var sel_index = func {
-				return int(selection.getValue());
-			}
-
-			var clear = func {
-				cmd.setValue("@clear");
-			}
-
-			var insert = func {
-			    var insertIndex = sel_index();
-			    if (insertIndex >= 0) {
-			        # when selection index is valid, insert *after* the waypoint
-			        insertIndex = insertIndex + 1;
-			    }
-			    
-				cmd.setValue("@insert" ~ insertIndex ~ ":" ~ input.getValue());
-				input.setValue("");
-				
-				if (insertIndex >= 0) {
-				    selection.setValue(insertIndex);
-				    gui.dialog_update("route-manager");
-				}
-			}
-
-			var remove = func {
-				cmd.setValue("@delete" ~ sel_index());
-			}
-			
-			var auto_route = func {
-			    cmd.setValue();
-			}
+    <name>route-manager</name>
+    <layout>vbox</layout>
+    <resizable>true</resizable>
+
+    <nasal>
+        <open>
+            var ft = getprop("/sim/startup/units") == "feet";
+            var dlg = props.globals.getNode("/sim/gui/dialogs/route-manager", 1);
+            var selection = dlg.getNode("selection", 1);
+            var input = dlg.getNode("input", 1);    
+            var routem = props.globals.getNode("/autopilot/route-manager", 1);
+
+            selection.setIntValue(-1);
+            input.setValue("");
+
+            var list = cmdarg().getNode("list");
+            var cmd = routem.getNode("input", 1);
+            var route = routem.getNode("route", 1);
+            
+            var sel_index = func {
+                return int(selection.getValue());
+            }
+
+            var clear = func {
+                cmd.setValue("@clear");
+            }
+
+            var insert = func {
+                var insertIndex = sel_index();
+                if (insertIndex >= 0) {
+                    # when selection index is valid, insert *after* the waypoint
+                    insertIndex = insertIndex + 1;
+                }
+                
+                cmd.setValue("@insert" ~ insertIndex ~ ":" ~ input.getValue());
+                input.setValue("");
+                
+                if (insertIndex >= 0) {
+                    selection.setValue(insertIndex);
+                    gui.dialog_update("route-manager");
+                }
+            }
+
+            var remove = func {
+                cmd.setValue("@delete" ~ sel_index());
+            }
+            
+            var auto_route = func {
+                cmd.setValue();
+            }
             
             var jump_to = func {
                 cmd.setValue("@jump" ~ sel_index());
-			}
-			
-			var load_route = func(path) {
-				routem.getNode("file-path", 1).setValue(path.getValue());
-				cmd.setValue("@load");
-				gui.dialog_update("route-manager");
-			}
+            }
+            
+            var load_route = func(path) {
+                routem.getNode("file-path", 1).setValue(path.getValue());
+                cmd.setValue("@load");
+                gui.dialog_update("route-manager");
+            }
 
             var save_route = func(path) {
-				routem.getNode("file-path", 1).setValue(path.getValue());
-				cmd.setValue("@save");
-				gui.dialog_update("route-manager");
-			}
-			
-			var file_selector = gui.FileSelector.new(load_route, "Load flight-plan", "Load");
-			var save_selector = gui.FileSelector.new(save_route, "Save flight-plan", "Save");
-
-			var activate_fp = func {
-				cmd.setValue("@activate");
-			}
-			
-			var departureRunways = dlg.getNode("departure-runways", 1);
-			var destRunways = dlg.getNode("destination-runways", 1);
-
-			var updateRunways = func {
-				gui.dialog_apply("route-manager", "departure-airport");
-				gui.dialog_apply("route-manager", "destination-airport");
-				
-				var depIcao = routem.getNode("departure").getNode("airport").getValue();
-				departureRunways.removeChildren("value");
-				
-				var apt = airportinfo(depIcao);
-				if (apt != nil) {
-					var i=0;
-					foreach (var rwy; keys(apt.runways)) {
-						departureRunways.getNode("value[" ~ i ~ "]", 1).setValue(rwy);
-						i += 1;
-					}
-				}
-				
-				var destIcao = routem.getNode("destination").getNode("airport").getValue();
-				destRunways.removeChildren("value");
-				
-				var apt = airportinfo(destIcao);
-				if (apt != nil) {
-					var i=0;
-					foreach (var rwy; keys(apt.runways)) {
-						destRunways.getNode("value[" ~ i ~ "]", 1).setValue(rwy);
-						i += 1;
-					}
-				}
-				
-				
-				gui.dialog_update("route-manager");
-			}
-		</open>
-
-		<close>
-			file_selector.del();
-			save_selector.del();
-		</close>
-	</nasal>
-
-	<group>
-		<layout>hbox</layout>
-		<empty><stretch>1</stretch></empty>
-
-		<text>
-			<label>Route Manager</label>
-		</text>
-
-		<empty><stretch>1</stretch></empty>
-
-		<button>
-			<pref-width>16</pref-width>
-			<pref-height>16</pref-height>
-			<legend></legend>
-			<default>1</default>
-			<keynum>27</keynum>
-			<border>2</border>
-
-			<binding>
-				<command>dialog-close</command>
-			</binding>
-		</button>
-	</group>
-	<hrule/>
-	<!-- departure / arrival airport information -->
-	
-	<group>
-		<layout>hbox</layout>
-		<text>
-			<label>Departure:</label>
-			<pref-width>80</pref-width>
-		</text>
-		<input>
-			<name>departure-airport</name>
-			<pref-width>60</pref-width>
-			<property>/autopilot/route-manager/departure/airport</property>
-		</input>
-		
-		<text>
-			<format>%s</format>
-			<property>/autopilot/route-manager/departure/name</property>
-			<live>true</live>
-				<stretch>true</stretch>
-			<halign>fill</halign>
-		</text>
-		
-		<button>
-			<legend>X</legend>
-			<binding>
-			<command>nasal</command>
-			<script>
-				updateRunways();
-			</script>
-			</binding>
-		</button>
-		
-		<text>
-			<label>Rwy:</label>
-		</text>
-		<combo>
-			<name>departure-runway</name>
-			<pref-width>60</pref-width>
-			<property>/autopilot/route-manager/departure/runway</property>
-		   	<editable>false</editable>
-		   	<properties>/sim/gui/dialogs/route-manager/departure-runways</properties>
-		</combo>
-	</group>
-	
-	<group>
-		<layout>hbox</layout>
-		<text>
-			<label>Arrival:</label>
-			<pref-width>80</pref-width>
-		</text>
-		<input>
-			<name>destination-airport</name>
-			<pref-width>60</pref-width>
-			<property>/autopilot/route-manager/destination/airport</property>
-		</input>
-		<text>
-			<stretch>true</stretch>
-			<format>%s</format>
-			<property>/autopilot/route-manager/destination/name</property>
-			<live>true</live>
-			<halign>fill</halign>
-		</text>
-		
-		<text>
-			<label>Rwy:</label>
-		</text>
-		<combo>
-			<name>destination-runway</name>
-			<pref-width>60</pref-width>
-			<property>/autopilot/route-manager/destination/runway</property>
-		   	<editable>false</editable>
-		   	<properties>/sim/gui/dialogs/route-manager/destination-runways</properties>
-		</combo>
-	</group>
-	<!--
-	<group>
-		<layout>hbox</layout>
-		<text>
-			<label>Alternate:</label>
-			<pref-width>80</pref-width>
-		</text>
-		<input>
-			<name>alt-airport</name>
-			<halign>fill</halign>
-			<stretch>true</stretch>
-			<pref-width>150</pref-width>
-			<property>/autopilot/route-manager/alternate/airport</property>
-		</input>
-		
-	</group>
-	-->
-	<group>
-		<layout>hbox</layout>
-		<text>
-			<label>Cruise Speed (kts):</label>
-			<pref-width>80</pref-width>
-		</text>
-		<input>
-			<name>cruise-speed</name>
-			<live>true</live>
-			<halign>fill</halign>
-			<stretch>true</stretch>
-			<pref-width>150</pref-width>
-			<property>/autopilot/route-manager/cruise/speed-kts</property>
-		</input>
-		
-		<text>
-			<label>Cruise Altitude (ft/FL):</label>
-			<pref-width>80</pref-width>
-		</text>
-		<input>
-			<name>cruise-alt</name>
-			<live>true</live>
-			<halign>fill</halign>
-			<stretch>true</stretch>
-			<pref-width>150</pref-width>
-			<property>/autopilot/route-manager/cruise/altitude-ft</property>
-		</input>
-	</group>
-	
-	<hrule/>
-
-	<group>
-		<layout>hbox</layout>
-		<default-padding>2</default-padding>
-
-		<text>
-			<label>MMMMMMMMMMMMMMMM</label>
-			<format>Target: %s</format>
-			<property>/autopilot/route-manager/wp[0]/id</property>
-			<live>true</live>
-		</text>
-
-		<text>
-			<label>MMMMMMMMM</label>
-			<format>Dist: %.2f nm</format>
-			<property>/autopilot/route-manager/wp[0]/dist</property>
-			<live>true</live>
-		</text>
-
-		<text>
-			<label>MMMMMMMMM</label>
-			<format>ETA: %s</format>
-			<property>/autopilot/route-manager/wp[0]/eta</property>
-			<live>true</live>
-		</text>
-	</group>
-
-	<waypointlist>
-		<name>list</name>
-		<halign>fill</halign>
-		<valign>fill</valign>
-		<stretch>true</stretch>
-		<pref-height>150</pref-height>
-		<property>/sim/gui/dialogs/route-manager/selection</property>
-		<binding>
-			<command>dialog-apply</command>
-			<object-name>list</object-name>
-		</binding>
-	</waypointlist>
-
-	<group>
-		<layout>hbox</layout>
-		<default-padding>4</default-padding>
-
-		<text>
-			<label>Waypoint:</label>
-			<pref-width>60</pref-width>
-		</text>
-
-		<input>
-			<name>input</name>
-			<halign>fill</halign>
-			<stretch>true</stretch>
-			<pref-width>220</pref-width>
-			<property>/sim/gui/dialogs/route-manager/input</property>
-		</input>
-
-		<button>
-			<legend>Add</legend>
-			<default>true</default>
-			<pref-width>70</pref-width>
-			<binding>
-				<command>dialog-apply</command>
-			</binding>
-			<binding>
-				<command>nasal</command>
-				<script>insert()</script>
-			</binding>
-			<binding>
-				<command>dialog-update</command>
-			</binding>
-		</button>
-	</group>
-
-	<text>
-		<padding>1</padding>
-		<label>Format: (airport|fix|nav|lon,lat)[@alt] -- e.g. "KSFO@900"</label>
-		<color>
-			<red>0.5</red>
-			<green>0.5</green>
-			<blue>0.5</blue>
-		</color>
-	</text>
-
-	<group>
-		<layout>hbox</layout>
-		<halign>fill</halign>
-		<default-padding>6</default-padding>
-
-		<button>
-			<legend>Clear List</legend>
-			<equal>true</equal>
-			<binding>
-				<command>nasal</command>
-				<script>clear()</script>
-			</binding>
-		</button>
-
-		<button>
-			<legend>Remove</legend>
-			<enable>
+                routem.getNode("file-path", 1).setValue(path.getValue());
+                cmd.setValue("@save");
+                gui.dialog_update("route-manager");
+            }
+            
+            var file_selector = gui.FileSelector.new(load_route, "Load flight-plan", "Load");
+            var save_selector = gui.FileSelector.new(save_route, "Save flight-plan", "Save");
+
+            var activate_fp = func {
+                cmd.setValue("@activate");
+            }
+            
+            var departureRunways = dlg.getNode("departure-runways", 1);
+            var destRunways = dlg.getNode("destination-runways", 1);
+
+            var updateRunways = func {         
+                var depIcao = routem.getNode("departure").getNode("airport").getValue();
+                departureRunways.removeChildren("value");
+                
+                var apt = airportinfo(depIcao);
+                if (apt != nil) {
+                    var i=0;
+                    foreach (var rwy; keys(apt.runways)) {
+                        departureRunways.getNode("value[" ~ i ~ "]", 1).setValue(rwy);
+                        i += 1;
+                    }
+                }
+                
+                var destIcao = routem.getNode("destination").getNode("airport").getValue();
+                destRunways.removeChildren("value");
+                
+                var apt = airportinfo(destIcao);
+                if (apt != nil) {
+                    var i=0;
+                    foreach (var rwy; keys(apt.runways)) {
+                        destRunways.getNode("value[" ~ i ~ "]", 1).setValue(rwy);
+                        i += 1;
+                    }
+                }
+                
+                gui.dialog_update("route-manager");
+            }
+        </open>
+
+        <close>
+            file_selector.del();
+            save_selector.del();
+        </close>
+    </nasal>
+
+    <group>
+        <layout>hbox</layout>
+        <empty><stretch>1</stretch></empty>
+
+        <text>
+            <label>Route Manager</label>
+        </text>
+
+        <empty><stretch>1</stretch></empty>
+
+        <button>
+            <pref-width>16</pref-width>
+            <pref-height>16</pref-height>
+            <legend></legend>
+            <default>1</default>
+            <keynum>27</keynum>
+            <border>2</border>
+
+            <binding>
+                <command>dialog-close</command>
+            </binding>
+        </button>
+    </group>
+    <hrule/>
+    <!-- departure / arrival airport information -->
+    
+    <group>
+        <layout>hbox</layout>
+        <text>
+            <label>Departure:</label>
+            <pref-width>80</pref-width>
+        </text>
+        <input>
+            <name>departure-airport</name>
+            <pref-width>60</pref-width>
+            <property>/autopilot/route-manager/departure/airport</property>
+            <live>true</live>
+            <binding>
+                <command>dialog-apply</command>
+                <object-name>departure-airport</object-name>
+            </binding>
+            
+            <binding>
+                <command>nasal</command>
+                <script>updateRunways();</script>
+            </binding>
+        </input>
+        
+        <text>
+            <format>%s</format>
+            <property>/autopilot/route-manager/departure/name</property>
+            <live>true</live>
+            <stretch>true</stretch>
+            <halign>fill</halign>
+        </text>
+                
+        <text>
+            <label>Rwy:</label>
+        </text>
+        <combo>
+            <name>departure-runway</name>
+            <pref-width>60</pref-width>
+            <property>/autopilot/route-manager/departure/runway</property>
+            <editable>false</editable>
+            <properties>/sim/gui/dialogs/route-manager/departure-runways</properties>
+        </combo>
+    </group>
+    
+    <group>
+        <layout>hbox</layout>
+        <text>
+            <label>Arrival:</label>
+            <pref-width>80</pref-width>
+        </text>
+        <input>
+            <name>destination-airport</name>
+            <pref-width>60</pref-width>
+            <property>/autopilot/route-manager/destination/airport</property>
+            <live>true</live>
+            <binding>
+                <command>dialog-apply</command>
+                <object-name>destination-airport</object-name>
+            </binding>
+            <binding>
+                <command>nasal</command>
+                <script>updateRunways();</script>
+            </binding>
+        </input>
+        <text>
+            <stretch>true</stretch>
+            <format>%s</format>
+            <property>/autopilot/route-manager/destination/name</property>
+            <live>true</live>
+            <halign>fill</halign>
+        </text>
+        
+        <text>
+            <label>Rwy:</label>
+        </text>
+        <combo>
+            <name>destination-runway</name>
+            <pref-width>60</pref-width>
+            <property>/autopilot/route-manager/destination/runway</property>
+            <editable>false</editable>
+            <properties>/sim/gui/dialogs/route-manager/destination-runways</properties>
+        </combo>
+    </group>
+    <!--
+    <group>
+        <layout>hbox</layout>
+        <text>
+            <label>Alternate:</label>
+            <pref-width>80</pref-width>
+        </text>
+        <input>
+            <name>alt-airport</name>
+            <halign>fill</halign>
+            <stretch>true</stretch>
+            <pref-width>150</pref-width>
+            <property>/autopilot/route-manager/alternate/airport</property>
+        </input>
+        
+    </group>
+    -->
+    <group>
+        <layout>hbox</layout>
+        <text>
+            <label>Cruise Speed (kts):</label>
+            <pref-width>80</pref-width>
+        </text>
+        <input>
+            <name>cruise-speed</name>
+            <live>true</live>
+            <halign>fill</halign>
+            <stretch>true</stretch>
+            <pref-width>150</pref-width>
+            <property>/autopilot/route-manager/cruise/speed-kts</property>
+        </input>
+        
+        <text>
+            <label>Cruise Altitude (ft/FL):</label>
+            <pref-width>80</pref-width>
+        </text>
+        <input>
+            <name>cruise-alt</name>
+            <live>true</live>
+            <halign>fill</halign>
+            <stretch>true</stretch>
+            <pref-width>150</pref-width>
+            <property>/autopilot/route-manager/cruise/altitude-ft</property>
+        </input>
+    </group>
+    
+    <hrule/>
+
+    <group>
+        <layout>hbox</layout>
+        <default-padding>2</default-padding>
+
+        <text>
+            <label>MMMMMMMMMMMMMMMM</label>
+            <format>Target: %s</format>
+            <property>/autopilot/route-manager/wp[0]/id</property>
+            <live>true</live>
+        </text>
+
+        <text>
+            <label>MMMMMMMMM</label>
+            <format>Dist: %.2f nm</format>
+            <property>/autopilot/route-manager/wp[0]/dist</property>
+            <live>true</live>
+        </text>
+
+        <text>
+            <label>MMMMMMMMM</label>
+            <format>ETA: %s</format>
+            <property>/autopilot/route-manager/wp[0]/eta</property>
+            <live>true</live>
+        </text>
+    </group>
+
+    <waypointlist>
+        <name>list</name>
+        <halign>fill</halign>
+        <valign>fill</valign>
+        <stretch>true</stretch>
+        <pref-height>150</pref-height>
+        <property>/sim/gui/dialogs/route-manager/selection</property>
+        <binding>
+            <command>dialog-apply</command>
+            <object-name>list</object-name>
+        </binding>
+    </waypointlist>
+
+    <group>
+        <layout>hbox</layout>
+        <default-padding>4</default-padding>
+
+        <text>
+            <label>Waypoint:</label>
+            <pref-width>60</pref-width>
+        </text>
+
+        <input>
+            <name>input</name>
+            <halign>fill</halign>
+            <stretch>true</stretch>
+            <pref-width>220</pref-width>
+            <property>/sim/gui/dialogs/route-manager/input</property>
+        </input>
+
+        <button>
+            <legend>Add</legend>
+            <default>true</default>
+            <pref-width>70</pref-width>
+            <binding>
+                <command>dialog-apply</command>
+            </binding>
+            <binding>
+                <command>nasal</command>
+                <script>insert()</script>
+            </binding>
+            <binding>
+                <command>dialog-update</command>
+            </binding>
+        </button>
+    </group>
+
+    <text>
+        <padding>1</padding>
+        <label>Format: (airport|fix|nav|lon,lat)[@alt] -- e.g. "KSFO@900"</label>
+        <color>
+            <red>0.5</red>
+            <green>0.5</green>
+            <blue>0.5</blue>
+        </color>
+    </text>
+
+    <group>
+        <layout>hbox</layout>
+        <halign>fill</halign>
+        <default-padding>6</default-padding>
+
+        <button>
+            <legend>Clear List</legend>
+            <equal>true</equal>
+            <binding>
+                <command>nasal</command>
+                <script>clear()</script>
+            </binding>
+        </button>
+
+        <button>
+            <legend>Remove</legend>
+            <enable>
                 <greater-than>
-				<property>/sim/gui/dialogs/route-manager/selection</property>
-				<value>-1</value>
-				</greater-than>
-			</enable>
-			<binding>
-				<command>nasal</command>
-				<script>remove()</script>
-			</binding>
-		</button>
+                <property>/sim/gui/dialogs/route-manager/selection</property>
+                <value>-1</value>
+                </greater-than>
+            </enable>
+            <binding>
+                <command>nasal</command>
+                <script>remove()</script>
+            </binding>
+        </button>
 <!--
         <button>
-			<legend>Auto-route</legend>
-			<equal>true</equal>
-			<binding>
-				<command>nasal</command>
-				<script>auto_route()</script>
-			</binding>
-		</button>
+            <legend>Auto-route</legend>
+            <equal>true</equal>
+            <binding>
+                <command>nasal</command>
+                <script>auto_route()</script>
+            </binding>
+        </button>
 -->
         <button>
-			<legend>Jump To</legend>
-			<enable>
+            <legend>Jump To</legend>
+            <enable>
                 <greater-than>
-				<property>/sim/gui/dialogs/route-manager/selection</property>
-				<value>-1</value>
-				</greater-than>
-			</enable>
-			<binding>
-				<command>nasal</command>
-				<script>jump_to()</script>
-			</binding>
-		</button>
-
-		<button>
-			<legend>Activate</legend>
-			<equal>true</equal>
-			<enable>
-			    <not><property>/autopilot/route-manager/active</property></not>
-			</enable>
-			<binding>
-				<command>dialog-apply</command>
-			</binding>
-			<binding>
-				<command>nasal</command>
-				<script>activate_fp()</script>
-			</binding>
-		</button>
-		
-		<empty><stretch>true</stretch></empty>
-
-		<button>
-			<legend>Load...</legend>
-			<equal>true</equal>
-			<enable>
-			<not><property>/autopilot/route-manager/active</property></not>
-			</enable>
-			<binding>
-				<command>nasal</command>
-				<script>file_selector.open()</script>
-			</binding>
-		</button>
-		<button>
-			<legend>Save...</legend>
-			<equal>true</equal>
-			<binding>
-				<command>nasal</command>
-				<script>save_selector.open();</script>
-			</binding>
-		</button>
-	</group>
+                <property>/sim/gui/dialogs/route-manager/selection</property>
+                <value>-1</value>
+                </greater-than>
+            </enable>
+            <binding>
+                <command>nasal</command>
+                <script>jump_to()</script>
+            </binding>
+        </button>
+
+        <button>
+            <legend>Activate</legend>
+            <equal>true</equal>
+            <enable>
+                <not><property>/autopilot/route-manager/active</property></not>
+            </enable>
+            <binding>
+                <command>dialog-apply</command>
+            </binding>
+            <binding>
+                <command>nasal</command>
+                <script>activate_fp()</script>
+            </binding>
+        </button>
+        
+        <empty><stretch>true</stretch></empty>
+
+        <button>
+            <legend>Load...</legend>
+            <equal>true</equal>
+            <enable>
+            <not><property>/autopilot/route-manager/active</property></not>
+            </enable>
+            <binding>
+                <command>nasal</command>
+                <script>file_selector.open()</script>
+            </binding>
+        </button>
+        <button>
+            <legend>Save...</legend>
+            <equal>true</equal>
+            <binding>
+                <command>nasal</command>
+                <script>save_selector.open();</script>
+            </binding>
+        </button>
+    </group>
 </PropertyList>


------------------------------------------------------------------------------