code dump. unfortunate lack of commits. rick click menu on files/folders. comparative...
authorRejean Loyer <rejean.loyer@gmail.com>
Tue, 26 Feb 2013 00:30:12 +0000 (19:30 -0500)
committerRejean Loyer <rejean.loyer@gmail.com>
Tue, 26 Feb 2013 00:30:12 +0000 (19:30 -0500)
225 files changed:
explorer/explorer.epj
explorer/res/explorerIcon.png [new file with mode: 0644]
explorer/src/Explorer.ec
explorer/src/ExplorerWindow.ec
explorer/tests/t1FileSystemCache.ec [new file with mode: 0644]
libede/EDE.epj
libede/res/actions/address-book-new.png [new file with mode: 0644]
libede/res/actions/appointment-new.png [new file with mode: 0644]
libede/res/actions/bookmark-new.png [new file with mode: 0644]
libede/res/actions/contact-new.png [new file with mode: 0644]
libede/res/actions/document-new.png [new file with mode: 0644]
libede/res/actions/document-open.png [new file with mode: 0644]
libede/res/actions/document-print-preview.png [new file with mode: 0644]
libede/res/actions/document-print.png [new file with mode: 0644]
libede/res/actions/document-properties.png [new file with mode: 0644]
libede/res/actions/document-save-as.png [new file with mode: 0644]
libede/res/actions/document-save.png [new file with mode: 0644]
libede/res/actions/edit-clear.png [new file with mode: 0644]
libede/res/actions/edit-copy.png [new file with mode: 0644]
libede/res/actions/edit-cut.png [new file with mode: 0644]
libede/res/actions/edit-delete.png [new file with mode: 0644]
libede/res/actions/edit-find-replace.png [new file with mode: 0644]
libede/res/actions/edit-find.png [new file with mode: 0644]
libede/res/actions/edit-paste.png [new file with mode: 0644]
libede/res/actions/edit-redo.png [new file with mode: 0644]
libede/res/actions/edit-select-all.png [new file with mode: 0644]
libede/res/actions/edit-undo.png [new file with mode: 0644]
libede/res/actions/folder-new.png [new file with mode: 0644]
libede/res/actions/format-indent-less.png [new file with mode: 0644]
libede/res/actions/format-indent-more.png [new file with mode: 0644]
libede/res/actions/format-justify-center.png [new file with mode: 0644]
libede/res/actions/format-justify-fill.png [new file with mode: 0644]
libede/res/actions/format-justify-left.png [new file with mode: 0644]
libede/res/actions/format-justify-right.png [new file with mode: 0644]
libede/res/actions/format-text-bold.png [new file with mode: 0644]
libede/res/actions/format-text-italic.png [new file with mode: 0644]
libede/res/actions/format-text-strikethrough.png [new file with mode: 0644]
libede/res/actions/format-text-underline.png [new file with mode: 0644]
libede/res/actions/go-bottom.png [new file with mode: 0644]
libede/res/actions/go-down.png [new file with mode: 0644]
libede/res/actions/go-first.png [new file with mode: 0644]
libede/res/actions/go-home.png [new file with mode: 0644]
libede/res/actions/go-jump.png [new file with mode: 0644]
libede/res/actions/go-last.png [new file with mode: 0644]
libede/res/actions/go-next.png [new file with mode: 0644]
libede/res/actions/go-previous.png [new file with mode: 0644]
libede/res/actions/go-top.png [new file with mode: 0644]
libede/res/actions/go-up.png [new file with mode: 0644]
libede/res/actions/list-add.png [new file with mode: 0644]
libede/res/actions/list-remove.png [new file with mode: 0644]
libede/res/actions/mail-forward.png [new file with mode: 0644]
libede/res/actions/mail-mark-junk.png [new file with mode: 0644]
libede/res/actions/mail-mark-not-junk.png [new file with mode: 0644]
libede/res/actions/mail-message-new.png [new file with mode: 0644]
libede/res/actions/mail-reply-all.png [new file with mode: 0644]
libede/res/actions/mail-reply-sender.png [new file with mode: 0644]
libede/res/actions/mail-send-receive.png [new file with mode: 0644]
libede/res/actions/media-eject.png [new file with mode: 0644]
libede/res/actions/media-playback-pause.png [new file with mode: 0644]
libede/res/actions/media-playback-start.png [new file with mode: 0644]
libede/res/actions/media-playback-stop.png [new file with mode: 0644]
libede/res/actions/media-record.png [new file with mode: 0644]
libede/res/actions/media-seek-backward.png [new file with mode: 0644]
libede/res/actions/media-seek-forward.png [new file with mode: 0644]
libede/res/actions/media-skip-backward.png [new file with mode: 0644]
libede/res/actions/media-skip-forward.png [new file with mode: 0644]
libede/res/actions/process-stop.png [new file with mode: 0644]
libede/res/actions/system-lock-screen.png [new file with mode: 0644]
libede/res/actions/system-log-out.png [new file with mode: 0644]
libede/res/actions/system-search.png [new file with mode: 0644]
libede/res/actions/system-shutdown.png [new file with mode: 0644]
libede/res/actions/tab-new.png [new file with mode: 0644]
libede/res/actions/view-fullscreen.png [new file with mode: 0644]
libede/res/actions/view-refresh.png [new file with mode: 0644]
libede/res/actions/window-new.png [new file with mode: 0644]
libede/res/apps/accessories-calculator.png [new file with mode: 0644]
libede/res/apps/accessories-character-map.png [new file with mode: 0644]
libede/res/apps/accessories-text-editor.png [new file with mode: 0644]
libede/res/apps/help-browser.png [new file with mode: 0644]
libede/res/apps/internet-group-chat.png [new file with mode: 0644]
libede/res/apps/internet-mail.png [new file with mode: 0644]
libede/res/apps/internet-news-reader.png [new file with mode: 0644]
libede/res/apps/internet-web-browser.png [new file with mode: 0644]
libede/res/apps/office-calendar.png [new file with mode: 0644]
libede/res/apps/preferences-desktop-accessibility.png [new file with mode: 0644]
libede/res/apps/preferences-desktop-assistive-technology.png [new file with mode: 0644]
libede/res/apps/preferences-desktop-font.png [new file with mode: 0644]
libede/res/apps/preferences-desktop-keyboard-shortcuts.png [new file with mode: 0644]
libede/res/apps/preferences-desktop-locale.png [new file with mode: 0644]
libede/res/apps/preferences-desktop-multimedia.png [new file with mode: 0644]
libede/res/apps/preferences-desktop-remote-desktop.png [new file with mode: 0644]
libede/res/apps/preferences-desktop-screensaver.png [new file with mode: 0644]
libede/res/apps/preferences-desktop-theme.png [new file with mode: 0644]
libede/res/apps/preferences-desktop-wallpaper.png [new file with mode: 0644]
libede/res/apps/preferences-system-network-proxy.png [new file with mode: 0644]
libede/res/apps/preferences-system-session.png [new file with mode: 0644]
libede/res/apps/preferences-system-windows.png [new file with mode: 0644]
libede/res/apps/system-file-manager.png [new file with mode: 0644]
libede/res/apps/system-installer.png [new file with mode: 0644]
libede/res/apps/system-software-update.png [new file with mode: 0644]
libede/res/apps/system-users.png [new file with mode: 0644]
libede/res/apps/utilities-system-monitor.png [new file with mode: 0644]
libede/res/apps/utilities-terminal.png [new file with mode: 0644]
libede/res/categories/applications-accessories.png [new file with mode: 0644]
libede/res/categories/applications-development.png [new file with mode: 0644]
libede/res/categories/applications-games.png [new file with mode: 0644]
libede/res/categories/applications-graphics.png [new file with mode: 0644]
libede/res/categories/applications-internet.png [new file with mode: 0644]
libede/res/categories/applications-multimedia.png [new file with mode: 0644]
libede/res/categories/applications-office.png [new file with mode: 0644]
libede/res/categories/applications-other.png [new file with mode: 0644]
libede/res/categories/applications-system.png [new file with mode: 0644]
libede/res/categories/preferences-desktop-peripherals.png [new file with mode: 0644]
libede/res/categories/preferences-desktop.png [new file with mode: 0644]
libede/res/categories/preferences-system.png [new file with mode: 0644]
libede/res/devices/audio-card.png [new file with mode: 0644]
libede/res/devices/audio-input-microphone.png [new file with mode: 0644]
libede/res/devices/battery.png [new file with mode: 0644]
libede/res/devices/camera-photo.png [new file with mode: 0644]
libede/res/devices/camera-video.png [new file with mode: 0644]
libede/res/devices/computer.png [new file with mode: 0644]
libede/res/devices/drive-harddisk.png [new file with mode: 0644]
libede/res/devices/drive-optical.png [new file with mode: 0644]
libede/res/devices/drive-removable-media.png [new file with mode: 0644]
libede/res/devices/input-gaming.png [new file with mode: 0644]
libede/res/devices/input-keyboard.png [new file with mode: 0644]
libede/res/devices/input-mouse.png [new file with mode: 0644]
libede/res/devices/media-flash.png [new file with mode: 0644]
libede/res/devices/media-floppy.png [new file with mode: 0644]
libede/res/devices/media-optical.png [new file with mode: 0644]
libede/res/devices/multimedia-player.png [new file with mode: 0644]
libede/res/devices/network-wired.png [new file with mode: 0644]
libede/res/devices/network-wireless.png [new file with mode: 0644]
libede/res/devices/printer.png [new file with mode: 0644]
libede/res/devices/video-display.png [new file with mode: 0644]
libede/res/emblem-not.png [new file with mode: 0644]
libede/res/emblems/emblem-favorite.png [new file with mode: 0644]
libede/res/emblems/emblem-important.png [new file with mode: 0644]
libede/res/emblems/emblem-photos.png [new file with mode: 0644]
libede/res/emblems/emblem-readonly.png [new file with mode: 0644]
libede/res/emblems/emblem-symbolic-link.png [new file with mode: 0644]
libede/res/emblems/emblem-system.png [new file with mode: 0644]
libede/res/emblems/emblem-unreadable.png [new file with mode: 0644]
libede/res/emotes/face-angel.png [new file with mode: 0644]
libede/res/emotes/face-crying.png [new file with mode: 0644]
libede/res/emotes/face-devilish.png [new file with mode: 0644]
libede/res/emotes/face-glasses.png [new file with mode: 0644]
libede/res/emotes/face-grin.png [new file with mode: 0644]
libede/res/emotes/face-kiss.png [new file with mode: 0644]
libede/res/emotes/face-monkey.png [new file with mode: 0644]
libede/res/emotes/face-plain.png [new file with mode: 0644]
libede/res/emotes/face-sad.png [new file with mode: 0644]
libede/res/emotes/face-smile-big.png [new file with mode: 0644]
libede/res/emotes/face-smile.png [new file with mode: 0644]
libede/res/emotes/face-surprise.png [new file with mode: 0644]
libede/res/emotes/face-wink.png [new file with mode: 0644]
libede/res/mimetypes/application-certificate.png [new file with mode: 0644]
libede/res/mimetypes/application-x-executable.png [new file with mode: 0644]
libede/res/mimetypes/audio-x-generic.png [new file with mode: 0644]
libede/res/mimetypes/font-x-generic.png [new file with mode: 0644]
libede/res/mimetypes/image-x-generic.png [new file with mode: 0644]
libede/res/mimetypes/package-x-generic.png [new file with mode: 0644]
libede/res/mimetypes/text-html.png [new file with mode: 0644]
libede/res/mimetypes/text-x-generic-template.png [new file with mode: 0644]
libede/res/mimetypes/text-x-generic.png [new file with mode: 0644]
libede/res/mimetypes/text-x-script.png [new file with mode: 0644]
libede/res/mimetypes/video-x-generic.png [new file with mode: 0644]
libede/res/mimetypes/x-office-address-book.png [new file with mode: 0644]
libede/res/mimetypes/x-office-calendar.png [new file with mode: 0644]
libede/res/mimetypes/x-office-document-template.png [new file with mode: 0644]
libede/res/mimetypes/x-office-document.png [new file with mode: 0644]
libede/res/mimetypes/x-office-drawing-template.png [new file with mode: 0644]
libede/res/mimetypes/x-office-drawing.png [new file with mode: 0644]
libede/res/mimetypes/x-office-presentation-template.png [new file with mode: 0644]
libede/res/mimetypes/x-office-presentation.png [new file with mode: 0644]
libede/res/mimetypes/x-office-spreadsheet-template.png [new file with mode: 0644]
libede/res/mimetypes/x-office-spreadsheet.png [new file with mode: 0644]
libede/res/places/folder-remote.png [new file with mode: 0644]
libede/res/places/folder-saved-search.png [new file with mode: 0644]
libede/res/places/folder.png [new file with mode: 0644]
libede/res/places/network-server.png [new file with mode: 0644]
libede/res/places/network-workgroup.png [new file with mode: 0644]
libede/res/places/start-here.png [new file with mode: 0644]
libede/res/places/user-desktop.png [new file with mode: 0644]
libede/res/places/user-home.png [new file with mode: 0644]
libede/res/places/user-trash.png [new file with mode: 0644]
libede/res/status/audio-volume-high.png [new file with mode: 0644]
libede/res/status/audio-volume-low.png [new file with mode: 0644]
libede/res/status/audio-volume-medium.png [new file with mode: 0644]
libede/res/status/audio-volume-muted.png [new file with mode: 0644]
libede/res/status/battery-caution.png [new file with mode: 0644]
libede/res/status/dialog-error.png [new file with mode: 0644]
libede/res/status/dialog-information.png [new file with mode: 0644]
libede/res/status/dialog-warning.png [new file with mode: 0644]
libede/res/status/folder-drag-accept.png [new file with mode: 0644]
libede/res/status/folder-open.png [new file with mode: 0644]
libede/res/status/folder-visiting.png [new file with mode: 0644]
libede/res/status/image-loading.png [new file with mode: 0644]
libede/res/status/image-missing.png [new file with mode: 0644]
libede/res/status/mail-attachment.png [new file with mode: 0644]
libede/res/status/network-error.png [new file with mode: 0644]
libede/res/status/network-idle.png [new file with mode: 0644]
libede/res/status/network-offline.png [new file with mode: 0644]
libede/res/status/network-receive.png [new file with mode: 0644]
libede/res/status/network-transmit-receive.png [new file with mode: 0644]
libede/res/status/network-transmit.png [new file with mode: 0644]
libede/res/status/network-wireless-encrypted.png [new file with mode: 0644]
libede/res/status/printer-error.png [new file with mode: 0644]
libede/res/status/software-update-available.png [new file with mode: 0644]
libede/res/status/software-update-urgent.png [new file with mode: 0644]
libede/res/status/user-trash-full.png [new file with mode: 0644]
libede/res/status/weather-clear-night.png [new file with mode: 0644]
libede/res/status/weather-clear.png [new file with mode: 0644]
libede/res/status/weather-few-clouds-night.png [new file with mode: 0644]
libede/res/status/weather-few-clouds.png [new file with mode: 0644]
libede/res/status/weather-overcast.png [new file with mode: 0644]
libede/res/status/weather-severe-alert.png [new file with mode: 0644]
libede/res/status/weather-showers-scattered.png [new file with mode: 0644]
libede/res/status/weather-showers.png [new file with mode: 0644]
libede/res/status/weather-snow.png [new file with mode: 0644]
libede/res/status/weather-storm.png [new file with mode: 0644]
libede/src/FileSystemBox.ec
libede/src/FileSystemCache.ec [new file with mode: 0644]
libede/src/FileSystemIterator.ec [new file with mode: 0644]
libede/src/FileSystemSearch.ec

index eb35059..804866e 100644 (file)
             "MemoryGuard" : true,
             "Console" : true
          }
             "MemoryGuard" : true,
             "Console" : true
          }
+      },
+      {
+         "Name" : "Test",
+         "Options" : {
+            "Debug" : true,
+            "MemoryGuard" : true,
+            "Console" : true
+         }
       }
    ],
    "Files" : [
       {
          "Folder" : "extern",
          "Files" : [
       }
    ],
    "Files" : [
       {
          "Folder" : "extern",
          "Files" : [
-            "/sdk/extras/gui/controls/SelectorBar.ec",
-            "/sdk/extras/gui/controls/ToolBar.ec",
-            "/sdk/extras/gui/IconBag.ec"
+            {
+               "FileName" : "../../../sdk/extras/gui/controls/ToolBar.ec",
+               "Options" : {
+                  "ExcludeFromBuild" : true
+               }
+            },
+            "../../../sdk/extras/gui/controls/SearchBox.ec"
+         ],
+         "Configurations" : [
+            {
+               "Name" : "Test",
+               "Options" : {
+                  "ExcludeFromBuild" : true
+               }
+            }
          ]
       },
       {
          ]
       },
       {
          "Files" : [
             "Explorer.ec",
             "ExplorerWindow.ec"
          "Files" : [
             "Explorer.ec",
             "ExplorerWindow.ec"
+         ],
+         "Configurations" : [
+            {
+               "Name" : "Test",
+               "Options" : {
+                  "ExcludeFromBuild" : true
+               }
+            }
          ]
          ]
+      },
+      {
+         "Folder" : "tests",
+         "Files" : [
+            {
+               "FileName" : "t1FileSystemCache.ec",
+               "Configurations" : [
+                  {
+                     "Name" : "Test",
+                     "Options" : {
+                        "ExcludeFromBuild" : false
+                     }
+                  }
+               ]
+            }
+         ],
+         "Options" : {
+            "ExcludeFromBuild" : true
+         }
+      },
+      {
+         "Folder" : "tools",
+         "Files" : [
+
+         ],
+         "Options" : {
+            "ExcludeFromBuild" : true
+         }
       }
    ],
    "ResourcesPath" : "res",
       }
    ],
    "ResourcesPath" : "res",
       "view-icons.png",
       "view-list.png",
       "view-showcase-left.png",
       "view-icons.png",
       "view-list.png",
       "view-showcase-left.png",
-      "view-showcase-right.png"
+      "view-showcase-right.png",
+      "explorerIcon.png"
    ]
    ]
-}
\ No newline at end of file
+}
diff --git a/explorer/res/explorerIcon.png b/explorer/res/explorerIcon.png
new file mode 100644 (file)
index 0000000..472484f
Binary files /dev/null and b/explorer/res/explorerIcon.png differ
index 8bfeaa8..134b675 100644 (file)
@@ -14,22 +14,36 @@ import "ExplorerWindow"
 #endif
 */
 
 #endif
 */
 
+DummyFileSystemCacheWindow dw;// { size = { 200, 200 } };
+
+
 class Explorer : GuiApplication
 {
    //skin = "Acovel";
 
    bool Init()
    {
 class Explorer : GuiApplication
 {
    //skin = "Acovel";
 
    bool Init()
    {
-      QuickPathTool goPath { };
+      int c, argc = this.argc;
+      int openArgsStartAt = 0;
       QuickPathTool searchPath { };
       char * findWhat = null;
       QuickPathTool searchPath { };
       char * findWhat = null;
+      Array<String> comparedPaths = null;
 
       SetLoggingMode(debug, null);
 
 
       SetLoggingMode(debug, null);
 
+      for(c = 1; c < argc; c++)
+      {
+         if(!strcmp(argv[c], "#"))
+         {
+            argc = c;
+            break;
+         }
+      }
+
       if(argc > 1)
       {
          if(!strcmpi(argv[1], "go") && argc > 2)
       if(argc > 1)
       {
          if(!strcmpi(argv[1], "go") && argc > 2)
-            goPath = argv[2];
+            openArgsStartAt = 2;
          else if(!strcmpi(argv[1], "find") && argc > 2)
          {
             char * unquoted;
          else if(!strcmpi(argv[1], "find") && argc > 2)
          {
             char * unquoted;
@@ -50,20 +64,49 @@ class Explorer : GuiApplication
          } 
          else if(!strcmpi(argv[1], "search") && argc > 2)
             searchPath = argv[2];
          } 
          else if(!strcmpi(argv[1], "search") && argc > 2)
             searchPath = argv[2];
+         else if(!strcmpi(argv[1], "compare") && argc > 2)
+         {
+            QuickPathTool goPath { };
+            comparedPaths = { };
+            if(argc == 3)
+            {
+               goPath = ""; // current dir
+               comparedPaths.Add(goPath);
+            }
+            for(c = 2; c < argc; c++)
+            {
+               char * s;
+               goPath = argv[c];
+               s = goPath;
+               if(s)
+                  comparedPaths.Add(CopyString(s));
+            }
+            if(comparedPaths.count < 2)
+               PrintLn("compare requires at least 2 existing directories to work.");
+         }
          else if(!strcmpi(argv[1], "image") && argc > 2)
             ;
          else if(!strcmpi(argv[1], "slides") && argc > 2)
             ;
          else
          else if(!strcmpi(argv[1], "image") && argc > 2)
             ;
          else if(!strcmpi(argv[1], "slides") && argc > 2)
             ;
          else
-            goPath = argv[1];
+            openArgsStartAt = 1;
       }
       else
       }
       else
-         goPath = "";
-      if(goPath)
+         openArgsStartAt = -1;
+
+      if(openArgsStartAt)
       {
       {
-         ExplorerWindow explorerWnd { };
-         explorerWnd.Create();
-         explorerWnd.GoTo(goPath, false, false);
+         QuickPathTool goPath { };
+         for(c = openArgsStartAt; c < argc; c++)
+         {
+            goPath = openArgsStartAt == -1 ? "" : argv[c];
+            if(goPath)
+            {
+               ExplorerWindow explorerWnd { };
+               explorerWnd.Create();
+               explorerWnd.location = goPath;//explorerWnd.GoTo(goPath, false, false);
+            }
+         }
       }
       else if(searchPath)
       {
       }
       else if(searchPath)
       {
@@ -71,6 +114,15 @@ class Explorer : GuiApplication
          explorerWnd.Create();
          //explorerWnd.SearchLocation(searchPath);
       }
          explorerWnd.Create();
          //explorerWnd.SearchLocation(searchPath);
       }
+      else if(comparedPaths && comparedPaths.count > 1)
+      {
+         // compare /s1/library/dummies /s1/library/movies /s1/oldlib/movies "/home/redj/.gvfs/d02-2tb on kimji/library/movies"
+         ExplorerWindow explorerWnd { };
+         explorerWnd.Create();
+         explorerWnd.view.columnsCompareStyle = true;
+         explorerWnd.comparedLocations = comparedPaths;
+         // delete comparedPaths;
+      }
       return true;
    }
 }
       return true;
    }
 }
@@ -115,7 +167,7 @@ struct QuickPathTool
             delete original;
          }
       }
             delete original;
          }
       }
-      get { return path[0] ? path : null; }
+      get { return path[0] ? (char*)path : null; }
    }
    property bool { get { return path[0] != '\0'; } }
 };
    }
    property bool { get { return path[0] != '\0'; } }
 };
index 54a6a6a..f1c0a2d 100644 (file)
@@ -1,6 +1,7 @@
 import "Explorer"
 import "Explorer"
-import "IconBag"
-import "ToolBar"
+//import "IconBag"
+//import "ToolBar"
+import "SearchBox"
 
 #ifdef _DEBUG
    define title = "Ecere Explorer (Debug)";
 
 #ifdef _DEBUG
    define title = "Ecere Explorer (Debug)";
@@ -16,11 +17,13 @@ define selectionText = Color { 20, 30, 40 };
 define toolBarBackgroundColor = backgroundColor;//white; //Color { 240, 240, 250 };
 define toolBarForegroundColor = foregroundColor;//white; //Color { 240, 240, 250 };
 */
 define toolBarBackgroundColor = backgroundColor;//white; //Color { 240, 240, 250 };
 define toolBarForegroundColor = foregroundColor;//white; //Color { 240, 240, 250 };
 */
-define backgroundColor = beige;//white; //Color { 128, 145, 175 }; //200, 224, 224 }; //lightGray;
-define foregroundColor = black;
-define selectionColor = app.currentSkin.selectionColor;
-define selectionText = app.currentSkin.selectionText;
-define toolBarBackgroundColor = backgroundColor;//white; //Color { 240, 240, 250 };
+define backgroundColor = Color { 155, 170, 160 };
+//define backgroundColor = Color { 250, 250, 255 };
+//define backgroundColor = beige;//white; //Color { 128, 145, 175 }; //200, 224, 224 }; //lightGray;
+define foregroundColor = Color { 45, 45, 45 };//black;
+define selectionColor = Color { 80, 140, 110 };//app.currentSkin.selectionColor;
+define selectionText = black;//app.currentSkin.selectionText;
+define toolBarBackgroundColor = Color { 170, 187, 176 }; //backgroundColor;//white; //Color { 240, 240, 250 };
 define toolBarForegroundColor = foregroundColor;//white; //Color { 240, 240, 250 };
 
 enum ExplorerToolId
 define toolBarForegroundColor = foregroundColor;//white; //Color { 240, 240, 250 };
 
 enum ExplorerToolId
@@ -48,6 +51,85 @@ enum ExplorerToolId
    hasHeader
 };
 
    hasHeader
 };
 
