libede:FileSystemSearch: migration to FileSystemBox mostly done
[ede] / libede / src / FileSystemBox.ec
index e184693..8557aac 100644 (file)
@@ -582,14 +582,7 @@ private:
             (bits.filesOnly && listing.stats.attribs.isFile))
          {
             FileSystemNode node = MakeFileSystemNode(listing.stats, listing.name, listing.path, bits.previewPictures, displaySystem);
             (bits.filesOnly && listing.stats.attribs.isFile))
          {
             FileSystemNode node = MakeFileSystemNode(listing.stats, listing.name, listing.path, bits.previewPictures, displaySystem);
-            DataRow row = list.AddRow();
-            row.tag = (int)node;
-            row.SetData(nameField, node);
-            if(bits.details)
-            {
-               row.SetData(typeField, node.extension);
-               row.SetData(sizeField, (void *)node.stats.size);
-            }
+            AddNode(node);
          }
       }
       list.Sort(nameField, 1);
          }
       }
       list.Sort(nameField, 1);
@@ -735,6 +728,18 @@ private:
       parent.childrenLoaded = true;
    }
 
       parent.childrenLoaded = true;
    }
 
+   void AddNode(FileSystemNode node)
+   {
+      DataRow row = list.AddRow();
+      row.tag = (int)node;
+      row.SetData(nameField, node);
+      if(bits.details)
+      {
+         row.SetData(typeField, node.extension);
+         row.SetData(sizeField, (void *)node.stats.size);
+      }
+   }
+
    void AddTreeNode(FileSystemNode node, bool loaded, bool addLoader, FileSystemNode addTo)
    {
       DataRow row = (addTo && addTo.row) ? addTo.row.AddRow() : list.AddRow();
    void AddTreeNode(FileSystemNode node, bool loaded, bool addLoader, FileSystemNode addTo)
    {
       DataRow row = (addTo && addTo.row) ? addTo.row.AddRow() : list.AddRow();
@@ -747,6 +752,11 @@ private:
       row.tag = (int)node;
       node.row = row;
       row.SetData(null, node);
       row.tag = (int)node;
       node.row = row;
       row.SetData(null, node);
+      if(bits.details)
+      {
+         row.SetData(typeField, node.extension);
+         row.SetData(sizeField, (void *)node.stats.size);
+      }
 
       node.loaded = loaded;
       if(addLoader)
 
       node.loaded = loaded;
       if(addLoader)
@@ -1871,12 +1881,15 @@ public:
          }
       }
       else
          }
       }
       else
+      {
 /*#ifdef __WIN32__
          strcpy(outputPath, "/");
 #else*/
 /*#ifdef __WIN32__
          strcpy(outputPath, "/");
 #else*/
-         strcpy(outputPath, name);
+         //strcpy(outputPath, name);
+         strcpy(outputPath, path);
+         PathCat(outputPath, name);
 //#endif
 //#endif
-
+      }
    }
 
    bool IsChildOf(FileSystemNode node)
    }
 
    bool IsChildOf(FileSystemNode node)
@@ -2108,7 +2121,8 @@ public:
    }
    return node;
 }*/
    }
    return node;
 }*/
-static FileSystemNode MakeFileSystemNode(const FileStats stats,
+
+FileSystemNode MakeFileSystemNode(const FileStats stats,
       const char * fileName, const char * filePath,
       const bool previewPicture, const DisplaySystem displaySystem)
 {
       const char * fileName, const char * filePath,
       const bool previewPicture, const DisplaySystem displaySystem)
 {