]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/new_gui.cxx
replace depreciated plib symbols with their new forms
[flightgear.git] / src / GUI / new_gui.cxx
index a93a0ce1e7b2043a528c3a64e9d34a19d17a93d8..f45b17ba761e5c3ec3a2618336ba6b4b26ed119c 100644 (file)
@@ -142,6 +142,16 @@ NewGUI::closeDialog (const string& name)
     return false; // dialog wasn't open...
 }
 
+SGPropertyNode_ptr
+NewGUI::getDialog (const string &name)
+{
+    if(_dialog_props.find(name) != _dialog_props.end())
+        return _dialog_props[name];
+
+    SG_LOG(SG_GENERAL, SG_ALERT, "dialog '" << name << "' missing");
+    return 0;
+}
+
 void
 NewGUI::setActiveDialog (FGDialog * dialog)
 {
@@ -181,6 +191,9 @@ NewGUI::clear ()
     delete _menubar;
     _menubar = 0;
     _dialog_props.clear();
+    _itt_t it;
+    for (it = _colors.begin(); it != _colors.end(); ++it)
+      delete it->second;
     _colors.clear();
 }
 
@@ -265,6 +278,9 @@ NewGUI::readDir (const char * path)
 void
 NewGUI::setStyle (void)
 {
+    _itt_t it;
+    for (it = _colors.begin(); it != _colors.end(); ++it)
+      delete it->second;
     _colors.clear();
 
     // set up the traditional colors as default