+enum Icon
+{
+   missing,
+   newWindow, goBack, goForward, goUp, goHome, newFile, newFolder,
+   browse,
+   panelTree, panelSearch,
+   addressBar,
+   refresh,
+   viewList, viewDetails, viewIcons, viewCards, viewShowcase, viewTree, viewCustom,
+   previewPictures,
+   searchInFileName, inFileNameMatchCase, inFileNameMatchWord,
+   searchInFileContent, inFileContentMatchCase, inFileContentMatchWord,
+   searchInSubDirs, searchStart, searchStop,
+   hasHeader
+};
+static char * iconNames[Icon::enumSize] =
+{
+   "<:ecere>emblems/unreadable.png",         /* missing */
+
+   "<:ecere>actions/windowNew.png",          /* newWindow */
+   "<:ecere>actions/goPrevious.png",         /* goBack */
+   "<:ecere>actions/goNext.png",             /* goForward */
+   "<:ecere>actions/goUp.png",               /* goUp */
+   "<:ecere>actions/goHome.png",             /* goHome */
+   "<:ecere>mimeTypes/file.png",             /* newFile */
+   "<:ecere>actions/folderNew.png",          /* newFolder */
+
+   ":browse.png",                            /* browse */
+
+   ":panel-tree.png",                        /* panelTree */
+   "<:ecere>actions/editFind.png",           /* panelSearch */
+
+   "",                                       /* addressBar */
+
+   "<:ecere>actions/viewRefresh.png",        /* refresh */
+
+   ":view-list.png",                         /* viewList */
+   ":view-details.png",                      /* viewDetails */
+   ":view-icons.png",                        /* viewIcons */
+   ":view-cards.png",                        /* viewCards */
+   ":view-showcase-right.png",               /* viewShowcase */
+   ":panel-tree.png",                        /* viewTree */
+   ":view-custom.png",                       /* viewCustom */
+
+   "<:ecere>mimeTypes/image.png",            /* previewPictures */
+
+   "",                                       /* searchInFileName */
+   "<:ecere>emblems/unreadable.png",         /* inFileNameMatchCase */
+   "<:ecere>emblems/unreadable.png",         /* inFileNameMatchWord */
+   "",                                       /* searchInFileContent */
+   "<:ecere>emblems/unreadable.png",         /* inFileContentMatchCase */
+   "<:ecere>emblems/unreadable.png",         /* inFileContentMatchWord */
+   ":browse.png",                            /* searchInSubDirs */
+   "<:ecere>actions/editFind.png",           /* searchStart */
+   "<:ecere>emblems/unreadable.png",         /* searchStop */
+   "<:ecere>emblems/unreadable.png"          /* hasHeader */
+};
+
+class IconToolButton : ToolButton
+{
+   //inactive = true;
+   //bitmapAlignment = left;
+
+   property Icon icon
+   {
+      set
+      {
+         bitmap = BitmapResource { fileName = iconNames[value], alphaBlend = true };
+         //id = value;
+      }
+   }
+}
+
+class ToggleIconToolButton : IconToolButton
+{
+   toggle = true;
+}
+
+
 class ExplorerWindow : Window
 {
    text = title;
 class ExplorerWindow : Window
 {
    text = title;
@@ -62,6 +144,7 @@ class ExplorerWindow : Window
    minClientSize = { 600, 300 };
    nativeDecorations = true;
    tabCycle = true;
    minClientSize = { 600, 300 };
    nativeDecorations = true;
    tabCycle = true;
+   icon = { ":explorerIcon.png" };
 
    /*
    bool userMode;
 
    /*
    bool userMode;
@@ -82,17 +165,20 @@ class ExplorerWindow : Window
    
    Menu fileMenu { menu, "File", f };
    Menu windowMenu { menu, "Window", w };
    
    Menu fileMenu { menu, "File", f };
    Menu windowMenu { menu, "Window", w };
-      MenuItem itemNewWindow
-      {
-         windowMenu, "New Window", n;
-         
-         bool NotifySelect(MenuItem selection, Modifiers mods)
-         {
-            ExplorerWindow { }.Create();
-            return true;
-         }
-      };
+      MenuItem itemNewWindow { windowMenu, "New Window", n, NotifySelect = NewWindow_NotifySelect };
 
 
+   bool NewWindow_NotifySelect(MenuItem selection, Modifiers mods)
+   {
+      //ExplorerWindow { }.Create();
+      ExplorerWindow w { };//.Create();
+      w.location = location;
+      w.view.autoLoad = true;
+      w.Create();
+      w.Activate(); // tocheck: not working?
+      return true;
+   }
+
+#if 0
    IconBag<ExplorerToolId> iconBag
    {
       //window = guiApp.desktop;
    IconBag<ExplorerToolId> iconBag
    {
       //window = guiApp.desktop;
@@ -100,47 +186,9 @@ class ExplorerWindow : Window
       alphaBlend = true;
       iconNames =
       [
       alphaBlend = true;
       iconNames =
       [
-         "<:ecere>emblems/unreadable.png",         /* none */
-
-         "<:ecere>actions/windowNew.png",          /* newWindow */
-         "<:ecere>actions/goPrevious.png",         /* goBack */
-         "<:ecere>actions/goNext.png",             /* goForward */
-         "<:ecere>actions/goUp.png",               /* goUp */
-         "<:ecere>actions/goHome.png",             /* goHome */
-         "<:ecere>mimeTypes/file.png",             /* newFile */
-         "<:ecere>actions/folderNew.png",          /* newFolder */
-
-         ":browse.png",                            /* browse */
-
-         ":panel-tree.png",                        /* panelTree */
-         "<:ecere>actions/editFind.png",           /* panelSearch */
-
-         "",                                       /* addressBar */
-
-         "<:ecere>actions/viewRefresh.png",        /* refresh */
-
-         ":view-list.png",                         /* viewList */
-         ":view-details.png",                      /* viewDetails */
-         ":view-icons.png",                        /* viewIcons */
-         ":view-cards.png",                        /* viewCards */
-         ":view-showcase-right.png",               /* viewShowcase */
-         ":panel-tree.png",                        /* viewTree */
-         ":view-custom.png",                       /* viewCustom */
-         
-         "<:ecere>mimeTypes/image.png",            /* previewPictures */
-
-         "",                                       /* searchInFileName */
-         "<:ecere>emblems/unreadable.png",         /* inFileNameMatchCase */
-         "<:ecere>emblems/unreadable.png",         /* inFileNameMatchWord */
-         "",                                       /* searchInFileContent */
-         "<:ecere>emblems/unreadable.png",         /* inFileContentMatchCase */
-         "<:ecere>emblems/unreadable.png",         /* inFileContentMatchWord */
-         ":browse.png",                            /* searchInSubDirs */
-         "<:ecere>actions/editFind.png",           /* searchStart */
-         "<:ecere>emblems/unreadable.png",         /* searchStop */
-         "<:ecere>emblems/unreadable.png"          /* hasHeader */
       ];
    };
       ];
    };
+#endif
 
    Stacker stack
    {
 
    Stacker stack
    {
@@ -151,6 +199,9 @@ class ExplorerWindow : Window
       opacity = 0.0f;
       tabCycle = true;
 
       opacity = 0.0f;
       tabCycle = true;
 
+      flipper = panels;
+      flipSpring = true;
+
       anchor = { left = 0, top = 0, right = 0, bottom = 0 };
       //moveable = false;
    };
       anchor = { left = 0, top = 0, right = 0, bottom = 0 };
       //moveable = false;
    };
@@ -164,28 +215,37 @@ class ExplorerWindow : Window
       background = toolBarBackgroundColor;
       tabCycle = true;
 
       background = toolBarBackgroundColor;
       tabCycle = true;
 
-      iconBag = iconBag;
+      //iconBag = iconBag;
+      inactive = false;
+
+      flipper = addressBar;
+      flipSpring = true;
 
 
-      void NotifyToolClick(ToolButton button)
+#if 0
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
       {
       {
+         bool noViewActivation = false;
          ExplorerToolId id = (ExplorerToolId)button.id;
          switch(id)
          {
             case none:
                break;
             case newWindow:
          ExplorerToolId id = (ExplorerToolId)button.id;
          switch(id)
          {
             case none:
                break;
             case newWindow:
-               ExplorerWindow { }.Create();
+            {
+               noViewActivation = true;
+               NewWindow_NotifySelect(null, 0);
                break;
                break;
+            }
             case goBack:
             case goForward:
                historyIndex += id == goBack ? -1 : 1;
             case goBack:
             case goForward:
                historyIndex += id == goBack ? -1 : 1;
-               GoToHistoryIndex(false, false, false);
+               GoToHistoryIndex(/*false, false, */false);
                break;
             case goHome:
             {
                char * home = getenv("HOME");
                if(home && home[0] && FileExists(home).isDirectory)
                break;
             case goHome:
             {
                char * home = getenv("HOME");
                if(home && home[0] && FileExists(home).isDirectory)
-                  GoTo(home, false, false);
+                  location = home;//GoTo(home, false, false);
                break;
             }
             case goUp:
                break;
             }
             case goUp:
@@ -198,17 +258,15 @@ class ExplorerWindow : Window
                   newPath[0] = '/';
                   newPath[1] = 0;
                }
                   newPath[0] = '/';
                   newPath[1] = 0;
                }
-               GoTo(newPath, false, false);
+               location = newPath;//GoTo(newPath, false, false);
                delete newPath;
                break;
             }
             case newFile:
                delete newPath;
                break;
             }
             case newFile:
-               if(CreateNewFileDialog { master = this, parent = parent, currentDirectory = view.path }.Modal() == ok )
-                  Refresh();
+               NewFile(view, null, 0);
                break;
             case newFolder:
                break;
             case newFolder:
-               if(CreateDirectoryDialog { master = this, parent = parent, currentDirectory = view.path }.Modal() == ok )
-                  Refresh();
+               NewFolder(view, null, 0);
                break;
             case panelTree:
                SearchStop();
                break;
             case panelTree:
                SearchStop();
@@ -219,7 +277,7 @@ class ExplorerWindow : Window
                {
                   split.rightPane = view;
                   view.anchor = { top = 0, bottom = 0, right = 0 };
                {
                   split.rightPane = view;
                   view.anchor = { top = 0, bottom = 0, right = 0 };
-                  GoTo(addressBar.path, false, false);
+                  location = addressBar.path;//GoTo(addressBar.path, false, false);
                   ReadyTree();
                }
                else
                   ReadyTree();
                }
                else
@@ -228,7 +286,6 @@ class ExplorerWindow : Window
                   view.anchor = { left = 2, top = 0, bottom = 0, right = 0 };
                }
                //search.visible = !button.checked;
                   view.anchor = { left = 2, top = 0, bottom = 0, right = 0 };
                }
                //search.visible = !button.checked;
-               panels.size = { panels.size.w, panels.size.h }; // TOFIX : another Stacker fix needed
                break;
             case panelSearch:
                ToggleSearchMode(button.checked);
                break;
             case panelSearch:
                ToggleSearchMode(button.checked);
@@ -250,9 +307,8 @@ class ExplorerWindow : Window
                   //split.rightPane = null;
                   //view.anchor = { left = 2, top = 0, bottom = 0, right = 0 };
 
                   //split.rightPane = null;
                   //view.anchor = { left = 2, top = 0, bottom = 0, right = 0 };
 
-                  GoTo(addressBar.path, false, false);
+                  location = addressBar.path;//GoTo(addressBar.path, false, false);
                }
                }
-               //panels.size = { panels.size.w, panels.size.h }; // TOFIX : another Stacker fix needed
                break;
             case refresh:
                Refresh();
                break;
             case refresh:
                Refresh();
@@ -290,29 +346,65 @@ class ExplorerWindow : Window
                view.hasHeader ^= true;
                break;
          }
                view.hasHeader ^= true;
                break;
          }
-         view.Activate();
+         if(!noViewActivation)
+            view.Activate();
+         return true;
       }
       }
+#endif
    };
 
    Window { toolBar, size = { w = 8 }, inactive = true };
    };
 
    Window { toolBar, size = { w = 8 }, inactive = true };
-   ToolButton goBack { toolBar, this, id = ExplorerToolId::goBack, hotKey = { left, alt = true }, disabled = true };
+   IconToolButton goBack { toolBar, this, icon = goBack, hotKey = { left, alt = true }, toolTip = "Back", disabled = true;
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         historyIndex += -1;
+         GoToHistoryIndex(/*false, false, */false);
+         view.Activate();
+         return true;
+      }
+   };
    Window { toolBar, size = { w = 2 }, inactive = true };
    Window { toolBar, size = { w = 2 }, inactive = true };
-   ToolButton goForward { toolBar, this, id = ExplorerToolId::goForward, hotKey = { right, alt = true }, disabled = true };
+   IconToolButton goForward { toolBar, this, icon = goForward, hotKey = { right, alt = true }, toolTip = "Forward", disabled = true;
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         historyIndex += 1;
+         GoToHistoryIndex(/*false, false, */false);
+         view.Activate();
+         return true;
+      }
+   };
    Window { toolBar, size = { w = 2 }, inactive = true };
    Window { toolBar, size = { w = 2 }, inactive = true };
-   ToolButton refresh { toolBar, this, id = ExplorerToolId::refresh, hotKey = { r, ctrl = true } };
+   IconToolButton refresh { toolBar, this, icon = refresh, hotKey = { r, ctrl = true }, toolTip = "Refresh";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         Refresh();
+         view.Activate();
+         return true;
+      }
+   };
    Window { toolBar, size = { w = 2 }, inactive = true };
    Window { toolBar, size = { w = 2 }, inactive = true };
-   ToolButton goHome { toolBar, this, id = ExplorerToolId::goHome, hotKey = { h, ctrl = true } };
+   IconToolButton goHome { toolBar, this, icon = goHome, hotKey = { h, ctrl = true }, toolTip = "Go Home";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         char * home = getenv("HOME");
+         if(home && home[0] && FileExists(home).isDirectory)
+            location = home;//GoTo(home, false, false);
+         view.Activate();
+         return true;
+      }
+   };
    Window { toolBar, size = { w = 8 }, inactive = true };
    PathBox addressBar
    {
       toolBar, this;
    Window { toolBar, size = { w = 8 }, inactive = true };
    PathBox addressBar
    {
       toolBar, this;
-      size = { 300, 22 }, id = ExplorerToolId::addressBar;
+      size = { 300, 22 };//, icon = addressBar;
       typeExpected = directory;
       borderStyle = deep;
       background = toolBarBackgroundColor;
       foreground = toolBarForegroundColor;
       selectionColor = selectionColor;
       selectionText = selectionText;
       typeExpected = directory;
       borderStyle = deep;
       background = toolBarBackgroundColor;
       foreground = toolBarForegroundColor;
       selectionColor = selectionColor;
       selectionText = selectionText;
+      toolTip = "Location";
 
       bool OnKeyDown(Key key, unichar ch)
       {
 
       bool OnKeyDown(Key key, unichar ch)
       {
@@ -326,47 +418,185 @@ class ExplorerWindow : Window
 
       bool NotifyModified(PathBox pathBox)
       {
 
       bool NotifyModified(PathBox pathBox)
       {
-         GoTo(pathBox.path, false, false);
+         location = pathBox.path;//GoTo(pathBox.path, false, false);
          return true;
       }
    };
          return true;
       }
    };
-   FlipStacker { toolBar, spring = previous };
+   //FlipStacker { toolBar, spring = previous };
    Window { toolBar, size = { w = 8 }, inactive = true };
    Window { toolBar, size = { w = 8 }, inactive = true };
-   ToolButton newFile { toolBar, this, id = ExplorerToolId::newFile, hotKey = { n, ctrl = true } };
+   IconToolButton newFile { toolBar, this, icon = newFile, hotKey = { l, ctrl = true }, toolTip = "Create New File";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         NewFile(view, null, 0);
+         view.Activate();
+         return true;
+      }
+   };
    Window { toolBar, size = { w = 2 }, inactive = true };
    Window { toolBar, size = { w = 2 }, inactive = true };
-   ToolButton newFolder { toolBar, this, id = ExplorerToolId::newFolder, hotKey = { d, ctrl = true } };
+   IconToolButton newFolder { toolBar, this, icon = newFolder, hotKey = { d, ctrl = true }, toolTip = "Create New Folder";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         NewFolder(view, null, 0);
+         view.Activate();
+         return true;
+      }
+   };
    Window { toolBar, size = { w = 8 }, inactive = true };
    Window { toolBar, size = { w = 8 }, inactive = true };
-   ToolButton goUp { toolBar, this, id = ExplorerToolId::goUp, hotKey = { up, alt = true } };
+   IconToolButton goUp { toolBar, this, icon = goUp, hotKey = { up, alt = true }, toolTip = "Go to Parent Folder";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         char * path = view.path;
+         char * newPath = new char[strlen(path)+1];
+         StripLastDirectory(path, newPath);
+         if(!newPath[0])
+         {
+            newPath[0] = '/';
+            newPath[1] = 0;
+         }
+         location = newPath;//GoTo(newPath, false, false);
+         delete newPath;
+         view.Activate();
+         return true;
+      }
+   };
    Window { toolBar, size = { w = 8 }, inactive = true };
    Window { toolBar, size = { w = 8 }, inactive = true };
-   //GroupToggleToolButton selectedPanel;
-   ToggleToolButton panelTree   { toolBar, this, id = ExplorerToolId::panelTree, hotKey = { t, ctrl = true }/*, selected = &selectedPanel*//*, checked = true*/ };
-   ToggleToolButton panelSearch { toolBar, this, id = ExplorerToolId::panelSearch, hotKey = { f, ctrl = true }/*, selected = &selectedPanel*/ };
+   //GroupToggleIconToolButton selectedPanel;
+   ToggleIconToolButton panelTree   { toolBar, this, icon = panelTree/*, selected = &selectedPanel*//*, checked = true*/, toolTip = "Toggle Tree Panel";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         SearchStop();
+         //ToggleSearchMode(false);
+         tree.visible = button.checked;
+         split.visible = button.checked;
+         if(button.checked)
+         {
+            split.rightPane = view;
+            view.anchor = { top = 0, bottom = 0, right = 0 };
+            location = addressBar.path;//GoTo(addressBar.path, false, false);
+            ReadyTree();
+         }
+         else
+         {
+            split.rightPane = null;
+            view.anchor = { left = 2, top = 0, bottom = 0, right = 0 };
+         }
+         //search.visible = !button.checked;
+         view.Activate();
+         return true;
+      }
+   };
+   ToggleIconToolButton panelSearch { toolBar, this, icon = panelSearch, hotKey = { f, ctrl = true }/*, selected = &selectedPanel*/, toolTip = "Toggle Search";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         ToggleSearchMode(button.checked);
+
+         //tree.visible = false; //!button.checked;
+         //split.visible = false; //!button.checked;
+         if(button.checked)
+         {
+            /*split.rightPane = view;
+            view.anchor = { top = 0, bottom = 0, right = 0 };*/
+            //split.rightPane = null;
+            //view.anchor = { left = 2, top = 0, bottom = 0, right = 0 };
+
+            //SearchStart();
+            searchInFileName.Activate();
+         }
+         else
+         {
+            //split.rightPane = null;
+            //view.anchor = { left = 2, top = 0, bottom = 0, right = 0 };
+
+            location = addressBar.path;//GoTo(addressBar.path, false, false);
+         }
+         view.Activate();
+         return true;
+      }
+   };
    //selectedPanel = panelTree;
    Window { toolBar, size = { w = 8 }, inactive = true };
    //selectedPanel = panelTree;
    Window { toolBar, size = { w = 8 }, inactive = true };
-   /*OptionToolButton selectedView;
-   OptionToolButton viewList     { toolBar, this, id = ExplorerToolId::viewList, selected = &selectedView, checked = true };
-   OptionToolButton viewDetails  { toolBar, this, id = ExplorerToolId::viewDetails, selected = &selectedView };
-   OptionToolButton viewIcons    { toolBar, this, id = ExplorerToolId::viewIcons, selected = &selectedView };
-   OptionToolButton viewTiles    { toolBar, this, id = ExplorerToolId::viewCards, selected = &selectedView };
-   OptionToolButton viewShowcase { toolBar, this, id = ExplorerToolId::viewShowcase, selected = &selectedView };
-   OptionToolButton viewTree     { toolBar, this, id = ExplorerToolId::viewTree, selected = &selectedView };
+   /*OptionIconToolButton selectedView;
+   OptionIconToolButton viewList     { toolBar, this, icon = viewList, selected = &selectedView, checked = true };
+   OptionIconToolButton viewDetails  { toolBar, this, icon = viewDetails, selected = &selectedView };
+   OptionIconToolButton viewIcons    { toolBar, this, icon = viewIcons, selected = &selectedView };
+   OptionIconToolButton viewTiles    { toolBar, this, icon = viewCards, selected = &selectedView };
+   OptionIconToolButton viewShowcase { toolBar, this, icon = viewShowcase, selected = &selectedView };
+   OptionIconToolButton viewTree     { toolBar, this, icon = viewTree, selected = &selectedView };
    selectedView = viewList;*/
    selectedView = viewList;*/
-   //ToggleToolButton viewList     { toolBar, this, id = ExplorerToolId::viewList, checked = true };
-   ToggleToolButton viewDetails  { toolBar, this, id = ExplorerToolId::viewDetails };
-   //ToggleToolButton viewIcons    { toolBar, this, id = ExplorerToolId::viewIcons };
-   //ToggleToolButton viewTiles    { toolBar, this, id = ExplorerToolId::viewCards };
-   ToggleToolButton viewShowcase { toolBar, this, id = ExplorerToolId::viewShowcase };
-   ToggleToolButton viewTree     { toolBar, this, id = ExplorerToolId::viewTree };
+   //ToggleIconToolButton viewList     { toolBar, this, icon = viewList, checked = true };
+      /*case viewList:
+         view.details = false;
+         view.treeBranches = false;
+         view.Refresh();
+         break;*/
+   ToggleIconToolButton viewDetails  { toolBar, this, icon = viewDetails, toolTip = "Toggle Listing Details";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         view.details = true;
+         view.treeBranches = false;
+         view.Refresh();
+         view.Activate();
+         return true;
+      }
+   };
+      /*case viewCards:
+         //SwitchViews(toolId);
+         view.details = false;
+         view.treeBranches = false;
+         view.Refresh();
+         break;*/
+   //ToggleIconToolButton viewIcons    { toolBar, this, icon = viewIcons };
+   //ToggleIconToolButton viewTiles    { toolBar, this, icon = viewCards };
+   ToggleIconToolButton viewShowcase { toolBar, this, icon = viewShowcase, toolTip = "Toggle Showcase";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         view.preview = button.checked;
+         view.Refresh();
+         view.Activate();
+         return true;
+      }
+   };
+   ToggleIconToolButton viewTree     { toolBar, this, icon = viewTree, hotKey = { t, ctrl = true }, toolTip = "Toggle Tree Listing";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         view.treeBranches = button.checked;
+         view.Refresh();
+         view.Activate();
+         return true;
+      }
+   };
    Window { toolBar, size = { w = 8 }, inactive = true };
    Window { toolBar, size = { w = 8 }, inactive = true };
-   ToggleToolButton previewPictures { toolBar, this, id = ExplorerToolId::previewPictures };
+   ToggleIconToolButton previewPictures { toolBar, this, icon = previewPictures, toolTip = "Toggle Picture Preview";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         view.previewPictures = button.checked;
+         view.Refresh();
+         view.Activate();
+         return true;
+      }
+   };
 
    Window { toolBar, size = { w = 8 }, inactive = true };
 
    Window { toolBar, size = { w = 8 }, inactive = true };
-   ToolButton hasHeader { toolBar, this, id = ExplorerToolId::hasHeader };
+   ToggleIconToolButton hasHeader { toolBar, this, icon = hasHeader, toolTip = "Toggle Listing Header";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         view.hasHeader ^= true;
+         view.Activate();
+         return true;
+      }
+   };
    Window { toolBar, size = { w = 8 }, inactive = true };
    Window { toolBar, size = { w = 8 }, inactive = true };
-   ToolButton newWindow { toolBar, this, id = ExplorerToolId::newWindow, hotKey = { w, ctrl = true } };
+   IconToolButton newWindow { toolBar, this, icon = newWindow, hotKey = { w, ctrl = true }, toolTip = "Open New Window";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         NewWindow_NotifySelect(null, 0);
+         return true;
+      }
+   };
    Window { toolBar, size = { w = 8 }, inactive = true };
 
 
    Window { toolBar, size = { w = 8 }, inactive = true };
 
 
+#if 0
    /*void OnDestroy()
    {
       iconBag.window = null;
    /*void OnDestroy()
    {
       iconBag.window = null;
@@ -383,6 +613,7 @@ class ExplorerWindow : Window
    {
       iconBag.Unload();
    }
    {
       iconBag.Unload();
    }
+#endif
 
    Stacker panels
    {
 
    Stacker panels
    {
@@ -399,7 +630,7 @@ class ExplorerWindow : Window
       //size = { h = 400 };
    };
 
       //size = { h = 400 };
    };
 
-   FlipStacker flipStack { stack, spring = previous };
+   //FlipStacker flipStack { stack, spring = previous };
 
    //Window searchSpace { stack, size = { h = 32 }, background = toolBarBackgroundColor, inactive = true, opacity = 0.0f };
 
 
    //Window searchSpace { stack, size = { h = 32 }, background = toolBarBackgroundColor, inactive = true, opacity = 0.0f };
 
@@ -412,9 +643,14 @@ class ExplorerWindow : Window
       borderStyle = none;
       background = toolBarBackgroundColor;
       tabCycle = true;
       borderStyle = none;
       background = toolBarBackgroundColor;
       tabCycle = true;
-      iconBag = iconBag;
+      //iconBag = iconBag;
+      inactive = false;
 
 
-      void NotifyToolClick(ToolButton button)
+      flipper = searchInFileContent;
+      flipSpring = true;
+
+#if 0
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
       {
          ExplorerToolId id = (ExplorerToolId)button.id;
          switch(id)
       {
          ExplorerToolId id = (ExplorerToolId)button.id;
          switch(id)
@@ -429,23 +665,26 @@ class ExplorerWindow : Window
                break;
          }
          view.Activate();
                break;
          }
          view.Activate();
+         return true;
       }
       }
+#endif
    };
 
    };
 
-
    Window { searchBar, size = { w = 8 }, inactive = true };
    Window { searchBar, size = { w = 8 }, inactive = true };
-   Label { searchBar, this, labeledWindow = searchInFileName};
-   Window { searchBar, size = { w = 2 }, inactive = true };
-   EditBox searchInFileName
+   //Label { searchBar, this, labeledWindow = searchInFileName};
+   //Window { searchBar, size = { w = 2 }, inactive = true };
+   SearchBox searchInFileName
    {
       searchBar, this;
    {
       searchBar, this;
-      size = { 200, 22 }, id = ExplorerToolId::searchInFileName;
+      size = { 200, 22 };//, icon = searchInFileName;
       borderStyle = deep;
       background = toolBarBackgroundColor;
       foreground = toolBarForegroundColor;
       selectionColor = selectionColor;
       selectionText = selectionText;
       borderStyle = deep;
       background = toolBarBackgroundColor;
       foreground = toolBarForegroundColor;
       selectionColor = selectionColor;
       selectionText = selectionText;
-      text = "File Name:";
+      //text = "File Name:";
+      caption = "Search File Names";
+      toolTip = "Search File Names";
 
       bool NotifyKeyDown(EditBox editBox, Key key, unichar ch)
       {
 
       bool NotifyKeyDown(EditBox editBox, Key key, unichar ch)
       {
@@ -465,22 +704,34 @@ class ExplorerWindow : Window
    };
    Window { searchBar, size = { w = 2 }, inactive = true };
 #ifndef __WIN32__
    };
    Window { searchBar, size = { w = 2 }, inactive = true };
 #ifndef __WIN32__
-   ToggleToolButton inFileNameMatchCase { searchBar, this, id = ExplorerToolId::inFileNameMatchCase };
+   ToggleIconToolButton inFileNameMatchCase { searchBar, this, icon = inFileNameMatchCase, toolTip = "Toggle Match Case";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         return true;
+      }
+   };
 #endif
 #endif
-   ToggleToolButton inFileNameMatchWord { searchBar, this, id = ExplorerToolId::inFileNameMatchWord };
+   ToggleIconToolButton inFileNameMatchWord { searchBar, this, icon = inFileNameMatchWord, toolTip = "Toggle Match Whole Word";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         return true;
+      }
+   };
    Window { searchBar, size = { w = 8 }, inactive = true };
    Window { searchBar, size = { w = 8 }, inactive = true };
-   Label { searchBar, this, labeledWindow = searchInFileContent};
-   Window { searchBar, size = { w = 2 }, inactive = true };
-   EditBox searchInFileContent
+   //Label { searchBar, this, labeledWindow = searchInFileContent};
+   //Window { searchBar, size = { w = 2 }, inactive = true };
+   SearchBox searchInFileContent
    {
       searchBar, this;
    {
       searchBar, this;
-      size = { 200, 22 }, id = ExplorerToolId::searchInFileContent;
+      size = { 200, 22 };//, icon = searchInFileContent;
       borderStyle = deep;
       background = toolBarBackgroundColor;
       foreground = toolBarForegroundColor;
       selectionColor = selectionColor;
       selectionText = selectionText;
       borderStyle = deep;
       background = toolBarBackgroundColor;
       foreground = toolBarForegroundColor;
       selectionColor = selectionColor;
       selectionText = selectionText;
-      text = "File Content:";
+      //text = "File Content:";
+      caption = "Search File Contents";
+      toolTip = "Search File Contents";
 
       bool NotifyKeyDown(EditBox editBox, Key key, unichar ch)
       {
 
       bool NotifyKeyDown(EditBox editBox, Key key, unichar ch)
       {
@@ -496,15 +747,44 @@ class ExplorerWindow : Window
          return true;
       }*/
    };
          return true;
       }*/
    };
