]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/dialog.cxx
replace depreciated plib symbols with their new forms
[flightgear.git] / src / GUI / dialog.cxx
index f5c27696ec477095717c3fc7f03a0c9e670b1aa0..f9f324e58b4c1e545bc8d47ff4532470ef52dac1 100644 (file)
 #include "AirportList.hxx"
 #include "layout.hxx"
 
+////////////////////////////////////////////////////////////////////////
+// Implementation of GUIInfo.
+////////////////////////////////////////////////////////////////////////
+
 /**
  * User data for a GUI object.
  */
@@ -24,7 +28,21 @@ struct GUIInfo
     int key;
 };
 
+GUIInfo::GUIInfo (FGDialog * d)
+    : dialog(d),
+      key(-1)
+{
+}
+
+GUIInfo::~GUIInfo ()
+{
+    for (unsigned int i = 0; i < bindings.size(); i++) {
+        delete bindings[i];
+        bindings[i] = 0;
+    }
+}
 
+\f
 /**
  * Key handler.
  */
@@ -63,11 +81,12 @@ puObject *fgPopup::getKeyObject(puObject *object, int key)
 
 puObject *fgPopup::getActiveInputField(puObject *object)
 {
+    puObject *ret;
     if(object->getType() & PUCLASS_GROUP)
         for (puObject *obj = ((puGroup *)object)->getFirstChild();
                 obj; obj = obj->getNextObject())
-            if (getActiveInputField(obj))
-                return obj;
+            if ((ret = getActiveInputField(obj)))
+                return ret;
 
     if (object->getType() & PUCLASS_INPUT && ((puInput *)object)->isAcceptingInput())
         return object;
@@ -285,26 +304,6 @@ copy_from_pui (puObject * object, SGPropertyNode * node)
 }
 
 
-\f
-////////////////////////////////////////////////////////////////////////
-// Implementation of GUIInfo.
-////////////////////////////////////////////////////////////////////////
-
-GUIInfo::GUIInfo (FGDialog * d)
-    : dialog(d),
-      key(-1)
-{
-}
-
-GUIInfo::~GUIInfo ()
-{
-    for (unsigned int i = 0; i < bindings.size(); i++) {
-        delete bindings[i];
-        bindings[i] = 0;
-    }
-}
-
-
 \f
 ////////////////////////////////////////////////////////////////////////
 // Implementation of FGDialog.