From 75b83402372840599a1708c7c570796b205defec Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Sun, 27 Jun 2010 23:24:19 +0100 Subject: [PATCH] Revert "Dialog for MP display options" This reverts commit 994b6559a7202b0b45faabe681919470e59da62b. --- gui/dialogs/mp-display.xml | 250 ------------------------------------- 1 file changed, 250 deletions(-) delete mode 100644 gui/dialogs/mp-display.xml diff --git a/gui/dialogs/mp-display.xml b/gui/dialogs/mp-display.xml deleted file mode 100644 index 903b36772..000000000 --- a/gui/dialogs/mp-display.xml +++ /dev/null @@ -1,250 +0,0 @@ - - - - - mp-display - false - vbox - - - - var dlg_root = cmdarg(); - - var update = func() { - print("Updating"); - #fgcommand("dialog-update", dlg_root); - fgcommand("dialog-new", dlg_root); - #fgcommand("dialog-show", dlg_root); - } - - var findElementByName = func(rootN, name) { - foreach( var child; rootN.getChildren() ) { - var n = child.getNode( "name" ); - if( n != nil and n.getValue() == name ) - return child; - var f = findElementByName(child,name); - if( f != nil ) return f; - } - return nil; - }; - - var resetDialog = func(root) { - - print("resetDialog called " ~ root.getPath()); - - var classes = props.globals.getNode("/sim/multiplay/display").getChildren("usage-class"); - var combo = findElementByName( root, "usage-class-selection" ); - forindex (var i; classes) { - combo.getChild("value", i, 1).setValue(classes[i].getNode("name").getValue()); - } - - var display = findElementByName( root, "usage-class-display" ); - forindex (var i; classes) { - - # We don't allow users to display the "Ignore" class. - if (classes[i].getNode("name").getValue() != "Ignore") { - var check = display.getChild("checkbox", i, 1); - check.getNode("row", 1).setValue(i + 1); - check.getNode("col", 1).setValue(1); - check.getNode("property", 1).setValue(classes[i].getNode("visible").getPath()); - #check.getNode("value", 1).setValue(classes[i]. - #check.getNode("live", 1).setValue(1); - - var text = display.getChild("text", i, 1); - text.getNode("row", 1).setValue(i + 1); - text.getNode("col", 1).setValue(2); - text.getNode("halign", 1).setValue("left"); - text.getNode("label", 1).setValue(classes[i].getNode("name").getValue()); - } - } - } - - resetDialog(dlg_root); - - - - - hbox - - - - - - - hbox - - - - - hbox - left - - - - - - usage-class-selection - fill - true - sim/multiplay/usage-class - - dialog-apply - usage-class-selection - - - nasal - - - - - - - hbox - - - - - hbox - left - - - - - - - table - center - usage-class-display - top - - - - hbox - left - - - - - - add - true - fill - true - 20 - /sim/multiplay/new-usage-class - - - - - - - hbox - left - - errormsg - - - - - hbox - - - - - - - - - - - -