-   FlipStacker { searchBar, spring = previous };
-   ToggleToolButton inFileContentMatchCase { searchBar, this, id = ExplorerToolId::inFileContentMatchCase };
-   ToggleToolButton inFileContentMatchWord { searchBar, this, id = ExplorerToolId::inFileContentMatchWord };
+   //FlipStacker { searchBar, spring = previous };
+   ToggleIconToolButton inFileContentMatchCase { searchBar, this, icon = inFileContentMatchCase, toolTip = "Toggle Match Case";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         return true;
+      }
+   };
+   ToggleIconToolButton inFileContentMatchWord { searchBar, this, icon = inFileContentMatchWord, toolTip = "Toggle Match Whole Word";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         return true;
+      }
+   };
    Window { searchBar, size = { w = 8 }, inactive = true };
    Window { searchBar, size = { w = 8 }, inactive = true };
-   ToggleToolButton searchInSubDirs { searchBar, this, id = ExplorerToolId::searchInSubDirs, checked = true };
+   ToggleIconToolButton searchInSubDirs { searchBar, this, icon = searchInSubDirs, checked = true, toolTip = "Toggle Include Subfolders";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         return true;
+      }
+   };
    Window { searchBar, size = { w = 8 }, inactive = true };
    Window { searchBar, size = { w = 8 }, inactive = true };
-   ToolButton searchStart { searchBar, this, id = ExplorerToolId::searchStart, hotKey = { s, ctrl = true } };
+   IconToolButton searchStart { searchBar, this, icon = searchStart, hotKey = { s, ctrl = true }, toolTip = "Start Search";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         SearchStart();
+         view.Activate();
+         return true;
+      }
+   };
    Window { searchBar, size = { w = 8 }, inactive = true };
    Window { searchBar, size = { w = 8 }, inactive = true };
-   ToolButton searchStop { searchBar, this, id = ExplorerToolId::searchStop, hotKey = { escape }, disabled = true; };
+   IconToolButton searchStop { searchBar, this, icon = searchStop, hotKey = { escape }, disabled = true, toolTip = "Stop Search";
+      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
+      {
+         SearchStop();
+         view.Activate();
+         return true;
+      }
+   };
    Window { searchBar, size = { w = 8 }, inactive = true };
 
 
    Window { searchBar, size = { w = 8 }, inactive = true };
 
 
@@ -553,7 +833,7 @@ class ExplorerWindow : Window
             {
                char p[MAX_LOCATION];
                node.GetPath(p);
             {
                char p[MAX_LOCATION];
                node.GetPath(p);
-               GoTo(node.path, false, true);
+               location = node.path;//GoTo(node.path, false, true);
             }
          }
          return true;
             }
          }
          return true;
@@ -575,6 +855,7 @@ class ExplorerWindow : Window
       split = 300;
    };
 
       split = 300;
    };
 
+   //FileSystemCache testCache;
    FileSystemBox view
    {
       panels, this;
    FileSystemBox view
    {
       panels, this;
@@ -593,6 +874,15 @@ class ExplorerWindow : Window
       multiSelect = true;
       autoLoad = false;
 
       multiSelect = true;
       autoLoad = false;
 
+      //iteratorClass = class(FileSystemCacheIterator);
+      //iteratorClass = class(FileSystemIterator);
+
+      bool NotifyIteratorInit(FileSystemBox box, FileSystemIterator fileSystemIterator)
+      {
+         //((FileSystemCacheIterator)fileSystemIterator).cache = testCache;
+         //((FileSystemIterator)fileSystemIterator)
+      }
+
       bool NotifyNodeOpen(FileSystemBox box, FileSystemBoxSelection selection)
       {
          FileSystemNode node = selection.node;
       bool NotifyNodeOpen(FileSystemBox box, FileSystemBoxSelection selection)
       {
          FileSystemNode node = selection.node;
@@ -601,26 +891,26 @@ class ExplorerWindow : Window
             if(node.type.isFile)
             {
                char path[MAX_LOCATION];
             if(node.type.isFile)
             {
                char path[MAX_LOCATION];
-            #ifndef __WIN32__
-               char command[MAX_LOCATION];
-               node.GetPath(path);
-               /*_FileType t = node.type;
-               if(t == ewsFile || t == epjFile ||
-                     t == ecFile || t == ehFile ||
-                     t == cppFile || t == hppFile ||
-                     t == cFile || t == hFile ||
-                     t == textFile || t == webFile)*/
-                  sprintf(command, "gnome-open \"%s\"", path);
-               /*else
-                  sprintf(command, "%s", path);*/
-               Execute(command);
-            #else
+            //#ifndef __WIN32__
+            //   char command[MAX_LOCATION];
+            //   node.GetPath(path);
+            //   /*_FileType t = node.type;
+            //   if(t == ewsFile || t == epjFile ||
+            //         t == ecFile || t == ehFile ||
+            //         t == cppFile || t == hppFile ||
+            //         t == cFile || t == hFile ||
+            //         t == textFile || t == webFile)*/
+            //      sprintf(command, "gnome-open \"%s\"", path);
+            //   /*else
+            //      sprintf(command, "%s", path);*/
+            //   Execute(command);
+            //#else
                node.GetPath(path);
                ShellOpen(path);
                node.GetPath(path);
                ShellOpen(path);
-            #endif
+            //#endif
             }
             else if(node.type.isFolder)
             }
             else if(node.type.isFolder)
-               GoTo(node.path, true, false);
+               location = node.path;//GoTo(node.path, true, false);
          }
          UpdateHistoryItem(selection);
          return true;
          }
          UpdateHistoryItem(selection);
          return true;
@@ -628,7 +918,110 @@ class ExplorerWindow : Window
 
       bool NotifyNodeSelect(FileSystemBox box, FileSystemBoxSelection selection)
       {
 
       bool NotifyNodeSelect(FileSystemBox box, FileSystemBoxSelection selection)
       {
-         UpdateHistoryItem(selection);
+         if(!comparedLocations)
+            UpdateHistoryItem(selection);
+         return true;
+      }
+
+      bool NotifyNodeMenu(FileSystemBox box, Menu menu, FileSystemBoxSelection selection)
+      {
+         char * text;
+         char * itemString;
+         FileSystemNode node = selection.node;
+
+         //PrintLn(node.name);
+         if(box.selection.nodes.count == 1)
+            itemString = node.name;
+         else
+            itemString = PrintString(box.selection.nodes.count, " items");
+         text = PrintString("Open ", itemString);
+         MenuItem { menu, text, o, disabled = false;
+            NotifySelect = FileSystemBox::MenuOpen
+            /*bool FileSystemBox::NotifySelect(MenuItem selection, Modifiers mods)
+            {
+               for(node : this.selection.nodes)
+               {
+                  // todo: somehow bring MenuOpen / OpenNode behavior ourside
+               }
+               return true;
+            }*/
+         };
+         //delete text;
+         if(node.type == folder)
+         {
+            text = PrintString("Open ", itemString, " in another window");
+            MenuItem { menu, text, w, disabled = false;
+               bool FileSystemBox::NotifySelect(MenuItem selection, Modifiers mods)
+               {
+                  for(node : this.selection.nodes)
+                  {
+                     ExplorerWindow ew { /*location = this.selection.node.path*/ };//.Create();
+                     ew.Create();
+                     ew.location = /*this.selection.*/node.path;
+                  }
+                  return true;
+               }
+            };
+            //delete text;
+            MenuDivider { menu };
+            text = PrintString("Open ", itemString, " in shell");
+            MenuItem { menu, text, w, disabled = false;
+               bool FileSystemBox::NotifySelect(MenuItem selection, Modifiers mods)
+               {
+                  for(node : this.selection.nodes)
+                  {
+                     if(node.stats.attribs)
+                        ShellOpen(/*this.selection.*/node.path);
+                  }
+                  return true;
+               }
+            };
+            //delete text;
+            MenuDivider { menu };
+            MenuItem { menu, "Create File", w, NotifySelect = NewFile, disabled = false };
+            MenuItem { menu, "Create Folder", w, NotifySelect = NewFolder, disabled = false };
+         }
+         if(panelSearch.checked)
+         {
+            MenuDivider { menu };
+            MenuItem { menu, "Open Containing Folder", f, NotifySelect = FileSystemBox::MenuOpen, disabled = false;
+               bool FileSystemBox::NotifySelect(MenuItem selection, Modifiers mods)
+               {
+                  char path[MAX_LOCATION];
+                  StripLastDirectory(this.selection.node.path, path);
+                  this.path = path;
+                  return true;
+               }
+            };
+            MenuItem { menu, "Open Containing Folder in another window", r, NotifySelect = FileSystemBox::MenuOpen, disabled = false;
+               bool FileSystemBox::NotifySelect(MenuItem selection, Modifiers mods)
+               {
+                  char path[MAX_LOCATION];
+                  ExplorerWindow ew { /*location = this.selection.node.path*/ };//.Create();
+                  ew.Create();
+                  StripLastDirectory(this.selection.node.path, path);
+                  ew.location = path;
+                  return true;
+               }
+            };
+            delete itemString;
+         }
+         if(node.isListItem/* && TODO: unless node is at root location*/)
+         {
+            MenuDivider { menu };
+            MenuItem { menu, "Replace by Parent\tCtrl+R", r, NotifySelect = FileSystemBox::MenuReplaceListItemByContainingDir, disabled = false };
+         }
+         else if(box.mode == list)
+         {
+            MenuDivider { menu };
+            MenuItem { menu, "Replace List Item\tCtrl+R", r, NotifySelect = FileSystemBox::MenuReplaceListItemByChild, disabled = false };
+         }
+         MenuDivider { menu };
+         MenuItem { menu, "Cut\tCtrl+X", t, NotifySelect = null, disabled = false };
+         MenuItem { menu, "Copy\tCtrl+C", c, NotifySelect = null, disabled = false };
+         MenuItem { menu, "Paste\tCtrl+V", p, NotifySelect = null, disabled = false /*!clipboard*/ };
+         MenuItem { menu, "Delete\tDel", d, NotifySelect = null, disabled = false };
+         //MenuDivider { menu };
          return true;
       }
 
          return true;
       }
 
@@ -668,7 +1061,6 @@ class ExplorerWindow : Window
       //searchSpace.visible = !inSearch;
       searchBar.visible = inSearch;
       history[historyIndex].inSearch = inSearch;
       //searchSpace.visible = !inSearch;
       searchBar.visible = inSearch;
       history[historyIndex].inSearch = inSearch;
-      size = { size.w, size.h };
       view.pathColumn = inSearch;
       /*if(inSearch)
          searchThread.InitResults();*/
       view.pathColumn = inSearch;
       /*if(inSearch)
          searchThread.InitResults();*/
@@ -701,43 +1093,88 @@ class ExplorerWindow : Window
       }
    }
 
       }
    }
 
-   void GoTo(char * location, bool viewIsAtLocation, bool treeIsAtLocation)
+   //void NewFile()
+   bool FileSystemBox::NewFile(MenuItem selection, Modifiers mods)
    {
    {
-      HistoryItem item = null;
-      if(!history.count || fstrcmp(history[historyIndex].path, location))
+      if(master._class == class(ExplorerWindow))
       {
       {
-         int c;
-         for(c = 0; c < history.count; c++)
-            if(!fstrcmp(history[c].path, location))
-               break;
-         if(c == history.count)
+         ExplorerWindow ew = (ExplorerWindow)master;
+         if(CreateNewFileDialog { /*master = */ew/*, parent = parent*/, currentDirectory = selection ? ew.view.selection.node.path : ew.view.path }.Modal() == ok )
+            ew.Refresh();
+      }
+   }
+
+   //void NewFolder()
+   bool FileSystemBox::NewFolder(MenuItem selection, Modifiers mods)
+   {
+      if(master._class == class(ExplorerWindow))
+      {
+         ExplorerWindow ew = (ExplorerWindow)master;
+         if(CreateDirectoryDialog { /*master = */ew/*, parent = parent*/, currentDirectory = selection ? ew.view.selection.node.path : ew.view.path }.Modal() == ok )
+            ew.Refresh();
+      }
+   }
+
+   //void GoTo(char * location/*, bool viewIsAtLocation, bool treeIsAtLocation*/)
+   property char * location
+   {
+      set
+      {
+         HistoryItem item = null;
+         if(!history.count || fstrcmp(history[historyIndex].path, value))
          {
          {
-            item = { path = CopyString(location) };
-            if(history.count)
+            int c;
+            for(c = 0; c < history.count; c++)
+               if(!fstrcmp(history[c].path, value))
+                  break;
+            if(c == history.count)
             {
             {
-               while(historyIndex < history.count-1)
+               item = { path = CopyString(value) };
+               if(history.count)
                {
                {
-                  delete history[history.count-1].path;
-                  history.count--;
+                  while(historyIndex < history.count-1)
+                  {
+                     delete history[history.count-1].path;
+                     history.count--;
+                  }
                }
                }
+               history.Add(item);
+               historyIndex = history.count-1;
             }
             }
-            history.Add(item);
-            historyIndex = history.count-1;
+            else
+               historyIndex = c;
          }
          }
-         else
-            historyIndex = c;
+         GoToHistoryIndex(/*viewIsAtLocation, treeIsAtLocation, */item != null);
+      }
+      get { return view.path; }
+   }
+
+   property Array<String> comparedLocations
+   {
+      set
+      {
+         // dd
+         view.comparedPaths = value;
+      }
+      get
+      {
+         return view.comparedPaths;
       }
       }
-      GoToHistoryIndex(viewIsAtLocation, treeIsAtLocation, item != null);
    }
 
    }
 
