Following Andy's and Melchior's comments, here is a shorter patch
with more user-friendly text displayed.

Please apply,
V.
Index: ../data/Nasal/gui.nas
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Nasal/gui.nas,v
retrieving revision 1.10
diff -u -r1.10 gui.nas
--- ../data/Nasal/gui.nas       13 Jul 2005 11:30:32 -0000      1.10
+++ ../data/Nasal/gui.nas       18 Oct 2005 20:02:20 -0000
@@ -132,6 +132,20 @@
     header = dialog[name].addChild("text");
     header.set("label", title);

+    dialog[name].addChild("hrule").set("pref-height", 2);
+
+    if (props.globals.getNode("/yasim") == nil) {
+        msg = dialog[name].addChild("text");
+        msg.set("label", "Not supported for this aircraft");
+        cancel = dialog[name].addChild("button");
+        cancel.set("legend", "Cancel");
+        cancel.prop().getNode("binding[0]/command", 
1).setValue("dialog-close");
+        fgcommand("dialog-new", dialog[name].prop());
+        showDialog(name);
+        return;
+    }
+
+
     contentArea = dialog[name].addChild("group");
     contentArea.set("layout", "hbox");



_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to