Melchior changed the dialog options: "use <enabled>false</enabled> flag
for widgets that shouldn't be drawn instead of <hide>true</hide>. This
is consistent with other places in fgfs, like menu entries, hud
elements, subsystem switches, etc."

see
 http://cvs.flightgear.org/viewvc/source/src/GUI/layout.cxx?view=log

However, src/ATCDCL/ATCDialog.cxx uses these options and he missed
changing those...  The attached patch

Changes ATCDialog.cxx to use use <enabled>false</enabled> flag for
widgets that shouldn't be drawn instead of <hide>true</hide>.

Please commit...

Thanks,

Ron
Index: ATCDialog.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/ATCDCL/ATCDialog.cxx,v
retrieving revision 1.3
diff -u -r1.3 ATCDialog.cxx
--- ATCDialog.cxx	31 Jul 2008 12:04:33 -0000	1.3
+++ ATCDialog.cxx	6 Aug 2008 14:45:36 -0000
@@ -239,7 +239,7 @@
 		// add transmission button (modified copy of <button-template>)
 		SGPropertyNode *entry = button_group->getNode("button", n, true);
 		copyProperties(button_group->getNode("button-template", true), entry);
-		entry->removeChildren("hide", false);
+		entry->removeChildren("enabled", true);
 		entry->setStringValue("property", buf);
 		entry->setIntValue("keynum", '1' + n);
 		if (n == 0)
@@ -341,7 +341,7 @@
 		for (int n = 0; uit != uniq.end() && n < 6; ++uit, ++n) { // max 6 buttons
 			SGPropertyNode *entry = button_group->getNode("button", n, true);
 			copyProperties(button_group->getNode("button-template", true), entry);
-			entry->removeChildren("hide", false);
+			entry->removeChildren("enabled", true);
 			entry->setStringValue("legend", uit->first.id.c_str());
 			entry->setStringValue("binding[0]/value", uit->first.id.c_str());
 		}
@@ -349,7 +349,7 @@
 
 	// (un)hide message saying no things in range
 	SGPropertyNode_ptr range_error = getNamedNode(dlg, "no-atc-in-range");
-	range_error->setBoolValue("hide", num_stat);
+	range_error->setBoolValue("enabled", !num_stat);
 
 	_gui->showDialog(dialog_name);
 }
@@ -397,7 +397,7 @@
 			// add frequency line (modified copy of <group-template>)
 			SGPropertyNode *entry = freq_group->getNode("group", n, true);
 			copyProperties(freq_group->getNode("group-template", true), entry);
-			entry->removeChildren("hide", false);
+			entry->removeChildren("enabled", true);
 
 			ostr << itr->type;
 			entry->setStringValue("text[0]/label", ostr.str().c_str());
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to