-   void GoToHistoryIndex(bool viewIsAtLocation, bool treeIsAtLocation, bool updateHistoryItem)
+   void GoToHistoryIndex(/*bool viewIsAtLocation, bool treeIsAtLocation, */bool updateHistoryItem)
    {
    {
+      bool viewIsAtLocation;
+      bool treeIsAtLocation;
       HistoryItem item = history[historyIndex];
 
       goBack.disabled = historyIndex == 0;
       goForward.disabled = historyIndex == history.count-1;
       goUp.disabled = !fstrcmp(item.path, "/");
 
       HistoryItem item = history[historyIndex];
 
       goBack.disabled = historyIndex == 0;
       goForward.disabled = historyIndex == history.count-1;
       goUp.disabled = !fstrcmp(item.path, "/");
 
+      viewIsAtLocation = !fstrcmp(item.path, tree.path);
+      treeIsAtLocation = !fstrcmp(item.path, view.path);
+
       if(!viewIsAtLocation)
       {
          if(item.inSearch != panelSearch.checked)
       if(!viewIsAtLocation)
       {
          if(item.inSearch != panelSearch.checked)
@@ -752,7 +1189,8 @@ class ExplorerWindow : Window
          }
          else*/
          {
          }
          else*/
          {
-            view.path = item.path;
+            if(fstrcmp(view.path, item.path))
+               view.path = item.path;
             item.holdRecordingSelection = true;
             view.SelectMultipleByPath(item.selection);
          }
             item.holdRecordingSelection = true;
             view.SelectMultipleByPath(item.selection);
          }
@@ -937,7 +1375,7 @@ class ExplorerWindow : Window
 
    /*void SearchLocation(char * location)
    {
 
    /*void SearchLocation(char * location)
    {
-      GoTo(location);
+      location = location;//GoTo(location);
       search.location.editBox.contents = location;
    }*/
 
       search.location.editBox.contents = location;
    }*/
 
diff --git a/explorer/tests/t1FileSystemCache.ec b/explorer/tests/t1FileSystemCache.ec
new file mode 100644 (file)
index 0000000..cbdac5b
--- /dev/null
@@ -0,0 +1,13 @@
+import "ecere"
+import "EDE"
+
+class t1 : Application
+{
+   void Main()
+   {
+      DummyFileSystemCacheWindow dw { };
+      //FileSystemCache cache;
+      /*cache = */FileSystemCache::Cache("somepath", false, dw);
+      delete dw;
+   }
+}
index 1dd2ea0..7fb0b90 100644 (file)
@@ -1,8 +1,6 @@
 {
    "Version" : 0.2,
    "ModuleName" : "EDE",
 {
    "Version" : 0.2,
    "ModuleName" : "EDE",
-   "Description" : "Ecere Desktop Environment",
-   "License" : "",
    "Options" : {
       "Warnings" : "All",
       "DefaultNameSpace" : "ede",
    "Options" : {
       "Warnings" : "All",
       "DefaultNameSpace" : "ede",
          "Files" : [
             "FileSystemBox.ec",
             "FileSystemSearch.ec",
          "Files" : [
             "FileSystemBox.ec",
             "FileSystemSearch.ec",
-            "CreateNewFileDialog.ec"
+            "CreateNewFileDialog.ec",
+            "FileSystemCache.ec",
+            "FileSystemIterator.ec"
          ]
       }
    ],
          ]
       }
    ],
-   "ResourcesPath" : "",
+   "ResourcesPath" : "res",
    "Resources" : [
    "Resources" : [
-
-   ]
-}
\ No newline at end of file
+      {
+         "Folder" : "actions",
+         "Files" : [
+            "address-book-new.png",
+            "appointment-new.png",
+            "bookmark-new.png",
+            "contact-new.png",
+            "document-new.png",
+            "document-open.png",
+            "document-print-preview.png",
+            "document-print.png",
+            "document-properties.png",
+            "document-save-as.png",
+            "document-save.png",
+            "edit-clear.png",
+            "edit-copy.png",
+            "edit-cut.png",
+            "edit-delete.png",
+            "edit-find-replace.png",
+            "edit-paste.png",
+            "edit-redo.png",
+            "edit-select-all.png",
+            "edit-undo.png",
+            "folder-new.png",
+            "format-indent-less.png",
+            "format-indent-more.png",
+            "format-justify-center.png",
+            "format-justify-fill.png",
+            "format-justify-left.png",
+            "format-justify-right.png",
+            "format-text-bold.png",
+            "format-text-italic.png",
+            "format-text-strikethrough.png",
+            "format-text-underline.png",
+            "go-bottom.png",
+            "go-down.png",
+            "go-home.png",
+            "go-jump.png",
+            "go-last.png",
+            "go-next.png",
+            "go-previous.png",
+            "go-top.png",
+            "go-up.png",
+            "list-add.png",
+            "list-remove.png",
+            "mail-forward.png",
+            "mail-mark-junk.png",
+            "mail-mark-not-junk.png",
+            "mail-message-new.png",
+            "mail-reply-all.png",
+            "mail-reply-sender.png",
+            "mail-send-receive.png",
+            "media-playback-pause.png",
+            "media-playback-start.png",
+            "media-playback-stop.png",
+            "media-record.png",
+            "media-seek-backward.png",
+            "media-seek-forward.png",
+            "media-skip-backward.png",
+            "media-skip-forward.png",
+            "process-stop.png",
+            "system-lock-screen.png",
+            "system-log-out.png",
+            "system-search.png",
+            "system-shutdown.png",
+            "tab-new.png",
+            "view-fullscreen.png",
+            "view-refresh.png",
+            "window-new.png",
+            "edit-find.png",
+            "go-first.png",
+            "media-eject.png"
+         ]
+      },
+      {
+         "Folder" : "apps",
+         "Files" : [
+            "preferences-desktop-keyboard-shortcuts.png",
+            "accessories-calculator.png",
+            "accessories-character-map.png",
+            "accessories-text-editor.png",
+            "help-browser.png",
+            "internet-group-chat.png",
+            "internet-mail.png",
+            "internet-news-reader.png",
+            "internet-web-browser.png",
+            "office-calendar.png",
+            "preferences-desktop-accessibility.png",
+            "preferences-desktop-assistive-technology.png",
+            "preferences-desktop-font.png",
+            "preferences-desktop-locale.png",
+            "preferences-desktop-multimedia.png",
+            "preferences-desktop-remote-desktop.png",
+            "preferences-desktop-screensaver.png",
+            "preferences-desktop-theme.png",
+            "preferences-desktop-wallpaper.png",
+            "preferences-system-network-proxy.png",
+            "preferences-system-session.png",
+            "preferences-system-windows.png",
+            "system-file-manager.png",
+            "system-installer.png",
+            "system-software-update.png",
+            "system-users.png",
+            "utilities-system-monitor.png",
+            "utilities-terminal.png"
+         ]
+      },
+      {
+         "Folder" : "categories",
+         "Files" : [
+            "applications-accessories.png",
+            "applications-development.png",
+            "applications-games.png",
+            "applications-graphics.png",
+            "applications-internet.png",
+            "applications-multimedia.png",
+            "applications-office.png",
+            "applications-other.png",
+            "applications-system.png",
+            "preferences-desktop-peripherals.png",
+            "preferences-desktop.png",
+            "preferences-system.png"
+         ]
+      },
+      {
+         "Folder" : "devices",
+         "Files" : [
+            "audio-card.png",
+            "audio-input-microphone.png",
+            "battery.png",
+            "camera-photo.png",
+            "camera-video.png",
+            "computer.png",
+            "drive-harddisk.png",
+            "drive-optical.png",
+            "drive-removable-media.png",
+            "input-gaming.png",
+            "input-keyboard.png",
+            "input-mouse.png",
+            "media-flash.png",
+            "media-floppy.png",
+            "media-optical.png",
+            "multimedia-player.png",
+            "network-wired.png",
+            "network-wireless.png",
+            "printer.png",
+            "video-display.png"
+         ]
+      },
+      {
+         "Folder" : "emblems",
+         "Files" : [
+            "emblem-favorite.png",
+            "emblem-important.png",
+            "emblem-photos.png",
+            "emblem-readonly.png",
+            "emblem-symbolic-link.png",
+            "emblem-system.png",
+            "emblem-unreadable.png"
+         ]
+      },
+      {
+         "Folder" : "emotes",
+         "Files" : [
+            "face-angel.png",
+            "face-crying.png",
+            "face-devilish.png",
+            "face-glasses.png",
+            "face-grin.png",
+            "face-kiss.png",
+            "face-monkey.png",
+            "face-plain.png",
+            "face-sad.png",
+            "face-smile-big.png",
+            "face-smile.png",
+            "face-surprise.png",
+            "face-wink.png"
+         ]
+      },
+      {
+         "Folder" : "mimetypes",
+         "Files" : [
+            "application-certificate.png",
+            "application-x-executable.png",
+            "audio-x-generic.png",
+            "font-x-generic.png",
+            "image-x-generic.png",
+            "package-x-generic.png",
+            "text-html.png",
+            "text-x-generic-template.png",
+            "text-x-generic.png",
+            "text-x-script.png",
+            "video-x-generic.png",
+            "x-office-address-book.png",
+            "x-office-calendar.png",
+            "x-office-document-template.png",
+            "x-office-document.png",
+            "x-office-drawing-template.png",
+            "x-office-drawing.png",
+            "x-office-presentation-template.png",
+            "x-office-presentation.png",
+            "x-office-spreadsheet-template.png",
+            "x-office-spreadsheet.png"
+         ]
+      },
+      {
+         "Folder" : "places",
+         "Files" : [
+            "folder-remote.png",
+            "folder-saved-search.png",
+            "folder.png",
+            "network-server.png",
+            "network-workgroup.png",
+            "start-here.png",
+            "user-desktop.png",
+            "user-home.png",
+            "user-trash.png"
+         ]
+      },
+      {
+         "Folder" : "status",
+         "Files" : [
+            "network-error.png",
+            "audio-volume-high.png",
+            "audio-volume-low.png",
+            "audio-volume-medium.png",
+            "audio-volume-muted.png",
+            "battery-caution.png",
+            "dialog-error.png",
+            "dialog-information.png",
+            "dialog-warning.png",
+            "folder-drag-accept.png",
+            "folder-open.png",
+            "folder-visiting.png",
+            "image-loading.png",
+            "image-missing.png",
+            "mail-attachment.png",
+            "network-idle.png",
+            "network-offline.png",
+            "network-receive.png",
+            "network-transmit-receive.png",
+            "network-transmit.png",
+            "network-wireless-encrypted.png",
+            "printer-error.png",
+            "software-update-available.png",
+            "software-update-urgent.png",
+            "user-trash-full.png",
+            "weather-clear-night.png",
+            "weather-clear.png",
+            "weather-few-clouds-night.png",
+            "weather-few-clouds.png",
+            "weather-overcast.png",
+            "weather-severe-alert.png",
+            "weather-showers-scattered.png",
+            "weather-showers.png",
+            "weather-snow.png",
+            "weather-storm.png"
+         ]
+      },
+      "emblem-not.png"
+   ],
+   "Description" : "Ecere Desktop Environment"
+}
diff --git a/libede/res/actions/address-book-new.png b/libede/res/actions/address-book-new.png
new file mode 100644 (file)
index 0000000..2098cfd
Binary files /dev/null and b/libede/res/actions/address-book-new.png differ
diff --git a/libede/res/actions/appointment-new.png b/libede/res/actions/appointment-new.png
new file mode 100644 (file)
index 0000000..18b7c67
Binary files /dev/null and b/libede/res/actions/appointment-new.png differ
diff --git a/libede/res/actions/bookmark-new.png b/libede/res/actions/bookmark-new.png
new file mode 100644 (file)
index 0000000..6cf6443
Binary files /dev/null and b/libede/res/actions/bookmark-new.png differ
diff --git a/libede/res/actions/contact-new.png b/libede/res/actions/contact-new.png
new file mode 100644 (file)
index 0000000..46573ff
Binary files /dev/null and b/libede/res/actions/contact-new.png differ
diff --git a/libede/res/actions/document-new.png b/libede/res/actions/document-new.png
new file mode 100644 (file)
index 0000000..4c3efdd
Binary files /dev/null and b/libede/res/actions/document-new.png differ
diff --git a/libede/res/actions/document-open.png b/libede/res/actions/document-open.png
new file mode 100644 (file)
index 0000000..ab94046
Binary files /dev/null and b/libede/res/actions/document-open.png differ
diff --git a/libede/res/actions/document-print-preview.png b/libede/res/actions/document-print-preview.png
new file mode 100644 (file)
index 0000000..ab92a30
Binary files /dev/null and b/libede/res/actions/document-print-preview.png differ
diff --git a/libede/res/actions/document-print.png b/libede/res/actions/document-print.png
new file mode 100644 (file)
index 0000000..35c37bd
Binary files /dev/null and b/libede/res/actions/document-print.png differ
diff --git a/libede/res/actions/document-properties.png b/libede/res/actions/document-properties.png
new file mode 100644 (file)
index 0000000..ab0e8ea
Binary files /dev/null and b/libede/res/actions/document-properties.png differ
diff --git a/libede/res/actions/document-save-as.png b/libede/res/actions/document-save-as.png
new file mode 100644 (file)
index 0000000..9bed143
Binary files /dev/null and b/libede/res/actions/document-save-as.png differ
diff --git a/libede/res/actions/document-save.png b/libede/res/actions/document-save.png
new file mode 100644 (file)
index 0000000..22ff495
Binary files /dev/null and b/libede/res/actions/document-save.png differ
diff --git a/libede/res/actions/edit-clear.png b/libede/res/actions/edit-clear.png
new file mode 100644 (file)
index 0000000..e6c8e8b
Binary files /dev/null and b/libede/res/actions/edit-clear.png differ
diff --git a/libede/res/actions/edit-copy.png b/libede/res/actions/edit-copy.png
new file mode 100644 (file)
index 0000000..8dd48c4
Binary files /dev/null and b/libede/res/actions/edit-copy.png differ
diff --git a/libede/res/actions/edit-cut.png b/libede/res/actions/edit-cut.png
new file mode 100644 (file)
index 0000000..dc9eb9a
Binary files /dev/null and b/libede/res/actions/edit-cut.png differ
diff --git a/libede/res/actions/edit-delete.png b/libede/res/actions/edit-delete.png
new file mode 100644 (file)
index 0000000..ea03150
Binary files /dev/null and b/libede/res/actions/edit-delete.png differ
diff --git a/libede/res/actions/edit-find-replace.png b/libede/res/actions/edit-find-replace.png
new file mode 100644 (file)
index 0000000..6edbef6
Binary files /dev/null and b/libede/res/actions/edit-find-replace.png differ
diff --git a/libede/res/actions/edit-find.png b/libede/res/actions/edit-find.png
new file mode 100644 (file)
index 0000000..d072d3c
Binary files /dev/null and b/libede/res/actions/edit-find.png differ
diff --git a/libede/res/actions/edit-paste.png b/libede/res/actions/edit-paste.png
new file mode 100644 (file)
index 0000000..24588a3
Binary files /dev/null and b/libede/res/actions/edit-paste.png differ
diff --git a/libede/res/actions/edit-redo.png b/libede/res/actions/edit-redo.png
new file mode 100644 (file)
index 0000000..c3b0df0
Binary files /dev/null and b/libede/res/actions/edit-redo.png differ
diff --git a/libede/res/actions/edit-select-all.png b/libede/res/actions/edit-select-all.png
new file mode 100644 (file)
index 0000000..f4b0b19
Binary files /dev/null and b/libede/res/actions/edit-select-all.png differ
diff --git a/libede/res/actions/edit-undo.png b/libede/res/actions/edit-undo.png
new file mode 100644 (file)
index 0000000..8b0fef9
Binary files /dev/null and b/libede/res/actions/edit-undo.png differ
diff --git a/libede/res/actions/folder-new.png b/libede/res/actions/folder-new.png
new file mode 100644 (file)
index 0000000..628f4d5
Binary files /dev/null and b/libede/res/actions/folder-new.png differ
diff --git a/libede/res/actions/format-indent-less.png b/libede/res/actions/format-indent-less.png
new file mode 100644 (file)
index 0000000..1787a7f
Binary files /dev/null and b/libede/res/actions/format-indent-less.png differ
diff --git a/libede/res/actions/format-indent-more.png b/libede/res/actions/format-indent-more.png
new file mode 100644 (file)
index 0000000..6bad6bb
Binary files /dev/null and b/libede/res/actions/format-indent-more.png differ
diff --git a/libede/res/actions/format-justify-center.png b/libede/res/actions/format-justify-center.png
new file mode 100644 (file)
index 0000000..207dc4c
Binary files /dev/null and b/libede/res/actions/format-justify-center.png differ
diff --git a/libede/res/actions/format-justify-fill.png b/libede/res/actions/format-justify-fill.png
new file mode 100644 (file)
index 0000000..663cbad
Binary files /dev/null and b/libede/res/actions/format-justify-fill.png differ
diff --git a/libede/res/actions/format-justify-left.png b/libede/res/actions/format-justify-left.png
new file mode 100644 (file)
index 0000000..d9b40a7
Binary files /dev/null and b/libede/res/actions/format-justify-left.png differ
diff --git a/libede/res/actions/format-justify-right.png b/libede/res/actions/format-justify-right.png
new file mode 100644 (file)
index 0000000..c301307
Binary files /dev/null and b/libede/res/actions/format-justify-right.png differ
diff --git a/libede/res/actions/format-text-bold.png b/libede/res/actions/format-text-bold.png
new file mode 100644 (file)
index 0000000..c9cb630
Binary files /dev/null and b/libede/res/actions/format-text-bold.png differ
diff --git a/libede/res/actions/format-text-italic.png b/libede/res/actions/format-text-italic.png
new file mode 100644 (file)
index 0000000..977ea82
Binary files /dev/null and b/libede/res/actions/format-text-italic.png differ
diff --git a/libede/res/actions/format-text-strikethrough.png b/libede/res/actions/format-text-strikethrough.png
new file mode 100644 (file)
index 0000000..ccee76e
Binary files /dev/null and b/libede/res/actions/format-text-strikethrough.png differ
diff --git a/libede/res/actions/format-text-underline.png b/libede/res/actions/format-text-underline.png
new file mode 100644 (file)
index 0000000..0c48721
Binary files /dev/null and b/libede/res/actions/format-text-underline.png differ
diff --git a/libede/res/actions/go-bottom.png b/libede/res/actions/go-bottom.png
new file mode 100644 (file)
index 0000000..2c5a803
Binary files /dev/null and b/libede/res/actions/go-bottom.png differ
diff --git a/libede/res/actions/go-down.png b/libede/res/actions/go-down.png
new file mode 100644 (file)
index 0000000..3dd7fcc
Binary files /dev/null and b/libede/res/actions/go-down.png differ
diff --git a/libede/res/actions/go-first.png b/libede/res/actions/go-first.png
new file mode 100644 (file)
index 0000000..9c15c09
Binary files /dev/null and b/libede/res/actions/go-first.png differ
diff --git a/libede/res/actions/go-home.png b/libede/res/actions/go-home.png
new file mode 100644 (file)
index 0000000..a46fb22
Binary files /dev/null and b/libede/res/actions/go-home.png differ
diff --git a/libede/res/actions/go-jump.png b/libede/res/actions/go-jump.png
new file mode 100644 (file)
index 0000000..1d218c3
Binary files /dev/null and b/libede/res/actions/go-jump.png differ
diff --git a/libede/res/actions/go-last.png b/libede/res/actions/go-last.png
new file mode 100644 (file)
index 0000000..6e904ef
Binary files /dev/null and b/libede/res/actions/go-last.png differ
diff --git a/libede/res/actions/go-next.png b/libede/res/actions/go-next.png
new file mode 100644 (file)
index 0000000..6ef8de7
Binary files /dev/null and b/libede/res/actions/go-next.png differ
diff --git a/libede/res/actions/go-previous.png b/libede/res/actions/go-previous.png
new file mode 100644 (file)
index 0000000..659cd90
Binary files /dev/null and b/libede/res/actions/go-previous.png differ
diff --git a/libede/res/actions/go-top.png b/libede/res/actions/go-top.png
new file mode 100644 (file)
index 0000000..70f2c99
Binary files /dev/null and b/libede/res/actions/go-top.png differ
diff --git a/libede/res/actions/go-up.png b/libede/res/actions/go-up.png
new file mode 100644 (file)
index 0000000..fa9a7d7
Binary files /dev/null and b/libede/res/actions/go-up.png differ
diff --git a/libede/res/actions/list-add.png b/libede/res/actions/list-add.png
new file mode 100644 (file)
index 0000000..1aa7f09
Binary files /dev/null and b/libede/res/actions/list-add.png differ
diff --git a/libede/res/actions/list-remove.png b/libede/res/actions/list-remove.png
new file mode 100644 (file)
index 0000000..00b654e
Binary files /dev/null and b/libede/res/actions/list-remove.png differ
diff --git a/libede/res/actions/mail-forward.png b/libede/res/actions/mail-forward.png
new file mode 100644 (file)
index 0000000..de0199b
Binary files /dev/null and b/libede/res/actions/mail-forward.png differ
diff --git a/libede/res/actions/mail-mark-junk.png b/libede/res/actions/mail-mark-junk.png
new file mode 100644 (file)
index 0000000..f12d452
Binary files /dev/null and b/libede/res/actions/mail-mark-junk.png differ
diff --git a/libede/res/actions/mail-mark-not-junk.png b/libede/res/actions/mail-mark-not-junk.png
new file mode 100644 (file)
index 0000000..87c425f
Binary files /dev/null and b/libede/res/actions/mail-mark-not-junk.png differ
diff --git a/libede/res/actions/mail-message-new.png b/libede/res/actions/mail-message-new.png
new file mode 100644 (file)
index 0000000..7c68cb8
Binary files /dev/null and b/libede/res/actions/mail-message-new.png differ
diff --git a/libede/res/actions/mail-reply-all.png b/libede/res/actions/mail-reply-all.png
new file mode 100644 (file)
index 0000000..2017b0a
Binary files /dev/null and b/libede/res/actions/mail-reply-all.png differ
diff --git a/libede/res/actions/mail-reply-sender.png b/libede/res/actions/mail-reply-sender.png
new file mode 100644 (file)
index 0000000..a619741
Binary files /dev/null and b/libede/res/actions/mail-reply-sender.png differ
diff --git a/libede/res/actions/mail-send-receive.png b/libede/res/actions/mail-send-receive.png
new file mode 100644 (file)
index 0000000..3eb6a9c
Binary files /dev/null and b/libede/res/actions/mail-send-receive.png differ
diff --git a/libede/res/actions/media-eject.png b/libede/res/actions/media-eject.png
new file mode 100644 (file)
index 0000000..2084067
Binary files /dev/null and b/libede/res/actions/media-eject.png differ
diff --git a/libede/res/actions/media-playback-pause.png b/libede/res/actions/media-playback-pause.png
new file mode 100644 (file)
index 0000000..c8b4fe2
Binary files /dev/null and b/libede/res/actions/media-playback-pause.png differ
diff --git a/libede/res/actions/media-playback-start.png b/libede/res/actions/media-playback-start.png
new file mode 100644 (file)
index 0000000..a7de0fe
Binary files /dev/null and b/libede/res/actions/media-playback-start.png differ
diff --git a/libede/res/actions/media-playback-stop.png b/libede/res/actions/media-playback-stop.png
new file mode 100644 (file)
index 0000000..ede2815
Binary files /dev/null and b/libede/res/actions/media-playback-stop.png differ
diff --git a/libede/res/actions/media-record.png b/libede/res/actions/media-record.png
new file mode 100644 (file)
index 0000000..2f66cde
Binary files /dev/null and b/libede/res/actions/media-record.png differ
diff --git a/libede/res/actions/media-seek-backward.png b/libede/res/actions/media-seek-backward.png
new file mode 100644 (file)
index 0000000..ffcac31
Binary files /dev/null and b/libede/res/actions/media-seek-backward.png differ
diff --git a/libede/res/actions/media-seek-forward.png b/libede/res/actions/media-seek-forward.png
new file mode 100644 (file)
index 0000000..4d7e2cd
Binary files /dev/null and b/libede/res/actions/media-seek-forward.png differ
diff --git a/libede/res/actions/media-skip-backward.png b/libede/res/actions/media-skip-backward.png
new file mode 100644 (file)
index 0000000..94381f5
Binary files /dev/null and b/libede/res/actions/media-skip-backward.png differ
diff --git a/libede/res/actions/media-skip-forward.png b/libede/res/actions/media-skip-forward.png
new file mode 100644 (file)
index 0000000..758ec6f
Binary files /dev/null and b/libede/res/actions/media-skip-forward.png differ
diff --git a/libede/res/actions/process-stop.png b/libede/res/actions/process-stop.png
new file mode 100644 (file)
index 0000000..ab6808f
Binary files /dev/null and b/libede/res/actions/process-stop.png differ
diff --git a/libede/res/actions/system-lock-screen.png b/libede/res/actions/system-lock-screen.png
new file mode 100644 (file)
index 0000000..f7ea0cd
Binary files /dev/null and b/libede/res/actions/system-lock-screen.png differ
diff --git a/libede/res/actions/system-log-out.png b/libede/res/actions/system-log-out.png
new file mode 100644 (file)
index 0000000..0010931
Binary files /dev/null and b/libede/res/actions/system-log-out.png differ
diff --git a/libede/res/actions/system-search.png b/libede/res/actions/system-search.png
new file mode 100644 (file)
index 0000000..fd7f0b0
Binary files /dev/null and b/libede/res/actions/system-search.png differ
diff --git a/libede/res/actions/system-shutdown.png b/libede/res/actions/system-shutdown.png
new file mode 100644 (file)
index 0000000..afe62de
Binary files /dev/null and b/libede/res/actions/system-shutdown.png differ
diff --git a/libede/res/actions/tab-new.png b/libede/res/actions/tab-new.png
new file mode 100644 (file)
index 0000000..3e590f6
Binary files /dev/null and b/libede/res/actions/tab-new.png differ
diff --git a/libede/res/actions/view-fullscreen.png b/libede/res/actions/view-fullscreen.png
new file mode 100644 (file)
index 0000000..ffdabd4
Binary files /dev/null and b/libede/res/actions/view-fullscreen.png differ
diff --git a/libede/res/actions/view-refresh.png b/libede/res/actions/view-refresh.png
new file mode 100644 (file)
index 0000000..3fd71d6
Binary files /dev/null and b/libede/res/actions/view-refresh.png differ
diff --git a/libede/res/actions/window-new.png b/libede/res/actions/window-new.png
new file mode 100644 (file)
index 0000000..0e12ef9
Binary files /dev/null and b/libede/res/actions/window-new.png differ
diff --git a/libede/res/apps/accessories-calculator.png b/libede/res/apps/accessories-calculator.png
new file mode 100644 (file)
index 0000000..9248971
Binary files /dev/null and b/libede/res/apps/accessories-calculator.png differ
diff --git a/libede/res/apps/accessories-character-map.png b/libede/res/apps/accessories-character-map.png
new file mode 100644 (file)
index 0000000..5dd1124
Binary files /dev/null and b/libede/res/apps/accessories-character-map.png differ
diff --git a/libede/res/apps/accessories-text-editor.png b/libede/res/apps/accessories-text-editor.png
new file mode 100644 (file)
index 0000000..188e1c1
Binary files /dev/null and b/libede/res/apps/accessories-text-editor.png differ
diff --git a/libede/res/apps/help-browser.png b/libede/res/apps/help-browser.png
new file mode 100644 (file)
index 0000000..f25fc3f
Binary files /dev/null and b/libede/res/apps/help-browser.png differ
diff --git a/libede/res/apps/internet-group-chat.png b/libede/res/apps/internet-group-chat.png
new file mode 100644 (file)
index 0000000..f6e8325
Binary files /dev/null and b/libede/res/apps/internet-group-chat.png differ
diff --git a/libede/res/apps/internet-mail.png b/libede/res/apps/internet-mail.png
new file mode 100644 (file)
index 0000000..859251f
Binary files /dev/null and b/libede/res/apps/internet-mail.png differ
diff --git a/libede/res/apps/internet-news-reader.png b/libede/res/apps/internet-news-reader.png
new file mode 100644 (file)
index 0000000..a9850ee
Binary files /dev/null and b/libede/res/apps/internet-news-reader.png differ
diff --git a/libede/res/apps/internet-web-browser.png b/libede/res/apps/internet-web-browser.png
new file mode 100644 (file)
index 0000000..ac5957a
Binary files /dev/null and b/libede/res/apps/internet-web-browser.png differ
diff --git a/libede/res/apps/office-calendar.png b/libede/res/apps/office-calendar.png
new file mode 100644 (file)
index 0000000..106a592
Binary files /dev/null and b/libede/res/apps/office-calendar.png differ
diff --git a/libede/res/apps/preferences-desktop-accessibility.png b/libede/res/apps/preferences-desktop-accessibility.png
new file mode 100644 (file)
index 0000000..b365c27
Binary files /dev/null and b/libede/res/apps/preferences-desktop-accessibility.png differ
diff --git a/libede/res/apps/preferences-desktop-assistive-technology.png b/libede/res/apps/preferences-desktop-assistive-technology.png
new file mode 100644 (file)
index 0000000..513d817
Binary files /dev/null and b/libede/res/apps/preferences-desktop-assistive-technology.png differ
diff --git a/libede/res/apps/preferences-desktop-font.png b/libede/res/apps/preferences-desktop-font.png
new file mode 100644 (file)
index 0000000..18a0149
Binary files /dev/null and b/libede/res/apps/preferences-desktop-font.png differ
diff --git a/libede/res/apps/preferences-desktop-keyboard-shortcuts.png b/libede/res/apps/preferences-desktop-keyboard-shortcuts.png
new file mode 100644 (file)
index 0000000..291dc1a
Binary files /dev/null and b/libede/res/apps/preferences-desktop-keyboard-shortcuts.png differ
diff --git a/libede/res/apps/preferences-desktop-locale.png b/libede/res/apps/preferences-desktop-locale.png
new file mode 100644 (file)
index 0000000..5ef73a6
Binary files /dev/null and b/libede/res/apps/preferences-desktop-locale.png differ
diff --git a/libede/res/apps/preferences-desktop-multimedia.png b/libede/res/apps/preferences-desktop-multimedia.png
new file mode 100644 (file)
index 0000000..2e5ba43
Binary files /dev/null and b/libede/res/apps/preferences-desktop-multimedia.png differ
diff --git a/libede/res/apps/preferences-desktop-remote-desktop.png b/libede/res/apps/preferences-desktop-remote-desktop.png
new file mode 100644 (file)
index 0000000..b790f63
Binary files /dev/null and b/libede/res/apps/preferences-desktop-remote-desktop.png differ
diff --git a/libede/res/apps/preferences-desktop-screensaver.png b/libede/res/apps/preferences-desktop-screensaver.png
new file mode 100644 (file)
index 0000000..dc297db
Binary files /dev/null and b/libede/res/apps/preferences-desktop-screensaver.png differ
diff --git a/libede/res/apps/preferences-desktop-theme.png b/libede/res/apps/preferences-desktop-theme.png
new file mode 100644 (file)
index 0000000..fbea772
Binary files /dev/null and b/libede/res/apps/preferences-desktop-theme.png differ
diff --git a/libede/res/apps/preferences-desktop-wallpaper.png b/libede/res/apps/preferences-desktop-wallpaper.png
new file mode 100644 (file)
index 0000000..e7cc834
Binary files /dev/null and b/libede/res/apps/preferences-desktop-wallpaper.png differ
diff --git a/libede/res/apps/preferences-system-network-proxy.png b/libede/res/apps/preferences-system-network-proxy.png
new file mode 100644 (file)
index 0000000..bdeb79d
Binary files /dev/null and b/libede/res/apps/preferences-system-network-proxy.png differ
diff --git a/libede/res/apps/preferences-system-session.png b/libede/res/apps/preferences-system-session.png
new file mode 100644 (file)
index 0000000..35f8b57
Binary files /dev/null and b/libede/res/apps/preferences-system-session.png differ
diff --git a/libede/res/apps/preferences-system-windows.png b/libede/res/apps/preferences-system-windows.png
new file mode 100644 (file)
index 0000000..596caf9
Binary files /dev/null and b/libede/res/apps/preferences-system-windows.png differ
diff --git a/libede/res/apps/system-file-manager.png b/libede/res/apps/system-file-manager.png
new file mode 100644 (file)
index 0000000..60cade4
Binary files /dev/null and b/libede/res/apps/system-file-manager.png differ
diff --git a/libede/res/apps/system-installer.png b/libede/res/apps/system-installer.png
new file mode 100644 (file)
index 0000000..d16abcb
Binary files /dev/null and b/libede/res/apps/system-installer.png differ
diff --git a/libede/res/apps/system-software-update.png b/libede/res/apps/system-software-update.png
new file mode 100644 (file)
index 0000000..58f19c6
Binary files /dev/null and b/libede/res/apps/system-software-update.png differ
diff --git a/libede/res/apps/system-users.png b/libede/res/apps/system-users.png
new file mode 100644 (file)
index 0000000..9d2d500
Binary files /dev/null and b/libede/res/apps/system-users.png differ
diff --git a/libede/res/apps/utilities-system-monitor.png b/libede/res/apps/utilities-system-monitor.png
new file mode 100644 (file)
index 0000000..8734e77
Binary files /dev/null and b/libede/res/apps/utilities-system-monitor.png differ
diff --git a/libede/res/apps/utilities-terminal.png b/libede/res/apps/utilities-terminal.png
new file mode 100644 (file)
index 0000000..c5b797a
Binary files /dev/null and b/libede/res/apps/utilities-terminal.png differ
diff --git a/libede/res/categories/applications-accessories.png b/libede/res/categories/applications-accessories.png
new file mode 100644 (file)
index 0000000..c8d899c
Binary files /dev/null and b/libede/res/categories/applications-accessories.png differ
diff --git a/libede/res/categories/applications-development.png b/libede/res/categories/applications-development.png
new file mode 100644 (file)
index 0000000..4375227
Binary files /dev/null and b/libede/res/categories/applications-development.png differ
diff --git a/libede/res/categories/applications-games.png b/libede/res/categories/applications-games.png
new file mode 100644 (file)
index 0000000..4ba874b
Binary files /dev/null and b/libede/res/categories/applications-games.png differ
diff --git a/libede/res/categories/applications-graphics.png b/libede/res/categories/applications-graphics.png
new file mode 100644 (file)
index 0000000..4bb955f
Binary files /dev/null and b/libede/res/categories/applications-graphics.png differ
diff --git a/libede/res/categories/applications-internet.png b/libede/res/categories/applications-internet.png
new file mode 100644 (file)
index 0000000..a588968
Binary files /dev/null and b/libede/res/categories/applications-internet.png differ
diff --git a/libede/res/categories/applications-multimedia.png b/libede/res/categories/applications-multimedia.png
new file mode 100644 (file)
index 0000000..3e4ced5
Binary files /dev/null and b/libede/res/categories/applications-multimedia.png differ
diff --git a/libede/res/categories/applications-office.png b/libede/res/categories/applications-office.png
new file mode 100644 (file)
index 0000000..f9b3bb9
Binary files /dev/null and b/libede/res/categories/applications-office.png differ
diff --git a/libede/res/categories/applications-other.png b/libede/res/categories/applications-other.png
new file mode 100644 (file)
index 0000000..0d49f9d
Binary files /dev/null and b/libede/res/categories/applications-other.png differ
diff --git a/libede/res/categories/applications-system.png b/libede/res/categories/applications-system.png
new file mode 100644 (file)
index 0000000..d90ab66
Binary files /dev/null and b/libede/res/categories/applications-system.png differ
diff --git a/libede/res/categories/preferences-desktop-peripherals.png b/libede/res/categories/preferences-desktop-peripherals.png
new file mode 100644 (file)
index 0000000..2a63cee
Binary files /dev/null and b/libede/res/categories/preferences-desktop-peripherals.png differ
diff --git a/libede/res/categories/preferences-desktop.png b/libede/res/categories/preferences-desktop.png
new file mode 100644 (file)
index 0000000..68f916c
Binary files /dev/null and b/libede/res/categories/preferences-desktop.png differ
diff --git a/libede/res/categories/preferences-system.png b/libede/res/categories/preferences-system.png
new file mode 100644 (file)
index 0000000..9460dfc
Binary files /dev/null and b/libede/res/categories/preferences-system.png differ
diff --git a/libede/res/devices/audio-card.png b/libede/res/devices/audio-card.png
new file mode 100644 (file)
index 0000000..aaa7907
Binary files /dev/null and b/libede/res/devices/audio-card.png differ
diff --git a/libede/res/devices/audio-input-microphone.png b/libede/res/devices/audio-input-microphone.png
new file mode 100644 (file)
index 0000000..53a0393
Binary files /dev/null and b/libede/res/devices/audio-input-microphone.png differ
diff --git a/libede/res/devices/battery.png b/libede/res/devices/battery.png
new file mode 100644 (file)
index 0000000..8684e2a
Binary files /dev/null and b/libede/res/devices/battery.png differ
diff --git a/libede/res/devices/camera-photo.png b/libede/res/devices/camera-photo.png
new file mode 100644 (file)
index 0000000..1e8e886
Binary files /dev/null and b/libede/res/devices/camera-photo.png differ
diff --git a/libede/res/devices/camera-video.png b/libede/res/devices/camera-video.png
new file mode 100644 (file)
index 0000000..98fc211
Binary files /dev/null and b/libede/res/devices/camera-video.png differ
diff --git a/libede/res/devices/computer.png b/libede/res/devices/computer.png
new file mode 100644 (file)
index 0000000..d0b397b
Binary files /dev/null and b/libede/res/devices/computer.png differ
diff --git a/libede/res/devices/drive-harddisk.png b/libede/res/devices/drive-harddisk.png
new file mode 100644 (file)
index 0000000..5c3b858
Binary files /dev/null and b/libede/res/devices/drive-harddisk.png differ
diff --git a/libede/res/devices/drive-optical.png b/libede/res/devices/drive-optical.png
new file mode 100644 (file)
index 0000000..4ced6fe
Binary files /dev/null and b/libede/res/devices/drive-optical.png differ
diff --git a/libede/res/devices/drive-removable-media.png b/libede/res/devices/drive-removable-media.png
new file mode 100644 (file)
index 0000000..9153898
Binary files /dev/null and b/libede/res/devices/drive-removable-media.png differ
diff --git a/libede/res/devices/input-gaming.png b/libede/res/devices/input-gaming.png
new file mode 100644 (file)
index 0000000..9d040ee
Binary files /dev/null and b/libede/res/devices/input-gaming.png differ
diff --git a/libede/res/devices/input-keyboard.png b/libede/res/devices/input-keyboard.png
new file mode 100644 (file)
index 0000000..fab414b
Binary files /dev/null and b/libede/res/devices/input-keyboard.png differ
diff --git a/libede/res/devices/input-mouse.png b/libede/res/devices/input-mouse.png
new file mode 100644 (file)
index 0000000..eeda4db
Binary files /dev/null and b/libede/res/devices/input-mouse.png differ
diff --git a/libede/res/devices/media-flash.png b/libede/res/devices/media-flash.png
new file mode 100644 (file)
index 0000000..bef542a
Binary files /dev/null and b/libede/res/devices/media-flash.png differ
diff --git a/libede/res/devices/media-floppy.png b/libede/res/devices/media-floppy.png
new file mode 100644 (file)
index 0000000..f1d7a19
Binary files /dev/null and b/libede/res/devices/media-floppy.png differ
diff --git a/libede/res/devices/media-optical.png b/libede/res/devices/media-optical.png
new file mode 100644 (file)
index 0000000..760de93
Binary files /dev/null and b/libede/res/devices/media-optical.png differ
diff --git a/libede/res/devices/multimedia-player.png b/libede/res/devices/multimedia-player.png
new file mode 100644 (file)
index 0000000..461e9de
Binary files /dev/null and b/libede/res/devices/multimedia-player.png differ
diff --git a/libede/res/devices/network-wired.png b/libede/res/devices/network-wired.png
new file mode 100644 (file)
index 0000000..3ac6b35
Binary files /dev/null and b/libede/res/devices/network-wired.png differ
diff --git a/libede/res/devices/network-wireless.png b/libede/res/devices/network-wireless.png
new file mode 100644 (file)
index 0000000..2dc6250
Binary files /dev/null and b/libede/res/devices/network-wireless.png differ
diff --git a/libede/res/devices/printer.png b/libede/res/devices/printer.png
new file mode 100644 (file)
index 0000000..12a4e39
Binary files /dev/null and b/libede/res/devices/printer.png differ
diff --git a/libede/res/devices/video-display.png b/libede/res/devices/video-display.png
new file mode 100644 (file)
index 0000000..226881f
Binary files /dev/null and b/libede/res/devices/video-display.png differ
diff --git a/libede/res/emblem-not.png b/libede/res/emblem-not.png
new file mode 100644 (file)
index 0000000..052e07e
Binary files /dev/null and b/libede/res/emblem-not.png differ
diff --git a/libede/res/emblems/emblem-favorite.png b/libede/res/emblems/emblem-favorite.png
new file mode 100644 (file)
index 0000000..3acb57d
Binary files /dev/null and b/libede/res/emblems/emblem-favorite.png differ
diff --git a/libede/res/emblems/emblem-important.png b/libede/res/emblems/emblem-important.png
new file mode 100644 (file)
index 0000000..81e9ed2
Binary files /dev/null and b/libede/res/emblems/emblem-important.png differ
diff --git a/libede/res/emblems/emblem-photos.png b/libede/res/emblems/emblem-photos.png
new file mode 100644 (file)
index 0000000..ab40463
Binary files /dev/null and b/libede/res/emblems/emblem-photos.png differ
diff --git a/libede/res/emblems/emblem-readonly.png b/libede/res/emblems/emblem-readonly.png
new file mode 100644 (file)
index 0000000..0466619
Binary files /dev/null and b/libede/res/emblems/emblem-readonly.png differ
diff --git a/libede/res/emblems/emblem-symbolic-link.png b/libede/res/emblems/emblem-symbolic-link.png
new file mode 100644 (file)
index 0000000..800b9e8
Binary files /dev/null and b/libede/res/emblems/emblem-symbolic-link.png differ
diff --git a/libede/res/emblems/emblem-system.png b/libede/res/emblems/emblem-system.png
new file mode 100644 (file)
index 0000000..259ed26
Binary files /dev/null and b/libede/res/emblems/emblem-system.png differ
diff --git a/libede/res/emblems/emblem-unreadable.png b/libede/res/emblems/emblem-unreadable.png
new file mode 100644 (file)
index 0000000..5c08b05
Binary files /dev/null and b/libede/res/emblems/emblem-unreadable.png differ
diff --git a/libede/res/emotes/face-angel.png b/libede/res/emotes/face-angel.png
new file mode 100644 (file)
index 0000000..d2c5e94
Binary files /dev/null and b/libede/res/emotes/face-angel.png differ
diff --git a/libede/res/emotes/face-crying.png b/libede/res/emotes/face-crying.png
new file mode 100644 (file)
index 0000000..2620dab
Binary files /dev/null and b/libede/res/emotes/face-crying.png differ
diff --git a/libede/res/emotes/face-devilish.png b/libede/res/emotes/face-devilish.png
new file mode 100644 (file)
index 0000000..6edf683
Binary files /dev/null and b/libede/res/emotes/face-devilish.png differ
diff --git a/libede/res/emotes/face-glasses.png b/libede/res/emotes/face-glasses.png
new file mode 100644 (file)
index 0000000..00c2cd4
Binary files /dev/null and b/libede/res/emotes/face-glasses.png differ
diff --git a/libede/res/emotes/face-grin.png b/libede/res/emotes/face-grin.png
new file mode 100644 (file)
index 0000000..0d013d5
Binary files /dev/null and b/libede/res/emotes/face-grin.png differ
diff --git a/libede/res/emotes/face-kiss.png b/libede/res/emotes/face-kiss.png
new file mode 100644 (file)
index 0000000..809c1cf
Binary files /dev/null and b/libede/res/emotes/face-kiss.png differ
diff --git a/libede/res/emotes/face-monkey.png b/libede/res/emotes/face-monkey.png
new file mode 100644 (file)
index 0000000..69db8fa
Binary files /dev/null and b/libede/res/emotes/face-monkey.png differ
diff --git a/libede/res/emotes/face-plain.png b/libede/res/emotes/face-plain.png
new file mode 100644 (file)
index 0000000..31cf984
Binary files /dev/null and b/libede/res/emotes/face-plain.png differ
diff --git a/libede/res/emotes/face-sad.png b/libede/res/emotes/face-sad.png
new file mode 100644 (file)
index 0000000..159c04b
Binary files /dev/null and b/libede/res/emotes/face-sad.png differ
diff --git a/libede/res/emotes/face-smile-big.png b/libede/res/emotes/face-smile-big.png
new file mode 100644 (file)
index 0000000..9114fde
Binary files /dev/null and b/libede/res/emotes/face-smile-big.png differ
diff --git a/libede/res/emotes/face-smile.png b/libede/res/emotes/face-smile.png
new file mode 100644 (file)
index 0000000..de862b1
Binary files /dev/null and b/libede/res/emotes/face-smile.png differ
diff --git a/libede/res/emotes/face-surprise.png b/libede/res/emotes/face-surprise.png
new file mode 100644 (file)
index 0000000..4b4d423
Binary files /dev/null and b/libede/res/emotes/face-surprise.png differ
diff --git a/libede/res/emotes/face-wink.png b/libede/res/emotes/face-wink.png
new file mode 100644 (file)
index 0000000..e2db57e
Binary files /dev/null and b/libede/res/emotes/face-wink.png differ
diff --git a/libede/res/mimetypes/application-certificate.png b/libede/res/mimetypes/application-certificate.png
new file mode 100644 (file)
index 0000000..486913d
Binary files /dev/null and b/libede/res/mimetypes/application-certificate.png differ
diff --git a/libede/res/mimetypes/application-x-executable.png b/libede/res/mimetypes/application-x-executable.png
new file mode 100644 (file)
index 0000000..003ded2
Binary files /dev/null and b/libede/res/mimetypes/application-x-executable.png differ
diff --git a/libede/res/mimetypes/audio-x-generic.png b/libede/res/mimetypes/audio-x-generic.png
new file mode 100644 (file)
index 0000000..2bd5af9
Binary files /dev/null and b/libede/res/mimetypes/audio-x-generic.png differ
diff --git a/libede/res/mimetypes/font-x-generic.png b/libede/res/mimetypes/font-x-generic.png
new file mode 100644 (file)
index 0000000..bdbc1a8
Binary files /dev/null and b/libede/res/mimetypes/font-x-generic.png differ
diff --git a/libede/res/mimetypes/image-x-generic.png b/libede/res/mimetypes/image-x-generic.png
new file mode 100644 (file)
index 0000000..68da502
Binary files /dev/null and b/libede/res/mimetypes/image-x-generic.png differ
diff --git a/libede/res/mimetypes/package-x-generic.png b/libede/res/mimetypes/package-x-generic.png
new file mode 100644 (file)
index 0000000..9015426
Binary files /dev/null and b/libede/res/mimetypes/package-x-generic.png differ
diff --git a/libede/res/mimetypes/text-html.png b/libede/res/mimetypes/text-html.png
new file mode 100644 (file)
index 0000000..53014ab
Binary files /dev/null and b/libede/res/mimetypes/text-html.png differ
diff --git a/libede/res/mimetypes/text-x-generic-template.png b/libede/res/mimetypes/text-x-generic-template.png
new file mode 100644 (file)
index 0000000..a0cc462
Binary files /dev/null and b/libede/res/mimetypes/text-x-generic-template.png differ
diff --git a/libede/res/mimetypes/text-x-generic.png b/libede/res/mimetypes/text-x-generic.png
new file mode 100644 (file)
index 0000000..2d7f2d6
Binary files /dev/null and b/libede/res/mimetypes/text-x-generic.png differ
diff --git a/libede/res/mimetypes/text-x-script.png b/libede/res/mimetypes/text-x-script.png
new file mode 100644 (file)
index 0000000..c923098
Binary files /dev/null and b/libede/res/mimetypes/text-x-script.png differ
diff --git a/libede/res/mimetypes/video-x-generic.png b/libede/res/mimetypes/video-x-generic.png
new file mode 100644 (file)
index 0000000..64e7a30
Binary files /dev/null and b/libede/res/mimetypes/video-x-generic.png differ
diff --git a/libede/res/mimetypes/x-office-address-book.png b/libede/res/mimetypes/x-office-address-book.png
new file mode 100644 (file)
index 0000000..f3b5d9d
Binary files /dev/null and b/libede/res/mimetypes/x-office-address-book.png differ
diff --git a/libede/res/mimetypes/x-office-calendar.png b/libede/res/mimetypes/x-office-calendar.png
new file mode 100644 (file)
index 0000000..f6978d7
Binary files /dev/null and b/libede/res/mimetypes/x-office-calendar.png differ
diff --git a/libede/res/mimetypes/x-office-document-template.png b/libede/res/mimetypes/x-office-document-template.png
new file mode 100644 (file)
index 0000000..d1d9e7c
Binary files /dev/null and b/libede/res/mimetypes/x-office-document-template.png differ
diff --git a/libede/res/mimetypes/x-office-document.png b/libede/res/mimetypes/x-office-document.png
new file mode 100644 (file)
index 0000000..d18082e
Binary files /dev/null and b/libede/res/mimetypes/x-office-document.png differ
diff --git a/libede/res/mimetypes/x-office-drawing-template.png b/libede/res/mimetypes/x-office-drawing-template.png
new file mode 100644 (file)
index 0000000..dc384db
Binary files /dev/null and b/libede/res/mimetypes/x-office-drawing-template.png differ
diff --git a/libede/res/mimetypes/x-office-drawing.png b/libede/res/mimetypes/x-office-drawing.png
new file mode 100644 (file)
index 0000000..ffbb9e4
Binary files /dev/null and b/libede/res/mimetypes/x-office-drawing.png differ
diff --git a/libede/res/mimetypes/x-office-presentation-template.png b/libede/res/mimetypes/x-office-presentation-template.png
new file mode 100644 (file)
index 0000000..d90d034
Binary files /dev/null and b/libede/res/mimetypes/x-office-presentation-template.png differ
diff --git a/libede/res/mimetypes/x-office-presentation.png b/libede/res/mimetypes/x-office-presentation.png
new file mode 100644 (file)
index 0000000..f7ea302
Binary files /dev/null and b/libede/res/mimetypes/x-office-presentation.png differ
diff --git a/libede/res/mimetypes/x-office-spreadsheet-template.png b/libede/res/mimetypes/x-office-spreadsheet-template.png
new file mode 100644 (file)
index 0000000..e8bf570
Binary files /dev/null and b/libede/res/mimetypes/x-office-spreadsheet-template.png differ
diff --git a/libede/res/mimetypes/x-office-spreadsheet.png b/libede/res/mimetypes/x-office-spreadsheet.png
new file mode 100644 (file)
index 0000000..a6b1268
Binary files /dev/null and b/libede/res/mimetypes/x-office-spreadsheet.png differ
diff --git a/libede/res/places/folder-remote.png b/libede/res/places/folder-remote.png
new file mode 100644 (file)
index 0000000..5234eab
Binary files /dev/null and b/libede/res/places/folder-remote.png differ
diff --git a/libede/res/places/folder-saved-search.png b/libede/res/places/folder-saved-search.png
new file mode 100644 (file)
index 0000000..ca24a36
Binary files /dev/null and b/libede/res/places/folder-saved-search.png differ
diff --git a/libede/res/places/folder.png b/libede/res/places/folder.png
new file mode 100644 (file)
index 0000000..65bd0bb
Binary files /dev/null and b/libede/res/places/folder.png differ
diff --git a/libede/res/places/network-server.png b/libede/res/places/network-server.png
new file mode 100644 (file)
index 0000000..068ffeb
Binary files /dev/null and b/libede/res/places/network-server.png differ
diff --git a/libede/res/places/network-workgroup.png b/libede/res/places/network-workgroup.png
new file mode 100644 (file)
index 0000000..5c140d8
Binary files /dev/null and b/libede/res/places/network-workgroup.png differ
diff --git a/libede/res/places/start-here.png b/libede/res/places/start-here.png
new file mode 100644 (file)
index 0000000..bd516a5
Binary files /dev/null and b/libede/res/places/start-here.png differ
diff --git a/libede/res/places/user-desktop.png b/libede/res/places/user-desktop.png
new file mode 100644 (file)
index 0000000..4c9787c
Binary files /dev/null and b/libede/res/places/user-desktop.png differ
diff --git a/libede/res/places/user-home.png b/libede/res/places/user-home.png
new file mode 100644 (file)
index 0000000..7b9110d
Binary files /dev/null and b/libede/res/places/user-home.png differ
diff --git a/libede/res/places/user-trash.png b/libede/res/places/user-trash.png
new file mode 100644 (file)
index 0000000..0e0953c
Binary files /dev/null and b/libede/res/places/user-trash.png differ
diff --git a/libede/res/status/audio-volume-high.png b/libede/res/status/audio-volume-high.png
new file mode 100644 (file)
index 0000000..ec8f00b
Binary files /dev/null and b/libede/res/status/audio-volume-high.png differ
diff --git a/libede/res/status/audio-volume-low.png b/libede/res/status/audio-volume-low.png
new file mode 100644 (file)
index 0000000..4d7239f
Binary files /dev/null and b/libede/res/status/audio-volume-low.png differ
diff --git a/libede/res/status/audio-volume-medium.png b/libede/res/status/audio-volume-medium.png
new file mode 100644 (file)
index 0000000..36ca7b0
Binary files /dev/null and b/libede/res/status/audio-volume-medium.png differ
diff --git a/libede/res/status/audio-volume-muted.png b/libede/res/status/audio-volume-muted.png
new file mode 100644 (file)
index 0000000..af5a97b
Binary files /dev/null and b/libede/res/status/audio-volume-muted.png differ
diff --git a/libede/res/status/battery-caution.png b/libede/res/status/battery-caution.png
new file mode 100644 (file)
index 0000000..53a27d1
Binary files /dev/null and b/libede/res/status/battery-caution.png differ
diff --git a/libede/res/status/dialog-error.png b/libede/res/status/dialog-error.png
new file mode 100644 (file)
index 0000000..3bbbb4a
Binary files /dev/null and b/libede/res/status/dialog-error.png differ
diff --git a/libede/res/status/dialog-information.png b/libede/res/status/dialog-information.png
new file mode 100644 (file)
index 0000000..8851b99
Binary files /dev/null and b/libede/res/status/dialog-information.png differ
diff --git a/libede/res/status/dialog-warning.png b/libede/res/status/dialog-warning.png
new file mode 100644 (file)
index 0000000..a9e4ff3
Binary files /dev/null and b/libede/res/status/dialog-warning.png differ
diff --git a/libede/res/status/folder-drag-accept.png b/libede/res/status/folder-drag-accept.png
new file mode 100644 (file)
index 0000000..44055dc
Binary files /dev/null and b/libede/res/status/folder-drag-accept.png differ
diff --git a/libede/res/status/folder-open.png b/libede/res/status/folder-open.png
new file mode 100644 (file)
index 0000000..b67403d
Binary files /dev/null and b/libede/res/status/folder-open.png differ
diff --git a/libede/res/status/folder-visiting.png b/libede/res/status/folder-visiting.png
new file mode 100644 (file)
index 0000000..9002444
Binary files /dev/null and b/libede/res/status/folder-visiting.png differ
diff --git a/libede/res/status/image-loading.png b/libede/res/status/image-loading.png
new file mode 100644 (file)
index 0000000..174994e
Binary files /dev/null and b/libede/res/status/image-loading.png differ
diff --git a/libede/res/status/image-missing.png b/libede/res/status/image-missing.png
new file mode 100644 (file)
index 0000000..a644f24
Binary files /dev/null and b/libede/res/status/image-missing.png differ
diff --git a/libede/res/status/mail-attachment.png b/libede/res/status/mail-attachment.png
new file mode 100644 (file)
index 0000000..529bb7f
Binary files /dev/null and b/libede/res/status/mail-attachment.png differ
diff --git a/libede/res/status/network-error.png b/libede/res/status/network-error.png
new file mode 100644 (file)
index 0000000..3f18ed0
Binary files /dev/null and b/libede/res/status/network-error.png differ
diff --git a/libede/res/status/network-idle.png b/libede/res/status/network-idle.png
new file mode 100644 (file)
index 0000000..0efee57
Binary files /dev/null and b/libede/res/status/network-idle.png differ
diff --git a/libede/res/status/network-offline.png b/libede/res/status/network-offline.png
new file mode 100644 (file)
index 0000000..1f210fc
Binary files /dev/null and b/libede/res/status/network-offline.png differ
diff --git a/libede/res/status/network-receive.png b/libede/res/status/network-receive.png
new file mode 100644 (file)
index 0000000..b57c65c
Binary files /dev/null and b/libede/res/status/network-receive.png differ
diff --git a/libede/res/status/network-transmit-receive.png b/libede/res/status/network-transmit-receive.png
new file mode 100644 (file)
index 0000000..271d37d
Binary files /dev/null and b/libede/res/status/network-transmit-receive.png differ
diff --git a/libede/res/status/network-transmit.png b/libede/res/status/network-transmit.png
new file mode 100644 (file)
index 0000000..08aa28b
Binary files /dev/null and b/libede/res/status/network-transmit.png differ
diff --git a/libede/res/status/network-wireless-encrypted.png b/libede/res/status/network-wireless-encrypted.png
new file mode 100644 (file)
index 0000000..c73e33c
Binary files /dev/null and b/libede/res/status/network-wireless-encrypted.png differ
diff --git a/libede/res/status/printer-error.png b/libede/res/status/printer-error.png
new file mode 100644 (file)
index 0000000..21d4ded
Binary files /dev/null and b/libede/res/status/printer-error.png differ
diff --git a/libede/res/status/software-update-available.png b/libede/res/status/software-update-available.png
new file mode 100644 (file)
index 0000000..ab8d494
Binary files /dev/null and b/libede/res/status/software-update-available.png differ
diff --git a/libede/res/status/software-update-urgent.png b/libede/res/status/software-update-urgent.png
new file mode 100644 (file)
index 0000000..433945d
Binary files /dev/null and b/libede/res/status/software-update-urgent.png differ
diff --git a/libede/res/status/user-trash-full.png b/libede/res/status/user-trash-full.png
new file mode 100644 (file)
index 0000000..695d215
Binary files /dev/null and b/libede/res/status/user-trash-full.png differ
diff --git a/libede/res/status/weather-clear-night.png b/libede/res/status/weather-clear-night.png
new file mode 100644 (file)
index 0000000..4345752
Binary files /dev/null and b/libede/res/status/weather-clear-night.png differ
diff --git a/libede/res/status/weather-clear.png b/libede/res/status/weather-clear.png
new file mode 100644 (file)
index 0000000..7dc15ea
Binary files /dev/null and b/libede/res/status/weather-clear.png differ
diff --git a/libede/res/status/weather-few-clouds-night.png b/libede/res/status/weather-few-clouds-night.png
new file mode 100644 (file)
index 0000000..d69efec
Binary files /dev/null and b/libede/res/status/weather-few-clouds-night.png differ
diff --git a/libede/res/status/weather-few-clouds.png b/libede/res/status/weather-few-clouds.png
new file mode 100644 (file)
index 0000000..0e633a3
Binary files /dev/null and b/libede/res/status/weather-few-clouds.png differ
diff --git a/libede/res/status/weather-overcast.png b/libede/res/status/weather-overcast.png
new file mode 100644 (file)
index 0000000..0045129
Binary files /dev/null and b/libede/res/status/weather-overcast.png differ
diff --git a/libede/res/status/weather-severe-alert.png b/libede/res/status/weather-severe-alert.png
new file mode 100644 (file)
index 0000000..98e9f6c
Binary files /dev/null and b/libede/res/status/weather-severe-alert.png differ
diff --git a/libede/res/status/weather-showers-scattered.png b/libede/res/status/weather-showers-scattered.png
new file mode 100644 (file)
index 0000000..8d10d84
Binary files /dev/null and b/libede/res/status/weather-showers-scattered.png differ
diff --git a/libede/res/status/weather-showers.png b/libede/res/status/weather-showers.png
new file mode 100644 (file)
index 0000000..d9685d2
Binary files /dev/null and b/libede/res/status/weather-showers.png differ
diff --git a/libede/res/status/weather-snow.png b/libede/res/status/weather-snow.png
new file mode 100644 (file)
index 0000000..a83d855
Binary files /dev/null and b/libede/res/status/weather-snow.png differ
diff --git a/libede/res/status/weather-storm.png b/libede/res/status/weather-storm.png
new file mode 100644 (file)
index 0000000..feebe1d
Binary files /dev/null and b/libede/res/status/weather-storm.png differ
index fda27fa..36e6b7b 100644 (file)
@@ -1,4 +1,5 @@
 public import "ecere"
 public import "ecere"
