From 785c0a6a78bec0eb310b9df46d5fae398aa66ead Mon Sep 17 00:00:00 2001 From: Rejean Loyer Date: Wed, 14 Sep 2011 18:53:17 -0400 Subject: [PATCH 1/1] Revert "Fixes to run the new Explorer on Windows" This reverts commit c3c07aa52ae2c7d74ac9ffcbff9060dfae6404aa. --- libede/src/FileSystemBox.ec | 18 +++++++++--------- newexplorer/src/Explorer.ec | 2 -- newexplorer/src/ExplorerWindow.ec | 5 ----- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/libede/src/FileSystemBox.ec b/libede/src/FileSystemBox.ec index 9527e28..61f5df9 100644 --- a/libede/src/FileSystemBox.ec +++ b/libede/src/FileSystemBox.ec @@ -425,7 +425,7 @@ static FileSystemNode MakeFileSystemNode(const FileStats stats, FileSystemNode node { stats = stats }; - //if(stats.attribs.isFile) // -- should work now + //if(stats.attribs.isFile) // TODO fix this in ecere if(stats.attribs.isDirectory) { extension[0] = '\0'; @@ -861,7 +861,7 @@ private: { if((!bits.foldersOnly && !bits.filesOnly) || (bits.foldersOnly && listing.stats.attribs.isDirectory) || - (bits.filesOnly && listing.stats.attribs.isFile)) + (bits.filesOnly && !listing.stats.attribs.isDirectory/*listing.stats.attribs.isFile*/)) // TOCHECK: isFile broken? { FileSystemNode node = MakeFileSystemNode(listing.stats, listing.name, listing.path, bits.previewPictures, displaySystem); DataRow row = list.AddRow(); @@ -896,14 +896,14 @@ private: root = MakeFileSystemNode(FileStats { attribs = FileExists(path)}, path, path, bits.previewPictures, displaySystem); #ifdef __WIN32__ //root.name = rootName; - AddTreeNode(root, true, false, null);//, list); + AddTreeNode(root, true, false, null, list); #else //root.name = "/"; #endif AddTreeNode(root, false, true, null); // How can this make sense for linux? - /*#ifdef __WIN32__ + #ifdef __WIN32__ while(listing.Find()) { int len = strlen(listing.name); @@ -937,7 +937,7 @@ private: node.row.collapsed = true; Sort(nameField, 1); SelectRow(root.row); - #endif*/ + #endif LoadTreeNode(root); list.Sort(nameField, 1); } @@ -951,13 +951,13 @@ private: { FileListing listing { path, extensions = extensions }; if(node.children.count == 1) - DeleteNode(node.children.first); + DeleteNode(node.children.first); while(listing.Find()) { - if(!listing.stats.attribs.isRemovable && ((!bits.foldersOnly && !bits.filesOnly) || + if((!bits.foldersOnly && !bits.filesOnly) || (bits.foldersOnly && listing.stats.attribs.isDirectory) || - (bits.filesOnly && listing.stats.attribs.isFile))) + (bits.filesOnly && !listing.stats.attribs.isDirectory/*listing.stats.attribs.isFile*/)) // TOCHECK: isFile broken? { FileSystemNode child = MakeFileSystemNode(listing.stats, listing.name, listing.path, bits.previewPictures, displaySystem); AddTreeNode(child, true, false, node); @@ -998,7 +998,7 @@ private: { if((!bits.foldersOnly && !bits.filesOnly) || (bits.foldersOnly && listing.stats.attribs.isDirectory) || - (bits.filesOnly && listing.stats.attribs.isFile)) + (bits.filesOnly && !listing.stats.attribs.isDirectory/*listing.stats.attribs.isFile*/)) // TOCHECK: isFile broken? { FileSystemNode child = MakeFileSystemNode(listing.stats, listing.name, listing.path, bits.previewPictures, displaySystem); AddTreeNode(child, true, false, parent); diff --git a/newexplorer/src/Explorer.ec b/newexplorer/src/Explorer.ec index 455ef9d..cb9fa3d 100644 --- a/newexplorer/src/Explorer.ec +++ b/newexplorer/src/Explorer.ec @@ -9,9 +9,7 @@ class Explorer : GuiApplication QuickPathTool goPath { }; QuickPathTool searchPath { }; char * findWhat = null; - SetLoggingMode(debug, null); - if(argc > 1) { if(!strcmpi(argv[1], "go") && argc > 2) diff --git a/newexplorer/src/ExplorerWindow.ec b/newexplorer/src/ExplorerWindow.ec index 98b1971..a1b1aa6 100644 --- a/newexplorer/src/ExplorerWindow.ec +++ b/newexplorer/src/ExplorerWindow.ec @@ -98,11 +98,6 @@ class ExplorerWindow : Window char * path = view.path; char * newPath = new char[strlen(path)]; StripLastDirectory(path, newPath); - if(!newPath[0]) - { - newPath[0] = '/'; - newPath[1] = 0; - } view.path = newPath; delete newPath; break; -- 1.8.3.1