]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/property_list.cxx
Merge branch 'maint2' into next
[flightgear.git] / src / GUI / property_list.cxx
index 759a0786ad81ed819b4bcec7b5f59ed610316533..6a8bbdc47fd43c1157217b07f3b2cce6ed362740 100644 (file)
 #include <simgear/compiler.h>
 
 #include <sstream>
-#include STL_IOMANIP
-#include STL_STRING
-SG_USING_STD(string);
+#include <iomanip>
+#include <iostream>
+#include <string>
+using std::string;
+using std::cout;
+
 typedef string stdString;      // puObject has a "string" member
 
 #include <Main/fg_os.hxx>      // fgGetKeyModifiers()
@@ -143,7 +146,7 @@ static void sanitize(stdString& s)
 
 
 PropertyList::PropertyList(int minx, int miny, int maxx, int maxy, SGPropertyNode *start) :
-    puList(minx, miny, maxx, maxy, short(0), 20),
+    puaList(minx, miny, maxx, maxy, short(0), 20),
     GUI_ID(FGCLASS_PROPERTYLIST),
     _curr(start),
     _return(0),
@@ -191,7 +194,7 @@ void PropertyList::handle_select(puObject *list_box)
         const char *src = prop_list->_entries[selected];
 
         if (prop_list->_dot_files && (selected < 2)) {
-            if (!strcmp(src, ".")) {
+            if (src[0] == '.' && (src[1] == '\0' || src[1] == ' ')) {
                 if (mod_ctrl)
                     prop_list->toggleVerbosity();
                 else if (mod_shift)
@@ -257,8 +260,8 @@ void PropertyList::update(bool restore_pos)
         _num_entries += 2;    // for . and ..
         _entries = new char*[_num_entries + 1];
 
-        _entries[0] = new char[2];
-        strcpy(_entries[0], ".");
+        _entries[0] = new char[16];
+        strcpy(_entries[0], _verbose ? ".     [verbose]" : ".");
 
         _entries[1] = new char[3];
         strcpy(_entries[1], "..");