+import "FileSystemCache"
 
 #ifdef __WIN32__
 static char * rootName = "Entire Computer";
 
 #ifdef __WIN32__
 static char * rootName = "Entire Computer";
@@ -11,7 +12,13 @@ private:
 define guiApp = (GuiApplication)((__thisModule).application);
 define selectionColor = guiApp.currentSkin.selectionColor; //Color { 10, 36, 106 };
 
 define guiApp = (GuiApplication)((__thisModule).application);
 define selectionColor = guiApp.currentSkin.selectionColor; //Color { 10, 36, 106 };
 
-static char * fileIconNames[] = 
+void MessageBoxTodo(char * message)
+{
+   PrintLn("MessageBoxTodo(char * message) -- ", message);
+   MessageBox { type = ok, text = "MessageBoxTodo(char * message)", contents = message }.Modal();
+}
+
+static char * fileIconNames[] =
 {
    "<:ecere>mimeTypes/file.png",         /* none */
 
 {
    "<:ecere>mimeTypes/file.png",         /* none */
 
@@ -50,6 +57,25 @@ static char * fileIconNames[] =
    ""
 };
 
    ""
 };
 
+define countOfCompIconNames = 6;
+static char * compIconNames[] =
+{
+/*
+   "<:ede>a.png",
+   "<:ede>b.png",
+   "<:ede>c.png",
+   "<:ede>d.png",
+   "<:ede>not.png",
+*/
+   "<:ede>devices/media-optical.png",
+   "<:ede>devices/media-flash.png",
+   "<:ede>places/network-server.png",
+   "<:ede>places/folder-saved-search.png",
+   "<:ede>places/user-home.png",
+   "<:ede>emblem-not.png",
+   ""
+};
+
 public enum _FileType
 {
    none,
 public enum _FileType
 {
    none,
@@ -137,14 +163,20 @@ public enum _FileType
    }
 };
 
    }
 };
 
+public enum FileSystemBoxMode { directory, list };
+
 class FileSystemBoxBits
 {
    bool foldersOnly:1, filesOnly:1, details:1, pathColumn:1, treeBranches:1, previewPictures:1, navigateFolders:1, autoLoad:1;
    bool preview:1;
 class FileSystemBoxBits
 {
    bool foldersOnly:1, filesOnly:1, details:1, pathColumn:1, treeBranches:1, previewPictures:1, navigateFolders:1, autoLoad:1;
    bool preview:1;
+   bool columnsCompareStyle:1;
    //bool header:1, freeSelect:1, fullRowSelect:1, multiSelect:1, autoScroll:1, alwaysHL : 1, moveRows:1, resizable:1;
    //bool moveFields:1, clearHeader:1, alwaysEdit:1, collapse:1, treeBranch:1, rootCollapse:1, heightSet:1;
    //bool sortable:1, noDragging:1, fillLastField:1, expandOnAdd:1;
    //bool header:1, freeSelect:1, fullRowSelect:1, multiSelect:1, autoScroll:1, alwaysHL : 1, moveRows:1, resizable:1;
    //bool moveFields:1, clearHeader:1, alwaysEdit:1, collapse:1, treeBranch:1, rootCollapse:1, heightSet:1;
    //bool sortable:1, noDragging:1, fillLastField:1, expandOnAdd:1;
-};
+   bool textFileLinesStyle:1;
+
+   FileSystemBoxMode mode:2;
+}
 
 public class FileSystemBox : Window // should we not derive from ListBox instead?
                                     // I say we should, but we can't right now...
 
 public class FileSystemBox : Window // should we not derive from ListBox instead?
                                     // I say we should, but we can't right now...
@@ -172,9 +204,14 @@ public:
    FileSystemNode root;
    FileSystemBoxSelection selection { };
 
    FileSystemNode root;
    FileSystemBoxSelection selection { };
 
+   subclass(InterfaceFileSystemIterator) iteratorClass;
+   FileSystemCache cache;
+
    virtual bool Window::NotifyNodeSelect(FileSystemBox box, FileSystemBoxSelection selection);
    //virtual bool Window::NotifyNodeNavigate(FileSystemBox box, FileSystemNode node);
    virtual bool Window::NotifyNodeOpen(FileSystemBox box, FileSystemBoxSelection selection);
    virtual bool Window::NotifyNodeSelect(FileSystemBox box, FileSystemBoxSelection selection);
    //virtual bool Window::NotifyNodeNavigate(FileSystemBox box, FileSystemNode node);
    virtual bool Window::NotifyNodeOpen(FileSystemBox box, FileSystemBoxSelection selection);
+   virtual bool Window::NotifyNodeMenu(FileSystemBox box, Menu menu, FileSystemBoxSelection selection);
+   virtual bool Window::NotifyIteratorInit(FileSystemBox box, FileSystemIterator fileSystemIterator);
    
    property char * path
    {
    
    property char * path
    {
@@ -188,11 +225,27 @@ public:
          if(created)
             Load();
       }
          if(created)
             Load();
       }
-
       get { return path; }
       //isset { return path && path[0]; }
    }
 
       get { return path; }
       //isset { return path && path[0]; }
    }
 
+   property Array<String> comparedPaths
+   {
+      set
+      {
+         delete comparedPaths;
+         if(value && value.count)
+            comparedPaths = value;
+         if(locationBox)
+            locationBox.path = value[0];
+         if(created)
+            Load();
+      }
+      get { return comparedPaths; }
+      //isset { return comparedPaths && comparedPaths.count; }
+   }
+
+   property FileSystemBoxMode mode { set { bits.mode = value; } get { return bits.mode; } };
    property bool foldersOnly { set { bits.foldersOnly = value; bits.filesOnly = !value; } get { return bits.foldersOnly; } };
    property bool filesOnly { set { bits.filesOnly = value; bits.foldersOnly = !value; } get { return bits.filesOnly; } };
    property bool previewPictures { set { bits.previewPictures = value; } get { return bits.previewPictures; } };
    property bool foldersOnly { set { bits.foldersOnly = value; bits.filesOnly = !value; } get { return bits.foldersOnly; } };
    property bool filesOnly { set { bits.filesOnly = value; bits.foldersOnly = !value; } get { return bits.filesOnly; } };
    property bool previewPictures { set { bits.previewPictures = value; } get { return bits.previewPictures; } };
@@ -227,6 +280,8 @@ public:
       }
       get { return bits.preview; }
    };
       }
       get { return bits.preview; }
    };
+   property bool columnsCompareStyle { set { bits.columnsCompareStyle = value; } get { return bits.columnsCompareStyle; } };
+   property bool textFileLinesStyle { set { bits.textFileLinesStyle = value; } get { return bits.textFileLinesStyle; } };
    
    property FileSystemNode node
    {
    
    property FileSystemNode node
    {
@@ -360,26 +415,66 @@ public:
       Load();
    }
 
       Load();
    }
 
+   bool MenuOpen(MenuItem selection, Modifiers mods)
+   {
+      OpenNode();
+   }
+
+   bool MenuReplaceListItemByContainingDir(MenuItem selection, Modifiers mods)
+   {
+      bool result = true;
+      //FileSystemBoxSelection selection = this.selection.Copy(); // TOFIX compiler bug -- FileSystemBox.c -- ../libede/src/FileSystemBox.ec:420:49: error: â€˜selection’ redeclared as different kind of symbol        
+      FileSystemBoxSelection sel = this.selection.Copy();
+      FileSystemNode node = sel.node;
+      char newPath[MAX_LOCATION];
+      StripLastDirectory(node.path, newPath);
+      //node.path = newPath;
+      //node.
+      //if(node && node.type.isFolder && bits.navigateFolders)
+      //   property::path = node.path;
+      delete sel;
+      return result;
+   }
+
+   bool MenuReplaceListItemByChild(MenuItem selection, Modifiers mods)
+   {
+      bool result = true;
+      //FileSystemBoxSelection selection = this.selection.Copy(); // TOFIX compiler bug -- FileSystemBox.c -- ../libede/src/FileSystemBox.ec:420:49: error: â€˜selection’ redeclared as different kind of symbol        
+      FileSystemBoxSelection sel = this.selection.Copy();
+      FileSystemNode node = sel.node;
+      char newPath[MAX_LOCATION];
+      StripLastDirectory(node.path, newPath);
+      //node.path = newPath;
+      //node.
+      //if(node && node.type.isFolder && bits.navigateFolders)
+      //   property::path = node.path;
+      delete sel;
+      return result;
+   }
+
 private:
    FileSystemBoxBits bits;
 
    char * path;
    char * extensions;
 private:
    FileSystemBoxBits bits;
 
    char * path;
    char * extensions;
+   Array<String> comparedPaths;
 
    BitmapResource fileIcons[_FileType];
 
    BitmapResource fileIcons[_FileType];
+   BitmapResource compIcons[countOfCompIconNames]; // todo: fix this limitation
 
    Bitmap bitmap;
    //BitmapArray bitmaps { growingFactor = 16 };
 
    FileSystemBox()
    {
 
    Bitmap bitmap;
    //BitmapArray bitmaps { growingFactor = 16 };
 
    FileSystemBox()
    {
-      char wd[MAX_LOCATION];
-      GetWorkingDir(wd, sizeof(wd));
-      property::path = wd;
-      
+      path = CopyString("");
       InitFileIcons();
       InitFileIcons();
+      InitCompIcons(); // todo: these icons should not be initialize, they should be set
+                       //       or at least initalized when the comparison listing is requested
+                       //       and we know how many paths are being compared.
       list.AddField(nameField);
       bits.autoLoad = true;
       list.AddField(nameField);
       bits.autoLoad = true;
+      //iteratorClass = class(FileSystemIterator);
    }
 
    ~FileSystemBox()
    }
 
    ~FileSystemBox()
@@ -403,8 +498,18 @@ private:
       }
    }
 
       }
    }
 
-   DataField nameField { header = "Name", dataType = "FileSystemNode", width = 240, userData = this, freeData = false };
-   DataField pathField { header = "Location", dataType = /*"String"*/ "char *", width = 300, freeData = false };
+   void InitCompIcons()
+   {
+      _FileType c;
+      for(c = 0; c < countOfCompIconNames; c++)
+      {
+         compIcons[c] = BitmapResource { compIconNames[c], alphaBlend = true };
+         AddResource(compIcons[c]);
+      }
+   }
+
+   DataField nameField { header = "Name", dataType = "FileSystemNode", width = 240, userData = this, freeData = false/*, editable = true*/; };
+   DataField pathField { header = "Location", dataType = /*"String"*/ "char *", width = 300, freeData = true };
    DataField typeField { header = "Type", dataType = /*"String"*/ "char *", width = 40, freeData = false };
    DataField sizeField { header = "Size", dataType = "FileSize", width = 96, alignment = right, freeData = false };
    DataField modifiedField { header = "Modified", dataType = "SecSince1970", width = 96, alignment = right, freeData = false };
    DataField typeField { header = "Type", dataType = /*"String"*/ "char *", width = 40, freeData = false };
    DataField sizeField { header = "Size", dataType = "FileSize", width = 96, alignment = right, freeData = false };
    DataField modifiedField { header = "Modified", dataType = "SecSince1970", width = 96, alignment = right, freeData = false };
@@ -412,7 +517,15 @@ private:
    bool OnPostCreate()
    {
       if(bits.autoLoad)
    bool OnPostCreate()
    {
       if(bits.autoLoad)
+      {
+         if(!path)
+         {
+            char wd[MAX_LOCATION];
+            GetWorkingDir(wd, sizeof(wd));
+            property::path = wd;
+         }
          Load();
          Load();
+      }
       return true;
    }
 
       return true;
    }
 
@@ -480,19 +593,35 @@ private:
             FileSystemNode node = (FileSystemNode)row.tag;
             if(node)
             {
             FileSystemNode node = (FileSystemNode)row.tag;
             if(node)
             {
-               char * text;
-
                PopupMenu popup;
                Menu menu { };
 
                PopupMenu popup;
                Menu menu { };
 
-               text = PrintString("Open ", node.path);
+               if(NotifyNodeMenu)
+                  NotifyNodeMenu(master, this, menu, selection);
+               else
+               {
+                  char * text;
+
+                  text = PrintString("Open ", node.name);
+                  MenuItem { menu, text, o, NotifySelect = MenuOpen, disabled = false }; //delete text;
 
 
-               MenuItem { menu, text, o, NotifySelect = MenuOpen, disabled = false };
-               MenuItem { menu, "Cut\tCtrl+X", t, NotifySelect = null, disabled = false };
-               MenuItem { menu, "Copy\tCtrl+C", c, NotifySelect = null, disabled = false };
-               MenuItem { menu, "Paste\tCtrl+V", p, NotifySelect = null, disabled = false /*!clipboard*/ };
-               MenuItem { menu, "Delete\tDel", d, NotifySelect = null, disabled = false };
-               //MenuDivider { menu };
+                  if(node.bits.isListItem/* && TODO: unless node is at root location*/)
+                  {
+                     MenuDivider { menu };
+                     MenuItem { menu, "Replace by Parent\tCtrl+R", r, NotifySelect = MenuReplaceListItemByContainingDir, disabled = false };
+                  }
+                  else if(bits.mode == list)
+                  {
+                     MenuDivider { menu };
+                     MenuItem { menu, "Replace List Item\tCtrl+R", r, NotifySelect = MenuReplaceListItemByChild, disabled = false };
+                  }
+                  MenuDivider { menu };
+                  MenuItem { menu, "Cut\tCtrl+X", t, NotifySelect = null, disabled = false };
+                  MenuItem { menu, "Copy\tCtrl+C", c, NotifySelect = null, disabled = false };
+                  MenuItem { menu, "Paste\tCtrl+V", p, NotifySelect = null, disabled = false /*!clipboard*/ };
+                  MenuItem { menu, "Delete\tDel", d, NotifySelect = null, disabled = false };
+                  //MenuDivider { menu };
+               }
 
                popup = PopupMenu
                   {
 
                popup = PopupMenu
                   {
@@ -602,6 +731,15 @@ private:
          bool result;
          if((SmartKey)key == enter)
             result = OpenNode();
          bool result;
          if((SmartKey)key == enter)
             result = OpenNode();
+         #if 0
+         else if((SmartKey)key == f2)
+            result = RenameNode();
+         #endif
+         else if((SmartKey)key == f2)
+         {
+            FileSystemNode node = selection.node;
+            node.row.Edit(nameField);
+         }
          else
             result = true;
          return true;
          else
             result = true;
          return true;
@@ -658,21 +796,44 @@ private:
       }
    }
 
       }
    }
 
-   bool MenuOpen(MenuItem selection, Modifiers mods)
+   bool OpenNode()
    {
    {
-      OpenNode();
+      bool result = false;
+      FileSystemBoxSelection sel = this.selection.Copy();
+      //FileSystemNode node = selection.node;
+      for(node : sel.nodes)
+      {
+         sel.node = node;
+         if(node && node.type.isFolder && bits.navigateFolders)
+            property::path = node.path;
+         if(NotifyNodeOpen(this.master, this, sel) && !result)
+            result = true;
+      }
+      delete sel;
+      return result;
    }
 
    }
 
-   bool OpenNode()
+   #if 0
+   bool RenameNode()
    {
       bool result;
    {
       bool result;
-      FileSystemBoxSelection selection = this.selection.Copy();
+      //FileSystemBoxSelection selection = this.selection.Copy();
       FileSystemNode node = selection.node;
       FileSystemNode node = selection.node;
-      if(node && node.type.isFolder && bits.navigateFolders)
-         property::path = node.path;
-      result = NotifyNodeOpen(this.master, this, selection);
+      //if(node && node.type.isFolder && bits.navigateFolders)
+      //   property::path = node.path;
+      // ------------------------------------------- working here ---------------------------
+      //node.row.Edit();
+      /*result = NotifyNodeRename(this.master, this, node);
+      if(result)
+      {
+         if(RenameFile(oldn, newn))
+         {
+            node.name = newn;
+         }
+      }*/
       return result;
    }
       return result;
    }
+   #endif
 
    // Edit Menu
    Menu editMenu { menu, "Edit", e };
 
    // Edit Menu
    Menu editMenu { menu, "Edit", e };
@@ -756,31 +917,50 @@ private:
             list.AddField(sizeField);
          }
       }*/
             list.AddField(sizeField);
          }
       }*/
-      if(bits.treeBranches)
-         LoadTree();
-      else
-         LoadList();
-   }
-
-   void LoadList()
-   {
-      FileListing listing { path, extensions = extensions };
-
       list.Clear();
       list.Clear();
-      while(listing.Find())
+      if(comparedPaths && !bits.treeBranches)
+         LoadComparedList();
+      else
       {
       {
-         if((!bits.foldersOnly && !bits.filesOnly) ||
-            (bits.foldersOnly && listing.stats.attribs.isDirectory) ||
-            (bits.filesOnly && listing.stats.attribs.isFile))
+         FileAttribs pathAttribs = FileExists(path);
+         if(pathAttribs)
          {
          {
-            FileSystemNode node = MakeFileSystemNode(listing.stats, listing.name, listing.path, false, bits.previewPictures, displaySystem);
-            AddNode(node);
+            if(pathAttribs.isDirectory)
+            {
+               if(bits.treeBranches)
+                  LoadTreeDirectory();
+               else
+               {
+                  if(iteratorClass)
+                     LoadListIterator();
+                  else
+                     LoadListDirectory();
+               }
+            }
+            else if(pathAttribs.isFile) // we assume this is a file list
+            {
+               File f = FileOpen(path, read);
+               if(f)
+               {
+                  if(bits.treeBranches)
+                     LoadTreeFileList(f);
+                  else
+                     LoadListFileList(f);
+                  delete f;
+               }
+               else
+                  MessageBoxTodo($"unable to open file list");
+            }
+            else
+               MessageBoxTodo($"path is not a directory nor is it a file");
          }
          }
+         else
+            MessageBoxTodo($"path does not exist");
       }
       list.Sort(nameField, 1);
    }
 
       }
       list.Sort(nameField, 1);
    }
 
-   void LoadTree()
+   void LoadTreeDirectory()
    {
       bool isRoot = !strcmp(path, "/");
       char name[MAX_LOCATION];
    {
       bool isRoot = !strcmp(path, "/");
       char name[MAX_LOCATION];
@@ -798,14 +978,14 @@ private:
       else
          strcpy(path, startPath);*/
       
       else
          strcpy(path, startPath);*/
       
-      list.Clear();
+      bits.mode = directory;
 
       delete root;
 
       delete root;
-   #ifdef __WIN32__
+#ifdef __WIN32__
       if(isRoot)
       {
          root = FileSystemNode { bits.loaded = true, bits.childrenLoaded = true };
       if(isRoot)
       {
          root = FileSystemNode { bits.loaded = true, bits.childrenLoaded = true };
-         AddTreeNode(root, true, false, null);
+         AddTreeNode(root, true, false, false, null);
          while(listing.Find())
          {
             int len = strlen(listing.name);
          while(listing.Find())
          {
             int len = strlen(listing.name);
@@ -825,24 +1005,37 @@ private:
                info[0] = 0;
             }
 
                info[0] = 0;
             }
 
-            parent = MakeFileSystemNode(listing.stats, name, listing.path, false, bits.previewPictures, displaySystem);
+            parent =
+                  MakeFileSystemNode(
+                        listing.stats,
+                        name,
+                        listing.path,
+                        false, bits.previewPictures, false,
+                        displaySystem);
             if(info[0])
                parent.info = info; //CopyString(info);
             parent.bits.loaded = true;
             if(info[0])
                parent.info = info; //CopyString(info);
             parent.bits.loaded = true;
-            AddTreeNode(parent, !listing.stats.attribs.isDirectory, listing.stats.attribs.isDirectory, root);
+            AddTreeNode(
+                  parent,
+                  !listing.stats.attribs.isDirectory,
+                  false,
+                  listing.stats.attribs.isDirectory,
+                  root);
             if(!listing.stats.attribs.isDirectory)
                parent.bits.childrenLoaded = true;
          }
 
          node = FileSystemNode { name = msNetwork, type = network };
             if(!listing.stats.attribs.isDirectory)
                parent.bits.childrenLoaded = true;
          }
 
          node = FileSystemNode { name = msNetwork, type = network };
-         AddTreeNode(node, false, true, null);
+         AddTreeNode(node, false, false, true, null);
          node.row.collapsed = true;
       }
       else
          node.row.collapsed = true;
       }
       else
-   #endif
+#endif
       {
       {
-         root = MakeFileSystemNode(FileStats { attribs = FileExists(path)}, name, path, false, bits.previewPictures, displaySystem);
-         AddTreeNode(root, false, true, null);
+         FileStats stats;
+         FileGetStats(path, stats);
+         root = MakeFileSystemNode(stats, name, path, false, bits.previewPictures, false, displaySystem);
+         AddTreeNode(root, false, false, true, null);
          LoadTreeNode(root);
       }
 
          LoadTreeNode(root);
       }
 
@@ -856,6 +1049,83 @@ private:
       list.SelectRow(root.row);
    }
 
       list.SelectRow(root.row);
    }
 
+   void LoadListDirectory()
+   {
+      FileListing listing { path, extensions = extensions };
+
+      bits.mode = directory;
+      while(listing.Find())
+         ProcessListItem(listing.name, listing.path, listing.stats, false);
+   }
+
+   void LoadListFileList(File f)
+   {
+      char line[65536];
+      bits.mode = list;
+      while(f.GetLine(line, 65536))
+      {
+         FileStats stats {};
+         char name[MAX_FILENAME];
+         FileGetStats(line, stats);
+         GetLastDirectory(line, name);
+         ProcessListItem(name, line, stats, true);
+      }
+   }
+
+   void LoadTreeFileList(File f)
+   {
+      char line[65536];
+      bits.mode = list;
+      while(f.GetLine(line, 65536))
+      {
+         FileStats stats {};
+         char name[MAX_FILENAME];
+         FileSystemNode node;
+         FileGetStats(line, stats);
+         GetLastDirectory(line, name);
+         node = ProcessTreeItem(name, line, stats, node);
+      }
+   }
+
+   void LoadListIterator()
+   {
+      FileSystemIterator iterator = eInstance_New(iteratorClass);
+      if(iterator)
+      {
+         iterator.owner = this;
+         iterator.OnObject = ListIterator_OnObject;
+         //iterator.OnLeavingDirectory = ListIterator_OnLeavingDirectory;
+         NotifyIteratorInit(master, this, iterator);
+         iterator.Iterate(path, true);
+         delete iterator;
+      }
+   }
+
+   bool ListIterator_OnObject(char * name, char * path, FileStats stats, bool isRootObject)
+   {
+      ProcessListItem(name, path, stats, false);
+      return false;
+   }
+
+   //void ListIterator_OnLeavingDirectory(char * path) { }
+
+   void ProcessListItem(char * name, char * path, FileStats stats, bool isListItem)
+   {
+      if((!bits.foldersOnly && !bits.filesOnly) || (bits.foldersOnly && stats.attribs.isDirectory) || (bits.filesOnly && stats.attribs.isFile))
+      {
+         FileSystemNode node = MakeFileSystemNode(stats, name, path, false, bits.previewPictures, isListItem, displaySystem);
+         AddNode(node);
+      }
+   }
+
+   FileSystemNode ProcessTreeItem(char * name, char * path, FileStats stats, FileSystemNode parent)
+   {
+      FileSystemNode node = MakeFileSystemNode(stats, name, path, false, bits.previewPictures, true, displaySystem);
+      AddTreeNode(parent, false, false, true, null);
+      //LoadTreeNode(node);
+      return node;
+   }
+
    void LoadTreeNode(FileSystemNode node)
    {
       if(!node.bits.loaded)
    void LoadTreeNode(FileSystemNode node)
    {
       if(!node.bits.loaded)
@@ -869,14 +1139,17 @@ private:
 
             while(listing.Find())
             {
 
             while(listing.Find())
             {
+               char * test;
+               FileSystemNode child = null;
                if(!listing.stats.attribs.isRemovable && ((!bits.foldersOnly && !bits.filesOnly) ||
                   (bits.foldersOnly && listing.stats.attribs.isDirectory) ||
                   (bits.filesOnly && listing.stats.attribs.isFile)))
                if(!listing.stats.attribs.isRemovable && ((!bits.foldersOnly && !bits.filesOnly) ||
                   (bits.foldersOnly && listing.stats.attribs.isDirectory) ||
                   (bits.filesOnly && listing.stats.attribs.isFile)))
-               {
-                  FileSystemNode child = MakeFileSystemNode(listing.stats, listing.name, listing.path, false, bits.previewPictures, displaySystem);
-                  AddTreeNode(child, true, false, node);
+                  child = MakeAndAddToTreeFileSystemNodeFromFileListing(listing, node);
+               if(child)
                   NodeChildLoad(child, node);
                   NodeChildLoad(child, node);
-               }
+               test = child.name;
+               if(!test)
+                  PrintLn("error");
             }
          }
          node.bits.childrenLoaded = true;
             }
          }
          node.bits.childrenLoaded = true;
@@ -905,19 +1178,27 @@ private:
    {
       char path[MAX_LOCATION];
       parent.GetPath(path);
    {
       char path[MAX_LOCATION];
       parent.GetPath(path);
+      if(bits.textFileLinesStyle && FileExists(path).isFile)
+      {
+         PrintLn("Test");
+      }
+      else
       {
          bool added = false;
          FileListing listing { path, extensions = extensions };
          while(listing.Find())
          {
       {
          bool added = false;
          FileListing listing { path, extensions = extensions };
          while(listing.Find())
          {
+            char * test;
+            FileSystemNode child = null;
             if((!bits.foldersOnly && !bits.filesOnly) ||
                (bits.foldersOnly && listing.stats.attribs.isDirectory) ||
                (bits.filesOnly && listing.stats.attribs.isFile))
             if((!bits.foldersOnly && !bits.filesOnly) ||
                (bits.foldersOnly && listing.stats.attribs.isDirectory) ||
                (bits.filesOnly && listing.stats.attribs.isFile))
-            {
-               FileSystemNode child = MakeFileSystemNode(listing.stats, listing.name, listing.path, false, bits.previewPictures, displaySystem);
-               AddTreeNode(child, listing.stats.attribs.isFile, !listing.stats.attribs.isFile, parent);
+               child = MakeAndAddToTreeFileSystemNodeFromFileListing(listing, parent);
+            if(child)
                added = true;
                added = true;
-            }
+            test = child.name;
+            if(!test)
+               PrintLn("error");
          }
          if(!added)
             added = true;
          }
          if(!added)
             added = true;
@@ -925,6 +1206,249 @@ private:
       parent.bits.childrenLoaded = true;
    }
 
       parent.bits.childrenLoaded = true;
    }
 
+   void LoadComparedList()
+   {
+      int c, cmp/*, smallest*/, icon;//, equalCount;
+      int count = comparedPaths ? comparedPaths.count : 0;
+      //bool allDone = false;
+      bool not;
+      FileStats stats;
+      char path[MAX_LOCATION];
+      //Array<ComparisonState> states { };
+      //Array<FileListing> listings { };
+      //Array<int> equals { };
+      //Array<MapNode<String, int>> mapNodes { };
+
+      //Array<Map<String, int>> lists { };
+      //Map<int, bool> equals{ };
+
+
+      MapNode<String, /*Map<int, */Array<int>> na;
+      //MapNode<int, int> nb;
+      Map<String, /*Map<int, */Array<int>> names { };
+      //Map<String, Array<bool>> names { };
+      //Map<String, bool[16]> names { }; // does not seem to be working
+      //Map<String, BoolArrayInt> names { };
+      {
+         for(c = 0; c < comparedPaths.count; c++)
+         {
+            FileListing listing { comparedPaths[c], extensions = extensions };
+            while(listing.Find())
+            {
+               /*Map<int, int>*/Array<int> m = names[listing.name];
+               if(!m)
+                  m = { };
+               names[listing.name] = m;
+               /*/m[c] = */m.Add(c);
+            }
+         }
+         /* // compiles and should work but better solution?
+         for(c = 0; c < comparedPaths.count; c++)
+         {
+            FileListing listing { comparedPaths[c], extensions = extensions };
+            while(listing.Find())
+            {
+               Array<bool> a = names[listing.name];
+               if(!a)
+                  a = { };
+               names[listing.name] = a;
+               a[c] = true;
+            }
+         }
+         */
+         /* // does not seem to be working
+         for(c = 0; c < comparedPaths.count; c++)
+         {
+            FileListing listing { comparedPaths[c], extensions = extensions };
+            while(listing.Find())
+            {
+               names[listing.name][c] = true;
+            }
+         }
+         */
+         /*
+         if(comparedPaths.count > 0)
+         {
+            FileListing listing { comparedPaths[0], extensions = extensions };
+            while(listing.Find())
+            {
+               // should be able to just do names[listing.name]._0 = true;
+               BoolArrayInt bai = names[listing.name];
+               bai._0 = true;
+               names[listing.name] = bai;
+            }
+         }
+         if(comparedPaths.count > 1)
+         {
+            FileListing listing { comparedPaths[1], extensions = extensions };
+            while(listing.Find())
+            {
+               // should be able to just do names[listing.name]._1 = true;
+               BoolArrayInt bai = names[listing.name];
+               bai._1 = true;
+               names[listing.name] = bai;
+            }
+         }
+         */
+         // and so on....
+      }
+
+      /*
+      for(dirPath : comparedPaths)
+      {
+         char * p = dirPath;
+         if(FileExists(dirPath).isDirectory)
+         {
+            FileListing listing { dirPath, extensions = extensions };
+            //MapNode<String, int> mn;
+            Map<String, int> list { };
+            //states.Add(listing.Find() == true ? matching : endOfListing);
+            while(listing.Find())
+               list[listing.name] = 0;
+            //for(mn = ; mn; mn = mn.next)
+            //mn = list.root.minimum;
+            mapNodes.Add(/-*mn*-/list.root.minimum);
+            lists.Add(list);
+            //PrintLn(dirPath, " -- .Find() -- ", states[states.count-1] == matching ? listing.name : "endOfListing*");
+            //listings.Add(listing);
+
+            {
+               MapNode<String, int> mn;
+               PrintLn("------------- DIR LISTING FOR ", dirPath);
+               for(mn = list.root.minimum; mn; mn = mn.next)
+               {
+                  PrintLn(mn.key);
+               }
+            }
+         }
+      }
+      */
+
+      for(na = names.root.minimum; na; na = na.next)
+      {
+         /*Map<int, */Array<int> equals = na.value;
+         //MapNode<int, int> nb;
+      /*
+      while(!allDone)
+      {
+         smallest = 0;
+         equals.Add(0);
+         for(c = 1; c < count; c++)
+         {
+            //if(states[c] == endOfListing) continue;
+            if(!mapNodes[c]) continue;
+            // todo: use better comparison method
+            //       it should compare file type (dir/file) before
+            //       comparing file name.
+            //       should also provide alternative methods
+            //       of comparison including ones that consider
+            //       date changes as differences of some kind.
+            //       pethaps a OnCompare(a, b) to allow implementation
+            //       of custom methods of comparison.
+            // note: this (or these) method(s) depend on files
+            //       being listed in sorted order by FileListing.
+            //       different comparison methods should have
+            //       appropriatly different sorting in FileListing.
+            //
+            //cmp = strcmp(listings[smallest].name, listings[c].name);
+            cmp = fstrcmp(mapNodes[smallest].key, mapNodes[c].key);
+            PrintLn("COMPARING - ", mapNodes[smallest].key, " and ", mapNodes[c].key);
+            if(cmp == 0)
+               equals.Add(c);
+               //equals[c] = true;
+            else if(cmp > 0)
+            {
+               smallest = c;
+               equals.size = 0;
+               equals.Add(c);
+            }
+         }
+
+      */
+         if(equals.count == count) // all are equal, no diff icon
+         {
+            icon = 0;
+            not = false;
+         }
+         else if(equals.count == count-1) // all are equal but one, not-sign icon for singled out missing
+         {
+            int i;
+            /*
+            for(nb = equals.root.minimum, i = 0; nb; nb = nb.next, i++)
+            {
+               if(i != nb.key)
+               */
+            for(i = 0; i < equals.count; i++)
+            {
+               if(i != equals[i])
+               {
+                  icon = i+1;
+                  break;
+               }
+            }
+            //if(!nb)
+            if(i == equals.count)
+               icon = count;
+            not = true;
+         }
+         else if(equals.count == 1) // only one is present, all others missing, present-sign for singled out present
+         {
+            //icon = equals.root.minimum.key+1;
+            icon = equals[0]+1;
+            not = false;
+         }
+         else // mixed
+         {
+            icon = 0; // todo
+            not = true;
+         }
+#if 0
+         // or
+         if(equals.count == count) // all are equal, no diff icon
+            ;
+         else if(count/2 - equals.count < 0) // more than half are equal, use not-sign icons for all missing
+            ;
+         else // less than half are equal, use present-sign icons for all present
+            ;
+#endif
+
+         /*if((!bits.foldersOnly && !bits.filesOnly) ||
+            (bits.foldersOnly && listings[smallest].stats.attribs.isDirectory) ||
+            (bits.filesOnly && listings[smallest].stats.attribs.isFile))*/
+         strcpy(path, comparedPaths[/*smallest*/equals[0]]);
+         PathCat(path, /*mapNodes[smallest].key*/na.key);
+         FileGetStats(path, stats);
+         if((!bits.foldersOnly && !bits.filesOnly) ||
+            (bits.foldersOnly && stats.attribs.isDirectory) ||
+            (bits.filesOnly && stats.attribs.isFile))
+         {
+            FileSystemNode node =
+                  MakeComparedFileSystemNode(
+                        stats,
+                        /*mapNodes[smallest].key*/na.key,
+                        path,
+                        false, bits.previewPictures,
+                        icon, not, equals,
+                        displaySystem);
+            AddNode(node);
+         }
+      /*
+         for(equal : equals)
+         {
+            mapNodes[equal] = mapNodes[equal].next;
+            //states[equal] = listings[equal].Find() == true ? matching : endOfListing;
+            //PrintLn(comparedPaths[equal], " -- .Find() -- ", states[equal] == matching ? listings[equal].name : "endOfListing*");
+         }
+         equals.size = 0;
+         //for(c = 0; c < count && states[c] == endOfListing; c++);
+         for(c = 0; c < count && !mapNodes[c]; c++);
+         if(c == count)
+            allDone = true;
+      */
+      }
+      list.Sort(nameField, 1);
+   }
+
    void AddNode(FileSystemNode node)
    {
       DataRow row = list.AddRow();
    void AddNode(FileSystemNode node)
    {
       DataRow row = list.AddRow();
@@ -933,7 +1457,11 @@ private:
       incref node;
       row.SetData(nameField, node);
       if(bits.pathColumn)
       incref node;
       row.SetData(nameField, node);
       if(bits.pathColumn)
-         row.SetData(pathField, node.path);
+      {
+         char path[MAX_LOCATION];
+         StripLastDirectory(node.path, path);
+         row.SetData(pathField, CopyString(path));
+      }
       if(bits.details)
       {
          if(node.type.isFile)
       if(bits.details)
       {
          if(node.type.isFile)
@@ -945,7 +1473,46 @@ private:
       }
    }
 
       }
    }
 
-   void AddTreeNode(FileSystemNode node, bool loaded, bool addLoader, FileSystemNode addTo)
+   FileSystemNode MakeAndAddToTreeFileSystemNodeFromFileListing(FileListing listing, FileSystemNode parent)
+   {
+      FileSystemNode result = null;
+      /*if((!bits.foldersOnly && !bits.filesOnly) ||
+         (bits.foldersOnly && listing.stats.attribs.isDirectory) ||
+         (bits.filesOnly && listing.stats.attribs.isFile))*/
+      /*if(!listing.stats.attribs.isRemovable && ((!bits.foldersOnly && !bits.filesOnly) ||
+         (bits.foldersOnly && listing.stats.attribs.isDirectory) ||
+         (bits.filesOnly && listing.stats.attribs.isFile)))*/
+      {
+         bool textFileLinesStyle = false;
+         char * test = listing.name;
+         if(!test)
+            PrintLn("error");
+         result = MakeFileSystemNode(listing.stats, listing.name, listing.path, false, bits.previewPictures, false, displaySystem);
+         test = result.name;
+         if(!test)
+            PrintLn("error");
+         if(bits.textFileLinesStyle)
+         {
+            char ext[MAX_LOCATION];
+            GetExtension(listing.name, ext);
+            if(!strcmpi(ext, "txt") || !strcmpi(ext, "text"))
+               textFileLinesStyle = true;
+         }
+         //AddTreeNode(result, true, false, textFileLinesStyle, parent);
+         AddTreeNode(result, !textFileLinesStyle && listing.stats.attribs.isFile, false, !listing.stats.attribs.isFile || textFileLinesStyle, parent);
+         test = result.name;
+         if(!test)
+            PrintLn("error");
+      }
+      return result;
+   }
+
+   void AddTreeNode(
+      FileSystemNode node,
+      bool loaded,
+      bool childrenLoaded,
+      bool addLoader,
+      FileSystemNode addTo)
    {
       DataRow row = (addTo && addTo.row) ? addTo.row.AddRow() : list.AddRow();
       if(addTo)
    {
       DataRow row = (addTo && addTo.row) ? addTo.row.AddRow() : list.AddRow();
       if(addTo)
@@ -958,7 +1525,11 @@ private:
       node.row = row;
       row.SetData(null, node);
       if(bits.pathColumn)
       node.row = row;
       row.SetData(null, node);
       if(bits.pathColumn)
-         row.SetData(pathField, node.path);
+      {
+         char path[MAX_LOCATION];
+         StripLastDirectory(node.path, path);
+         row.SetData(pathField, CopyString(path));
+      }
       if(bits.details)
       {
          if(node.type.isFile)
       if(bits.details)
       {
          if(node.type.isFile)
@@ -970,11 +1541,12 @@ private:
       }
 
       node.bits.loaded = loaded;
       }
 
       node.bits.loaded = loaded;
+      node.bits.childrenLoaded = childrenLoaded;
       if(addLoader)
          //AddTreeNode(FileSystemNode { }, false, false, node); // why would this create a compile error?
       if(addLoader)
          //AddTreeNode(FileSystemNode { }, false, false, node); // why would this create a compile error?
-         AddTreeNode(FileSystemNode { type = none }, false, false, node);
+         AddTreeNode(FileSystemNode { type = none, name = "Loader" }, false, false, false, node);
 
 
-      if(node.indent > 0)
+      if(node.indent > 0 || bits.mode == list)
          row.collapsed = true;
       else if(node.type == folder)
          node.type = folderOpen;
          row.collapsed = true;
       else if(node.type == folder)
          node.type = folderOpen;
@@ -995,6 +1567,8 @@ private:
    }
 }
 
    }
 }
 
+enum ComparisonState { endOfListing, matching };
+
 /*
 #if 0
 class ExplorerView : FileSystemBox
 /*
 #if 0
 class ExplorerView : FileSystemBox
@@ -1673,7 +2247,7 @@ public:
    #else
       root.name = "/";
    #endif
    #else
       root.name = "/";
    #endif
-      AddTreeNode(root, true, false, null, tree);
+      AddTreeNode(root, true, false, false, null, tree);
 
    // How can this make sense for linux? 
    #ifdef __WIN32__
 
    // How can this make sense for linux? 
    #ifdef __WIN32__
@@ -1700,13 +2274,13 @@ public:
          if(info[0])
             parent.info = CopyString(info);
          parent.loaded = true;
          if(info[0])
             parent.info = CopyString(info);
          parent.loaded = true;
-         AddTreeNode(parent, !listing.stats.attribs.isDirectory, listing.stats.attribs.isDirectory, root, tree);
+         AddTreeNode(parent, !listing.stats.attribs.isDirectory, false, listing.stats.attribs.isDirectory, root, tree);
          if(!listing.stats.attribs.isDirectory)
             parent.childrenLoaded = true;
       }
    #endif
       node = FileSystemNode { name = msNetwork, type = network };
          if(!listing.stats.attribs.isDirectory)
             parent.childrenLoaded = true;
       }
    #endif
       node = FileSystemNode { name = msNetwork, type = network };
-      AddTreeNode(node, false, true, null, tree);
+      AddTreeNode(node, false, false, true, null, tree);
       node.row.collapsed = true;
       tree.Sort(nameField, 1);
       tree.SelectRow(root.row);
       node.row.collapsed = true;
       tree.Sort(nameField, 1);
       tree.SelectRow(root.row);
@@ -2079,7 +2653,7 @@ private:
 
 class FileSystemNodeBits
 {
 
 class FileSystemNodeBits
 {
-   bool loaded:1, childrenLoaded:1, displayPath:1;
+   bool loaded:1, childrenLoaded:1, isListItem:1;
 };
 
 public class FileSystemNode
 };
 
 public class FileSystemNode
@@ -2110,6 +2684,8 @@ public:
 
    int indent;
 
 
    int indent;
 
+   property bool isListItem { set { bits.isListItem = value; } get { return bits.isListItem; } };
+
    property char * path
    {
       set { delete path; if(value && value[0]) path = CopyString(value); }
    property char * path
    {
       set { delete path; if(value && value[0]) path = CopyString(value); }
@@ -2145,6 +2721,10 @@ public:
 
    Bitmap bitmap;
 
 
    Bitmap bitmap;
 
+   int cmpIcon;
+   bool cmpNot;
+   Array<int> exists; // would use (see) BoolArrayInt to pack this into an int if could be accessed as an array
+
    void GetPath(String outputPath)
    {  
       if(path)
    void GetPath(String outputPath)
    {  
       if(path)
@@ -2194,7 +2774,7 @@ public:
             FileSystemNode copy { };
             copy.name = child.name; //CopyString(child.name);
             copy.type = child.type;
             FileSystemNode copy { };
             copy.name = child.name; //CopyString(child.name);
             copy.type = child.type;
-            fsb.AddTreeNode(copy, child.bits.loaded, false, addTo);
+            fsb.AddTreeNode(copy, child.bits.loaded, false, false, addTo);
             if(forceExpanded)
                copy.row.collapsed = false;
             if(recursive)
             if(forceExpanded)
                copy.row.collapsed = false;
             if(recursive)
@@ -2248,25 +2828,46 @@ public:
       int len;
       int w, h;
       //int textOffset;
       int len;
       int w, h;
       //int textOffset;
-      char string[MAX_FILENAME];
+      char * alt;
+      char text[MAX_LOCATION];
+      bool comp;
 
       Bitmap icon;
 
       Bitmap icon;
+      Bitmap diffIcon;
+      Bitmap notIcon;
 
       if(!this)
          return;
       
 
       if(!this)
          return;
       
+      comp = fsb.comparedPaths && fsb.comparedPaths.count > 1;
       icon = fsb.fileIcons[type].bitmap;
       icon = fsb.fileIcons[type].bitmap;
+      alt = bits.isListItem ? path : name;
+      if(comp && !fsb.bits.columnsCompareStyle && cmpIcon)
+      {
+         /*
+         diffIcon = Bitmap { };
+         diffIcon.AllocateDD(
+               surface.display.displaySystem,
+               fsb.compIcons[cmpIcon].bitmap.width,
+               fsb.compIcons[cmpIcon].bitmap.height);
+         if(fsb.compIcons[cmpIcon].bitmap)
+            diffIcon.Copy(fsb.compIcons[cmpIcon].bitmap);
+         */
+         diffIcon = fsb.compIcons[cmpIcon-1].bitmap;
+         notIcon = fsb.compIcons[countOfCompIconNames-1].bitmap;
+      }
       //xStart = indent * indent + x + (icon ? (icon.width + 5) : 0);
       //xStart = indent * indent + x + (icon ? (icon.width + 5) : 0);
-      xStart = x + (icon ? (icon.width + 5) : 0);
+      xStart = x + (icon ? (icon.width + 5) : 0) + (comp ? 18*(fsb.bits.columnsCompareStyle ? fsb.comparedPaths.count : 1) : 0);
 
 
-      if(!name)
+      if(!alt)
          return;
 
       if(info)
          return;
 
       if(info)
-         sprintf(string, "%s [%s]", label ? label : name, info);
+         sprintf(text, "%s [%s]", label ? label : alt, info);
       else
       else
-         strcpy(string, label ? label : name);
-      len = strlen(string);
+         strcpy(text, label ? label : alt); //"%d-%d/%s", stats.inode, stats.nlink
+         //sprintf(text, "%d-%d/%s", stats.inode, stats.nlink, label ? label : alt);
+      len = strlen(text);
       
       if(!icon)
       {
       
       if(!icon)
       {
@@ -2279,7 +2880,7 @@ public:
       
       surface.SetForeground(displayFlags.selected ? fsb.selectionText : fsb.foreground);
       surface.TextOpacity(false);
       
       surface.SetForeground(displayFlags.selected ? fsb.selectionText : fsb.foreground);
       surface.TextOpacity(false);
-      surface.TextExtent(string, len, &w, &h);
+      surface.TextExtent(text, len, &w, &h);
       h = Max(h, 16);
     
       // Draw the current row stipple
       h = Max(h, 16);
     
       // Draw the current row stipple
@@ -2288,8 +2889,8 @@ public:
          //surface.Area(xStart + w - 1, y, xStart + w + 1, y + h - 1);
          surface.Area(xStart - 3, y, xStart + w + 1, y + h - 1);
       
          //surface.Area(xStart + w - 1, y, xStart + w + 1, y + h - 1);
          surface.Area(xStart - 3, y, xStart + w + 1, y + h - 1);
       
-      //surface.WriteTextDots(alignment, x + textOffset, y + 2, width - textOffset, name, strlen(name));
-      surface.WriteTextDots(alignment, xStart, y + 2, width, string, len);
+      //surface.WriteTextDots(alignment, x + textOffset, y + 2, width - textOffset, alt, strlen(alt));
+      surface.WriteTextDots(alignment, xStart, y + 2, width, text, len);
 
       if(!guiApp.textMode)
       {
 
       if(!guiApp.textMode)
       {
@@ -2311,6 +2912,80 @@ public:
             surface.LineStipple(0);
          }
 
             surface.LineStipple(0);
          }
 
+         if(comp)
+         {
+            if(!fsb.bits.columnsCompareStyle && diffIcon)
+            {
+               w = diffIcon.width;
+               h = diffIcon.height;
+               /*if(cmpNot && notIcon)
+               {
+                  Surface s = diffIcon.GetSurface(0,0, {w,h});
+                  s.SetForeground(white);
+                  s.Blit(notIcon, x,y, 0,0, w,h);
+                  delete s;
+               }*/
+               surface.SetForeground(white);
+               surface.Blit(diffIcon, x,y, 0,0, w,h);
+               if(cmpNot && notIcon)
+                  surface.Blit(notIcon, x,y, 0,0, w,h);
+               x+=18;
+               //delete diffIcon;
+            }
+            else if(fsb.bits.columnsCompareStyle && exists && exists.count)
+            {
+               int c, d;
+               for(c = d = 0; c < fsb.comparedPaths.count; c++)
+               {
+                  if(d == exists.count || exists[d] != c)
+                     x+=18;
+                  else
+                  {
+                     diffIcon = fsb.compIcons[c].bitmap;
+                     if(diffIcon)
+                     {
+                        w = diffIcon.width;
+                        h = diffIcon.height;
+                        surface.SetForeground(white);
+                        surface.Blit(diffIcon, x,y, 0,0, w,h);
+                     }
+                     x+=18;
+                     d++;
+                  }
+               }
+               /*
+               for(c = d = 0; c < exists.count; c++)
+               {
+                  if(exists[c] != d)
+                  {
+                     d = exists[c]+1;
+                     x+=18*(exists[c]-d);
+                  }
+                  else
+                  {
+                     diffIcon = fsb.compIcons[exists[c]].bitmap;
+                     if(diffIcon)
+                     {
+                        w = diffIcon.width;
+                        h = diffIcon.height;
+                        surface.SetForeground(white);
+                        surface.Blit(diffIcon, x,y, 0,0, w,h);
+                     }
+                     d++;
+                     x+=18;
+                  }
+               }
+               if(exists.count < fsb.comparedPaths.count && exists[exists.count-1] != d)
+               {
+                  x+=18*(exists[exists.count-1]-d);
+               }
+               */
+            }
+            else if(fsb.bits.columnsCompareStyle)
+            {
+               x+=18*fsb.comparedPaths.count;
+            }
+         }
          if(icon)
          {
             w = icon.width;
          if(icon)
          {
             w = icon.width;
@@ -2340,17 +3015,70 @@ public:
             //surface.alphaWrite = blend;
             surface.SetForeground(white);
             //surface.Blit(icon, x + indent * indentSize, y,0,0, icon.width, icon.height);
             //surface.alphaWrite = blend;
             surface.SetForeground(white);
             //surface.Blit(icon, x + indent * indentSize, y,0,0, icon.width, icon.height);
-            surface.Blit(icon, x,y,0,0, icon.width, icon.height);
+            surface.Blit(icon, x,y, 0,0, w,h);
          }
       }
    }
 
          }
       }
    }
 
+   Window OnEdit(DataBox dataBox, DataBox obsolete, int x, int y, int w, int h, void * userData)
+   {
+      EditBox editBox
+      {
+         dataBox, anchor = { 0, 0, 0, 0 };
+         borderStyle = none;
+         //borderStyle = contour;
+         opacity = 1.0f;
+         //background = white;
+         //autoSize = true;
+         contents = name;
+      };
+      //dataBox.borderStyle = none;
+      dataBox.borderStyle = contour;
+      dataBox.background = white;
+      //dataBox.opacity = 0.0f;
+      editBox.Create();
+      return editBox;
+   }
+
+   bool OnSaveEdit(EditBox editBox, void * object)
+   {
+      bool changed = false;
+      if(editBox.modifiedDocument)
+      {
+#if 0
+         // how the heck did this work for PathBox? :S
+         //String::OnFree();
+         //changed = _class._vTbl[__ecereVMethodID_class_OnGetDataFromString](_class, &this, editBox.contents);
+         PrintLn(name);
+         //if(strcmp(editBox.contents, this.name))
+         ;
+         /*{
+            //changed = NotifyNodeRename(this.master, this, node);
+            changed = true;
+            if(changed && RenameFile(name, editBox.contents))
+            {
+               name = editBox.contents;
+            }
+            else
+            {
+               changed = false;
+            }
+         }*/
+#endif
+      }
+      return changed;
+   }
+
    int OnCompare(FileSystemNode b)
    {
       int result;
       FileSystemNode a = this;
       if(a.type == b.type || (a.type < folder && b.type < folder) || (a.type >= drive))
    int OnCompare(FileSystemNode b)
    {
       int result;
       FileSystemNode a = this;
       if(a.type == b.type || (a.type < folder && b.type < folder) || (a.type >= drive))
+      {
+         if(!a.name || !b.name)
+            PrintLn("error: FileSystemNode::OnCompare -- null-named node");
          result = strcmpi(a.name, b.name);
          result = strcmpi(a.name, b.name);
+      }
       else
       {
          if(a.type == folder && b.type < folder) result = -1;
       else
       {
          if(a.type == folder && b.type < folder) result = -1;
@@ -2360,16 +3088,32 @@ public:
       return result;
    }
 
       return result;
    }
 
-   /*int OnCompare(FileSystemNode b)
+#if 0
+   //int OnCompare(FileSystemNode b)
+   //{
+      //int result;
+      //FileSystemNode a = this;
+      //if(a.parent < b.parent) result = -1;
+      //else if(a.parent > b.parent) result = 1;
+      //else
+         //result = fstrcmp(a.name, b.name);
+      //return result;
+   //}
+#endif
+
+   bool OnGetDataFromString(char * string)
    {
    {
-      int result;
-      FileSystemNode a = this;
-      if(a.parent < b.parent) result = -1;
-      else if(a.parent > b.parent) result = 1;
-      else
-         result = fstrcmp(a.name, b.name);
-      return result;
-   }*/
+#if 0
+      if(string && *string)
+      {
+         int len = strlen(string) + 1;
+         name = new char[len];
+         CopyBytes(name, string, len);
+         return true;
+      }
+#endif
+      return false;
+   }
 
    char * OnGetString(char * tempString, FileSystemToolWindow fileSysToolWnd, bool * needClass)
    {
 
    char * OnGetString(char * tempString, FileSystemToolWindow fileSysToolWnd, bool * needClass)
    {
@@ -2413,6 +3157,7 @@ FileSystemNode MakeFileSystemNode(
    const char * path,
    const bool pathAddName,
    const bool previewPicture,
    const char * path,
    const bool pathAddName,
    const bool previewPicture,
+   const bool isListItem,
    const DisplaySystem displaySystem)
 {
    int len = strlen(name);
    const DisplaySystem displaySystem)
 {
    int len = strlen(name);
@@ -2494,5 +3239,67 @@ FileSystemNode MakeFileSystemNode(
       node.bitmap.Load(path, null, displaySystem);
    }
 
       node.bitmap.Load(path, null, displaySystem);
    }
 
+   if(isListItem)
+      node.bits.isListItem = true;
+
    return node;
 }
    return node;
 }
+
+FileSystemNode MakeComparedFileSystemNode(
+   const FileStats stats,
+   const char * name,
+   const char * path,
+   const bool pathAddName,
+   const bool previewPicture,
+   const int cmpIcon,
+   const bool cmpNot,
+   const Array<int> exists,
+   const DisplaySystem displaySystem)
+{
+   FileSystemNode node = MakeFileSystemNode(stats, name, path, pathAddName, previewPicture, false, displaySystem);
+   if(node)
+   {
+      node.cmpIcon = cmpIcon;
+      node.cmpNot = cmpNot;
+      node.exists = exists;
+   }
+   return node;
+}
+
+#if 0 // could we do this?
+class BoolArrayInt : int
+{
+   // packing 32 bools in one int exposing them as an array
+   bool [32]:1; // the :1 specifies the size of each element
+   // byte [4]:8; // packing 4 bytes in an int exposing them as an arrat
+}
+// allowing you to access each 32 bits with the following notation:
+static void Dummy()
+{
+   int c;
+   BoolArrayInt a;
+   a[0] = true;
+   a[31] = false;
+   for(c = 0; c < 32; c++)
+      a[c] = SomFunction(...);
+}
+#endif
+class BoolArrayInt : int
+{
+   bool  _0:1;
+   bool  _1:1;
+   bool  _2:1;
+   bool  _3:1;
+   bool  _4:1;
+   bool  _5:1;
+   bool  _6:1;
+   bool  _7:1;
+   bool  _8:1;
+   bool  _9:1;
+   bool _10:1;
+   bool _11:1;
+   bool _12:1;
+   bool _13:1;
+   bool _14:1;
+   bool _15:1;
+}
diff --git a/libede/src/FileSystemCache.ec b/libede/src/FileSystemCache.ec
new file mode 100644 (file)
index 0000000..03920bd
--- /dev/null
@@ -0,0 +1,475 @@
+public import "ecere"
+
+public import "FileSystemIterator"
+
+public class FileSystemCacheIterator : InterfaceFileSystemIterator
+{
+public:
+   FileSystemCache cache;
+
+   bool Iterate(char * startPath, bool followLinks)
+   {
+      bool result = true;
+      char * path;
+      FSCacheObject o;
+      if(cache && cache.objects.count)
+      {
+         o = cache.FetchObject(startPath);
+         if(o)
+         {
+            bool listDirEntries;
+            FileSystemCacheIteratorStackFrame frame = null;
+            Array<FileSystemCacheIteratorStackFrame> stack { };
+            if(iterateStartPath)
+            {
+               path = o.GetPath();
+               listDirEntries = OnObject(owner, o.name, path, o.stats, true);
+               if(o.firstChild)
+               {
+                  if(listDirEntries)
+                  {
+                     OnEnteringDirectory(owner, path);
+                     stack.Add((frame = { path, o.firstChild }));
+                     path = null;
+                  }
+                  else
+                     result = false;
+               }
+               delete path;
+            }
+            // else { /* TODO: frame is not initialized!! */ }
+
+            while(frame)
+            {
+               o = frame.o;
+               if(o)
+               {
+                  frame.o = o.nextSibling;
+                  path = o.GetPath();
+                  listDirEntries = OnObject(owner, o.name, path, o.stats, !iterateStartPath && stack.count == 1);
+                  if(o.firstChild)
+                  {
+                     if(listDirEntries)
+                     {
+                        OnEnteringDirectory(owner, path);
+                        stack.Add((frame = { path, o.firstChild }));
+                        path = null;
+                     }
+                     else
+                        result = false;
+                  }
+                  delete path;
+               }
+               else
+               {
+                  if(stack.count > (iterateStartPath ? 0 : 1))
+                     OnLeavingDirectory(owner, frame.path);
+                  delete frame;
+                  stack.lastIterator.Remove();
+                  frame = stack.count == 0 ? null : stack.lastIterator.data;
+               }
+            }
+            if(stack.count != 0)
+               PrintLn("dddddddd");
+            delete stack;
+         }
+      }
+      return result;
+   }
+}
+
+class FileSystemCacheIteratorStackFrame : struct
+{
+public:
+   String path;
+   FSCacheObject o;
+
+private:
+   ~FileSystemCacheIteratorStackFrame()
+   {
+      delete path;
+   }
+};
+
+class FileSystemCacheBits
+{
+   bool indexInodes:1;
+}
+
+public class DummyFileSystemCacheWindow : Window
+{
+public:
+   FileSystemCache cache { };
+}
+
+public class FileSystemCache
+{
+public:
+   Map<FSCacheObject, FSCacheRoot> roots { };
+   Array<FSCacheObject> objects { };
+   Array<FSCacheObject> normalParentStack;
+   Map<uint, FileSystemDeviceCache> deviceCaches { };
+
+   property bool indexInodes { set { bits.indexInodes = value; } get { return bits.indexInodes; } };
+
+   void/*FileSystemCache*/ ::Cache(char * path, bool indexInodes, DummyFileSystemCacheWindow dummyWindow)
+   {
+      FileSystemCache cache = dummyWindow.cache;
+      // TOIMP: for now we will assume the cache includes files from a single domain (partition/share)
+      // TOIMP: would like to use full blown file iterator driver system to support other types of file system, archives, etc
+      FileAttribs pathAttribs = FileExists(path);
+      if(pathAttribs)
+      {
+         cache = dummyWindow.cache;// = { };
+         cache.indexInodes = indexInodes;
+         cache.normalParentStack = { };
+         //cache.domainParentStack = { };
+         if(pathAttribs.isDirectory)
+         {
+            FileSystemIterator fsi
+            {
+               owner = dummyWindow; //owner = (void *)this;
+               iterateStartPath = true;
+
+               // COMPILER TOFIX: this will not compile (error: method class must be derived from class) -- bool Whatever/*FileSystemCache*/::OnFolder(...)
+               bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(char * name, char * path, FileStats stats, bool isRootObject)
+               {
+                  bool result = true;
+                  FileSystemCache cache = this.cache;
+                  uint dev = stats.dev;
+                  uint inode = stats.inode;
+                  char * p;
+                  FSCacheObject parent = isRootObject ? null : cache.normalParentStack.lastIterator.data;
+                  FSCacheObject o { parent, name = CopyString(isRootObject ? path : name), stats = stats };
+                  FileStats s;
+                  if(isRootObject)
+                  {
+                     // TODO see if we can find a parent for it
+                     // see if we already have a FSCacheObject for it, if so, update
+                     // distant parents -- when there are gaps.. maybe the parent's parent is present but not the parent
+                     // keep a list of those and see if they can be pluged in after a Cache run
+                     cache.roots[o] = FSCacheRoot { cache.objects.count, GetPathDirNamesArray(path) };
+                  }
+                  else
+                  {
+                     if(!parent.firstChild)
+                        parent.firstChild = parent.lastChild = o;
+                     else
+                     {
+                        parent.lastChild.nextSibling = o;
+                        o.prevSibling = parent.lastChild;
+                        parent.lastChild = o;
+                     }
+                  }
+                  cache.objects.Add(o);
+#if _DEBUG
+                  if(cache.objects.count % 1000 == 0)
+                     PrintLn(path, " ----- ", cache.objects.count / 1000, " --------- ", dev);
+                  FileGetStatsLink(path, s);
+                  if(s.inode != inode)
+                  {
+                     PrintLn(s.inode);
+                     PrintLn(inode);
+                     PrintLn("crap");
+                  }
+                  p = o.GetPath();
+                  if(strcmp(p, path))
+                  {
+                     int c;
+                     PrintLn("damn");
+                     PrintLn(p);
+                     for(c = 0; c < cache.normalParentStack.count; c++)
+                     {
+                        delete p;
+                        p = cache.normalParentStack[c].GetPath();
+                        PrintLn(p);
+                     }
+                     PrintLn(path);
+                     PrintLn("bad");
+                  }
+                  delete p;
+#endif
+                  if(dev && inode && cache.bits.indexInodes)
+                  {
+                     FileSystemDeviceCache devCache = cache.deviceCaches[dev];
+                     if(!devCache)
+                        cache.deviceCaches[dev] = devCache = { };
+                     {
+                        Array<FSCacheObject> inodes = devCache.inodes[inode];
+                        if(!inodes)
+                           devCache.inodes[inode] = inodes = { };
+                        else if(inodes.count == 1)
+                           devCache.nonSingleLinks[inode] = true;
+                        inodes.Add(o);
+                     }
+                  }
+                  return result;
+               }
+
+               void /*FileSystemCache*/DummyFileSystemCacheWindow::OnEnteringDirectory(char * path)
+               {
+                  FileSystemCache cache = this.cache;
+                  FSCacheObject o = cache.objects.lastIterator.data;
+                  cache.normalParentStack.Add(o);
+               }
+
+               void /*FileSystemCache*/DummyFileSystemCacheWindow::OnLeavingDirectory(char * path)
+               {
+                  FileSystemCache cache = this.cache;
+                  cache.normalParentStack.lastIterator.Remove();
+               }
+            };
+            fsi.Iterate(path, false);
+            {
+               if(cache.objects.count)
+               {
+                  for(dev : cache.deviceCaches)
+                  {
+                     PrintLn("# of inodes (dev", &dev, "): ", dev.inodes.count);
+
+                     if(dev.nonSingleLinks.count)
+                     {
+                        for(inode : dev.nonSingleLinks)
+                        {
+                           PrintLn("   ", &inode);
+                           for(o : dev.inodes[&inode])
+                           {
+                              char * path = o.GetPath();
+                              PrintLn(path);
+                              delete path;
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+            delete cache.normalParentStack;
+            delete fsi;
+         }
+      }
+      //return cache;
+   }
+
+   FSCacheObject FetchObject(char * path)
+   {
+      FSCacheObject result = null;
+      for(root : roots)
+      {
+         FSCacheObject o = &root;
+         Array<String> names = GetPathDirNamesArray(path);
+         int c, max = Min(names.count, root.names.count);
+         for(c = 0; c < max; c++)
+         {
+            if(strcmp(names[c], root.names[c]))
+               break;
+         }
+         if(c == max)
+         {
+            if(c == names.count)
+               result = o;
+            else
+            {
+               for(; c < names.count; c++)
+               {
+                  FSCacheObject child = o.firstChild;
+                  o = null;
+                  while(child)
+                  {
+                     if(!strcmp(child.name, names[c]))
+                     {
+                        o = child;
+                        break;
+                     }
+                     child = child.nextSibling;
+                  }
+                  if(!o)
+                     break;
+               }
+               if(o)
+                  result = o;
+            }
+            break;
+         }
+         delete names;
+      }
+      return result;
+   }
+
+   bool FileGetStats(char * path, FileStats stats)
+   {
+      FSCacheObject o = FetchObject(path);
+      if(o)
+         stats = o.stats;
+      else
+         stats = { };
+      return o != null;
+   }
+
+   Map<uint, Map<uint, bool>> devsInodesDone { };
+   Map<String, bool> linksPaths { };
+   void Special(char * path/*, Map<String, bool> linksPaths*//*Map<uint, Map<uint, bool>> devsInodesDone*/, DummyFileSystemCacheWindow dummyWindow)
+   {
+      FileSystemCacheIterator fsci { owner = dummyWindow, cache = this, iterateStartPath = true;
+         bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(char * name, char * path, FileStats stats, bool isRootObject)
+         {
+            uint dev = stats.dev;
+            uint inode = stats.inode;
+            FileSystemCache cache = this.cache;
+            if(dev && inode)
+            {
+               FileSystemDeviceCache devCache = cache.deviceCaches[dev];
+               if(devCache)
+               {
+                  Array<FSCacheObject> links = devCache.inodes[inode];
+                  if(links && links.count)
+                  {
+                     if(links.count > 1)
+                     {
+                        Map<uint, bool> inodesDone = cache.devsInodesDone[dev];
+                        Map<String, bool> linksPaths = cache.linksPaths;
+                        bool done;
+                        if(!inodesDone)
+                           cache.devsInodesDone[dev] = inodesDone = { };
+                        done = inodesDone[inode];
+                        if(!done)
+                        {
+                           inodesDone[inode] = true;
+                           //PrintLn("   ", &inode);
+                           for(o : links)
+                           {
+                              char * path = o.GetPath();
+                              //PrintLn(path);
+                              //delete path;
+                              linksPaths[path] = true;
+                           }
+                        }
+                     }
+                  }
+                  else
+                     PrintLn("no links/count!!");
+               }
+               else
+                  PrintLn("no devCache!!");
+            }
+            else
+               PrintLn("no dev/inode");
+            return true;
+         }
+      };
+      fsci.Iterate(path, false);
+      delete fsci;
+   }
+   void SpecialPrint()
+   {
+      MapNode<String, bool> mn;
+      PrintLn(" -------------------------------------------- Special -------------------------------------------- ");
+      PrintLn(" ------------------------------------------------------------------------------------------------- ");
+      for(mn = linksPaths.root.minimum; mn; mn = mn.next)
+      {
+         PrintLn(mn.key);
+      }
+   }
+
+private:
+   FileSystemCacheBits bits;
+
+   ~FileSystemCache()
+   {
+      objects.Free();
+      delete objects;
+   }
+}
+
+public class FileSystemDeviceCache : struct
+{
+public:
+   Map<uint, Array<FSCacheObject>> inodes { };
+   Map<uint, bool> nonSingleLinks { }; // using a map presuming it will be faster than Array::Find() //Array<uint> nonSingleLinks { };
+
+private:
+}
+
+class FSCacheRoot : struct
+{
+public:
+   uint position;
+   Array<String> names;
+
+private:
+   ~FSCacheRoot()
+   {
+      if(names)
+      {
+         names.Free();
+         delete names;
+      }
+   }
+}
+
+/*
+enum FSCacheObjectType { normal };
+
+class FSCacheObjectBits
+{
+   FSCacheObjectType type:4;
+   bool isRoot:1;
+}
+*/
+
+public class FSCacheObject : struct
+{
+public:
+   FSCacheObject parent;
+   char * name;
+   FileStats stats;
+   FSCacheObject firstChild;
+   FSCacheObject lastChild;
+   FSCacheObject prevSibling;
+   FSCacheObject nextSibling;
+
+   char * GetPath()
+   {
+      int c;
+      char path[MAX_LOCATION] = "";
+      FSCacheObject o;
+      Array<FSCacheObject> stack { };
+      for(o = this; o; o = o.parent)
+         stack.Add(o);
+      for(c = stack.count - 1; c >= 0; c--)
+      {
+         o = stack[c];
+         if(c < stack.count - 1)
+            strcat(path, DIR_SEPS);
+         strcat(path, o.name);
+      }
+      delete stack;
+      return CopyString(path);
+   }
+
+private:
+//   FSCacheObjectBits bits;
+
+   ~FSCacheObject()
+   {
+      delete name;
+   }
+}
+
+Array<String> GetPathDirNamesArray(char * path)
+{
+   Array<String> names;
+   if(path && path[0])
+   {
+      char * p = path;
+      char rest[MAX_LOCATION];
+      char name[MAX_FILENAME];
+      names = { };
+      while(strlen(p))
+      {
+         SplitDirectory(p, name, rest);
+         if(p == path) p = rest;
+         names.Add(CopyString(name));
+      }
+   }
+   return names;
+}
diff --git a/libede/src/FileSystemIterator.ec b/libede/src/FileSystemIterator.ec
new file mode 100644 (file)
index 0000000..6c2cab3
--- /dev/null
@@ -0,0 +1,118 @@
+#ifdef BUILDING_ECERE_COM
+namespace sys;
+import "Array"
+#else
+#ifdef ECERE_STATIC
+public import static "ecere"
+#else
+public import "ecere"
+#endif
+#endif
+
+public class FileSystemIterator : InterfaceFileSystemIterator
+{
+public:
+   property char * extensions { set { delete extensions; if(value) extensions = CopyString(value); } get { return extensions; } }
+
+   public bool Iterate(char * startPath, bool followLinks)
+   {
+      bool result = true;
+      bool listDirEntries;
+      Array<FileSystemIteratorStackFrame> stack { };
+      FileSystemIteratorStackFrame frame;
+
+      if(iterateStartPath)
+      {
+         char name[MAX_LOCATION] = "";
+         FileStats stats;
+         if(followLinks)
+            FileGetStats(startPath, stats);
+         else
+            FileGetStatsLink(startPath, stats);
+         GetLastDirectory(startPath, name);
+         listDirEntries = OnObject(owner, name, startPath, stats, true);
+         if(listDirEntries)
+         {
+            OnEnteringDirectory(owner, startPath);
+            // FileListing should have a sorted = true/false property
+            stack.Add((frame = { { startPath, extensions = extensions } }));
+         }
+      }
+
+      if(listDirEntries)
+      {
+         while(frame)
+         {
+            if(frame.listing.Find())
+            {
+               FileStats stats = followLinks ? frame.listing.stats : frame.listing.lstats;
+               listDirEntries = OnObject(owner, frame.listing.name, frame.listing.path, stats, !iterateStartPath && stack.count == 1);
+               if(stats.attribs.isDirectory)
+               {
+                  if(listDirEntries)
+                  {
+                     OnEnteringDirectory(owner, frame.listing.path);
+                     stack.Add((frame = { { frame.listing.path, extensions = frame.listing.extensions } }));
+                  }
+                  else
+                     result = false;
+               }
+            }
+            else
+            {
+               if(stack.count > (iterateStartPath ? 0 : 1))
+                  OnLeavingDirectory(owner, frame.listing.directory);
+               delete frame;
+               stack.lastIterator.Remove();
+               frame = stack.count == 0 ? null : stack.lastIterator.data;
+            }
+         }
+         if(stack.count != 0)
+            PrintLn("dddddddd");
+         stack.Free();
+      }
+      delete stack;
+      return result;
+   }
+
+private:
+   char * extensions;
+
+   ~FileSystemIterator()
+   {
+      delete extensions;
+   }
+}
+
+public class FileSystemIteratorStackFrame : struct
+{
+public:
+   FileListing listing;
+
+private:
+}
+
+public class InterfaceFileSystemIterator
+{
+public:
+   Window owner; // any_object owner; <-- this makes it so that uses of owner are not compiling...
+   // the idea here is to provide iterators with the ability to use arbitrary data when used by instanciation only not defivation.
+   void * data; // any_object data; <-- this... probably the same
+   bool iterateStartPath;
+
+   virtual bool Iterate(char * startPath, bool followLinks);
+   virtual bool any_object::OnObject(/*any_object data, */char * name, char * path, FileStats stats, bool isRootObject);
+   virtual void any_object::OnEnteringDirectory(/*any_object data, */char * path);
+   virtual void any_object::OnLeavingDirectory(/*any_object data, */char * path);
+
+private:
+}
+
+// TODO: implement threaded iteration somehow....
+static class IteratorThread : Thread
+{
+   void Temp()
+   {
+      //listing = FileListing { dir, extensions = filter.extensions };  // there should be a sorted = true/false 
+   }
+}
index 53b6da8..690cd71 100644 (file)
@@ -193,8 +193,8 @@ public:
             //DeleteMessageNode();
             tree.Clear();
             stack[0].browse = MakeFileSystemNode(stats, stack[0].path, stack[0].path, false,
             //DeleteMessageNode();
             tree.Clear();
             stack[0].browse = MakeFileSystemNode(stats, stack[0].path, stack[0].path, false,
-                  tree.bits.previewPictures, tree.displaySystem);
-            tree.AddTreeNode(stack[0].browse, false, true, null); // TEMPORARY // searchPanel.AddBrowse(stack[0].browse, null);
+                  tree.bits.previewPictures, false, tree.displaySystem);
+            tree.AddTreeNode(stack[0].browse, false, true, true, null); // TEMPORARY // searchPanel.AddBrowse(stack[0].browse, null);
          }
          guiApp.Unlock();
       }
          }
          guiApp.Unlock();
       }
@@ -251,16 +251,16 @@ public:
                               DeleteMessageNode();
                               stack[frame].result = MakeFileSystemNode(stack[frame - 1].listing.stats,
                                     stack[frame - 1].listing.name, stack[frame - 1].path, true,
                               DeleteMessageNode();
                               stack[frame].result = MakeFileSystemNode(stack[frame - 1].listing.stats,
                                     stack[frame - 1].listing.name, stack[frame - 1].path, true,
-                                    fsb.bits.previewPictures, fsb.displaySystem);
-                              fsb.AddTreeNode(stack[frame].result, true, false, stack[frame - 1].result); // TEMPORARY // searchPanel.AddResult(stack[frame].result, stack[frame - 1].result);
+                                    fsb.bits.previewPictures, false, fsb.displaySystem);
+                              fsb.AddTreeNode(stack[frame].result, true, true, false, stack[frame - 1].result); // TEMPORARY // searchPanel.AddResult(stack[frame].result, stack[frame - 1].result);
                               stack[frame].result.row.collapsed = false;
                            }
                            else
                            {
                               DeleteMessageNode();
                               stack[0].result = MakeFileSystemNode(stats, stack[0].path, stack[0].path, true,
                               stack[frame].result.row.collapsed = false;
                            }
                            else
                            {
                               DeleteMessageNode();
                               stack[0].result = MakeFileSystemNode(stats, stack[0].path, stack[0].path, true,
-                                    fsb.bits.previewPictures, fsb.displaySystem);
-                              fsb.AddTreeNode(stack[0].result, true, false, null); // TEMPORARY // searchPanel.AddResult(stack[0].result, null);
+                                    fsb.bits.previewPictures, false, fsb.displaySystem);
+                              fsb.AddTreeNode(stack[0].result, true, true, false, null); // TEMPORARY // searchPanel.AddResult(stack[0].result, null);
                               stack[0].result.row.collapsed = false;
                            }
                            stack[frame].branched = true;
                               stack[0].result.row.collapsed = false;
                            }
                            stack[frame].branched = true;
@@ -297,7 +297,7 @@ public:
                      stack[frame].browse = MakeFileSystemNode(stack[stackTop].listing.stats,
                            stack[stackTop].listing.name, stack[stackTop].path, true,
                            fsb.bits.previewPictures, fsb.displaySystem);
                      stack[frame].browse = MakeFileSystemNode(stack[stackTop].listing.stats,
                            stack[stackTop].listing.name, stack[stackTop].path, true,
                            fsb.bits.previewPictures, fsb.displaySystem);
-                     fsb.AddTreeNode(stack[frame].browse, true, false, stack[stackTop].browse); // TEMPORARY // searchPanel.AddBrowse(stack[frame].browse, stack[stackTop].browse);
+                     fsb.AddTreeNode(stack[frame].browse, true, true, false, stack[stackTop].browse); // TEMPORARY // searchPanel.AddBrowse(stack[frame].browse, stack[stackTop].browse);
 
                      if(frame)
                         stack[frame].browse.row.collapsed = true;
 
                      if(frame)
                         stack[frame].browse.row.collapsed = true;
@@ -317,10 +317,10 @@ public:
                      DeleteMessageNode();
                      stack[frame].result = MakeFileSystemNode(stack[stackTop].listing.stats,
                            stack[stackTop].listing.name, stack[stackTop].path, true,
                      DeleteMessageNode();
                      stack[frame].result = MakeFileSystemNode(stack[stackTop].listing.stats,
                            stack[stackTop].listing.name, stack[stackTop].path, true,
-                           fsb.bits.previewPictures, fsb.displaySystem);
+                           fsb.bits.previewPictures, false, fsb.displaySystem);
                      if(optionTree)
                      {
                      if(optionTree)
                      {
-                        fsb.AddTreeNode(stack[frame].result, true, false, stack[stackTop].result); // TEMPORARY // searchPanel.AddResult(stack[frame].result, stack[stackTop].result);
+                        fsb.AddTreeNode(stack[frame].result, true, true, false, stack[stackTop].result); // TEMPORARY // searchPanel.AddResult(stack[frame].result, stack[stackTop].result);
                         stack[frame].result.row.collapsed = false;
                         //searchPanel.SortResults();  // this can be very bad for performance in some situations
                                                 // there should be a way to sort the nodes as they are added
                         stack[frame].result.row.collapsed = false;
                         //searchPanel.SortResults();  // this can be very bad for performance in some situations
                                                 // there should be a way to sort the nodes as they are added
@@ -345,7 +345,7 @@ public:
                      item = MakeFileSystemNode(stack[frame].listing.stats,
                            stack[frame].listing.name, stack[frame].path, true,
                            fsb.bits.previewPictures, fsb.displaySystem);
                      item = MakeFileSystemNode(stack[frame].listing.stats,
                            stack[frame].listing.name, stack[frame].path, true,
                            fsb.bits.previewPictures, fsb.displaySystem);
-                     fsb.AddTreeNode(item, true, false, stack[frame].browse); // TEMPORARY // searchPanel.AddBrowse(item, stack[frame].browse);
+                     fsb.AddTreeNode(item, true, true, false, stack[frame].browse); // TEMPORARY // searchPanel.AddBrowse(item, stack[frame].browse);
                      //if(frame == 1)
                         //searchPanel.SortBrowser();  // this can be very bad for performance in some situations
                                                 // there should be a way to sort the nodes as they are added
                      //if(frame == 1)
                         //searchPanel.SortBrowser();  // this can be very bad for performance in some situations
                                                 // there should be a way to sort the nodes as they are added
@@ -357,10 +357,10 @@ public:
                      DeleteMessageNode();
                      item = MakeFileSystemNode(stack[frame].listing.stats,
                            stack[frame].listing.name, stack[frame].path, true,
                      DeleteMessageNode();
                      item = MakeFileSystemNode(stack[frame].listing.stats,
                            stack[frame].listing.name, stack[frame].path, true,
-                           fsb.bits.previewPictures, fsb.displaySystem);
+                           fsb.bits.previewPictures, false, fsb.displaySystem);
                      if(optionTree)
                      {
                      if(optionTree)
                      {
-                        fsb.AddTreeNode(item, true, false, stack[frame].result); // TEMPORARY // searchPanel.AddResult(item, stack[frame].result);
+                        fsb.AddTreeNode(item, true, true, false, stack[frame].result); // TEMPORARY // searchPanel.AddResult(item, stack[frame].result);
                         item.row.collapsed = false;
                         //searchPanel.SortResults();  // this can be very bad for performance in some situations
                                                 // there should be a way to sort the nodes as they are added
                         item.row.collapsed = false;
                         //searchPanel.SortResults();  // this can be very bad for performance in some situations
                                                 // there should be a way to sort the nodes as they are added
@@ -374,7 +374,7 @@ public:
                            for(lin = lin.next; lin && strlen(temp) < MAX_F_STRING; lin = lin.next)
                               strcatf(temp, ", %d", lin.num);
                            node = FileSystemNode { name = temp/*CopyString(temp)*/, type = lineNumbers };
                            for(lin = lin.next; lin && strlen(temp) < MAX_F_STRING; lin = lin.next)
                               strcatf(temp, ", %d", lin.num);
                            node = FileSystemNode { name = temp/*CopyString(temp)*/, type = lineNumbers };
-                           fsb.AddTreeNode(node, true, false, item); // TEMPORARY // searchPanel.AddResult(node, item);
+                           fsb.AddTreeNode(node, true, true, false, item); // TEMPORARY // searchPanel.AddResult(node, item);
                            //row.AddRow().SetData(resultsNameField, node);
                            lines.Free(null);
                         }
                            //row.AddRow().SetData(resultsNameField, node);
                            lines.Free(null);
                         }