Revert "explorer: introducing new explorer based on ede::FileSystemBox"
authorRejean Loyer <rejean.loyer@gmail.com>
Wed, 14 Sep 2011 22:53:24 +0000 (18:53 -0400)
committerRejean Loyer <rejean.loyer@gmail.com>
Wed, 14 Sep 2011 22:53:24 +0000 (18:53 -0400)
This reverts commit 33c13de8443ab96bef32fd87529d0105447f12c0.

newexplorer/explorer.epj [deleted file]
newexplorer/res/browse.png [deleted file]
newexplorer/res/panel-tree.png [deleted file]
newexplorer/res/view-cards.png [deleted file]
newexplorer/res/view-details.png [deleted file]
newexplorer/res/view-icons.png [deleted file]
newexplorer/res/view-list.png [deleted file]
newexplorer/res/view-showcase-left.png [deleted file]
newexplorer/res/view-showcase-right.png [deleted file]
newexplorer/src/Explorer.ec [deleted file]
newexplorer/src/ExplorerWindow.ec [deleted file]

diff --git a/newexplorer/explorer.epj b/newexplorer/explorer.epj
deleted file mode 100644 (file)
index 1b4ddf3..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-{
-   "Version" : 0.2,
-   "ModuleName" : "explorer",
-   "Options" : {
-      "Warnings" : "All",
-      "TargetType" : "Executable",
-      "TargetFileName" : "explorer",
-      "Libraries" : [
-         "ecere"
-      ]
-   },
-   "Configurations" : [
-      {
-         "Name" : "Debug",
-         "Options" : {
-            "Debug" : true,
-            "Optimization" : "None",
-            "PreprocessorDefinitions" : [
-               "_DEBUG"
-            ]
-         }
-      },
-      {
-         "Name" : "Release",
-         "Options" : {
-            "Debug" : false,
-            "Optimization" : "Speed"
-         }
-      }
-   ],
-   "Files" : [
-      {
-         "Folder" : "extern",
-         "Files" : [
-            "../../../sdk/extras/gui/controls/SelectorBar.ec",
-            "../../../sdk/extras/gui/controls/ToolBar.ec",
-            "../../../sdk/extras/gui/IconBag.ec"
-         ]
-      },
-      {
-         "Folder" : "src",
-         "Files" : [
-            "Explorer.ec",
-            "ExplorerWindow.ec"
-         ]
-      }
-   ],
-   "ResourcesPath" : "res",
-   "Resources" : [
-      "browse.png",
-      "panel-tree.png",
-      "view-cards.png",
-      "view-details.png",
-      "view-icons.png",
-      "view-list.png",
-      "view-showcase-left.png",
-      "view-showcase-right.png"
-   ]
-}
\ No newline at end of file
diff --git a/newexplorer/res/browse.png b/newexplorer/res/browse.png
deleted file mode 100644 (file)
index f227989..0000000
Binary files a/newexplorer/res/browse.png and /dev/null differ
diff --git a/newexplorer/res/panel-tree.png b/newexplorer/res/panel-tree.png
deleted file mode 100644 (file)
index 11a5108..0000000
Binary files a/newexplorer/res/panel-tree.png and /dev/null differ
diff --git a/newexplorer/res/view-cards.png b/newexplorer/res/view-cards.png
deleted file mode 100644 (file)
index 8638b8f..0000000
Binary files a/newexplorer/res/view-cards.png and /dev/null differ
diff --git a/newexplorer/res/view-details.png b/newexplorer/res/view-details.png
deleted file mode 100644 (file)
index 0a52090..0000000
Binary files a/newexplorer/res/view-details.png and /dev/null differ
diff --git a/newexplorer/res/view-icons.png b/newexplorer/res/view-icons.png
deleted file mode 100644 (file)
index 334c518..0000000
Binary files a/newexplorer/res/view-icons.png and /dev/null differ
diff --git a/newexplorer/res/view-list.png b/newexplorer/res/view-list.png
deleted file mode 100644 (file)
index 43dddab..0000000
Binary files a/newexplorer/res/view-list.png and /dev/null differ
diff --git a/newexplorer/res/view-showcase-left.png b/newexplorer/res/view-showcase-left.png
deleted file mode 100644 (file)
index c3e85de..0000000
Binary files a/newexplorer/res/view-showcase-left.png and /dev/null differ
diff --git a/newexplorer/res/view-showcase-right.png b/newexplorer/res/view-showcase-right.png
deleted file mode 100644 (file)
index 721e705..0000000
Binary files a/newexplorer/res/view-showcase-right.png and /dev/null differ
diff --git a/newexplorer/src/Explorer.ec b/newexplorer/src/Explorer.ec
deleted file mode 100644 (file)
index cb9fa3d..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-import "ecere"
-import "EDE"
-import "ExplorerWindow"
-
-class Explorer : GuiApplication
-{
-   bool Init()
-   {
-      QuickPathTool goPath { };
-      QuickPathTool searchPath { };
-      char * findWhat = null;
-      SetLoggingMode(debug, null);
-      if(argc > 1)
-      {
-         if(!strcmpi(argv[1], "go") && argc > 2)
-            goPath = argv[2];
-         else if(!strcmpi(argv[1], "find") && argc > 2)
-         {
-            char * unquoted;
-            if(argv[2][0] == '\"')
-               StripQuotes(argv[2], unquoted);
-            else
-               unquoted = argv[2];
-            findWhat = CopyString(unquoted);
-            if(argc > 3)
-            {
-               if(!strcmpi(argv[3], "in") && argc > 4)
-                  searchPath = argv[4];
-               else
-                  searchPath = ""; // this should make it current dir
-            }
-            else
-               searchPath = ""; // same
-         } 
-         else if(!strcmpi(argv[1], "search") && argc > 2)
-            searchPath = argv[2];
-         else if(!strcmpi(argv[1], "image") && argc > 2)
-            ;
-         else if(!strcmpi(argv[1], "slides") && argc > 2)
-            ;
-         else
-            goPath = argv[1];
-      }
-      else
-         goPath = "";
-      if(goPath)
-      {
-         ExplorerWindow explorerWnd { };
-         explorerWnd.Create();
-         //explorerWnd.GoToLocation(goPath);
-      }
-      else if(searchPath)
-      {
-         ExplorerWindow explorerWnd { };
-         explorerWnd.Create();
-         //explorerWnd.SearchLocation(searchPath);
-      }
-      return true;
-   }
-}
-
-struct QuickPathTool
-{
-   char path[MAX_LOCATION];
-
-   property char * 
-   {
-      set
-      {
-         char * unquoted;
-         GetWorkingDir(path, MAX_LOCATION);
-         if(value[0] == '\"')
-            StripQuotes(value, unquoted);
-         else
-            unquoted = value;
-         PathCat(path, unquoted);
-         if(!FileExists(path))
-         {
-            // this incomplete functionality is not quite at it's place in this class
-            int len;
-            char * original = CopyString(path);
-            while((len = strlen(path)))
-            {
-               StripLastDirectory(path, path);
-               if(FileExists(path))
-               {
-                  // TODO: message location does not exist, 
-                  //       this higher location exists though
-                  //       go there?
-                  break;
-               }
-            }
-            if(!len)
-            {
-               // TODO: message location does not exist, 
-               //       unable to select alternate location
-            }
-            path[0] = '\0';
-            delete original;
-         }
-      }
-      get { return path[0] ? path : null; }
-   }
-   property bool { get { return (bool)path[0]; } }
-};
-
-define app = ((Explorer)__thisModule);
diff --git a/newexplorer/src/ExplorerWindow.ec b/newexplorer/src/ExplorerWindow.ec
deleted file mode 100644 (file)
index 0bd9c17..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-import "Explorer"
-import "IconBag"
-import "ToolBar"
-
-enum ExplorerToolId
-{
-   none,
-   newWindow, goBack, goForward, goUp, goHome,
-   browse,
-   panelTree, panelSearch,
-   addressBar,
-   refreshView,
-   viewList, viewDetails, viewIcons, viewCards, viewShowcase, viewCustom,
-   previewPictures
-};
-
-class ExplorerWindow : Window
-{
-   text = "Ecere Explorer";
-   background = activeBorder;
-   borderStyle = sizable;
-   hasMaximize = true;
-   hasMinimize = true;
-   hasClose = true;
-   size = { 840, 480 };
-   nativeDecorations = true;
-
-   IconBag<ExplorerToolId> iconBag
-   {
-      //window = guiApp.desktop;
-      window = this;
-      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 */
-
-         ":browse.png",                                           /* browse */
-
-         ":panel-tree.png",                                       /* panelTree */
-         "<:ecere>actions/editFind.png",             /* panelSearch */
-
-         "<:ecere>emblems/unreadable.png",     /* addressBar */
-
-         "<:ecere>actions/viewRefresh.png",          /* refreshView */
-
-         ":view-list.png",                                        /* viewList */
-         ":view-details.png",                                     /* viewDetails */
-         ":view-icons.png",                                       /* viewIcons */
-         ":view-cards.png",                                       /* viewCards */
-         ":view-showcase-right.png",                              /* viewShowcase */
-         ":view-custom.png",                                      /* viewCustom */
-         
-         "<:ecere>mimeTypes/image.png"     /* previewPictures */
-      ];
-   };
-
-   Stacker stack
-   {
-      this;
-      gap = 0;
-      direction = vertical;
-      background = activeBorder;
-      //opacity = 1.0f;
-      
-      anchor = { left = 0, top = 0, right = 0, bottom = 0 };
-      //moveable = false;
-   };
-
-   ToolBar<ExplorerToolId> toolBar
-   {
-      stack, this;
-      iconBag = iconBag;
-      size = { h = 32 };
-      //moveable = false;
-   };
-
-   Window s1 { toolBar, size = { w = 8 } };
-   ToolButton goBack    { toolBar, this, id = ExplorerToolId::goBack };
-   Window s2 { toolBar, size = { w = 2 } };
-   ToolButton goForward { toolBar, this, id = ExplorerToolId::goForward };
-   Window s3 { toolBar, size = { w = 2 } };
-   ToolButton refreshView
-   {
-      toolBar, this, id = ExplorerToolId::refreshView;
-
-      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
-      {
-         fsb.Refresh();
-         return true;
-      }
-   };
-   Window s4 { toolBar, size = { w = 2 } };
-   ToolButton goHome    { toolBar, this, id = ExplorerToolId::goHome };
-   Window s5 { toolBar, size = { w = 8 } };
-   PathBox addressBar
-   {
-      toolBar, this;
-      size = { 300, 23 }, id = ExplorerToolId::addressBar;
-      typeExpected = directory;
-
-      bool OnKeyDown(Key key, unichar ch)
-      {
-         if((SmartKey)key == enter)
-         {
-            // how to make enter effect a modification
-            // how to implement in PathBox
-         }
-         return true;
-      }
-
-      bool NotifyModified(PathBox pathBox)
-      {
-         fsb.path = pathBox.path;
-         return true;
-      }
-   };
-   Window s6 { toolBar, size = { w = 8 } };
-   ToolButton goUp
-   {
-      toolBar, this, id = ExplorerToolId::goUp;
-
-      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
-      {
-         char * path = fsb.path;
-         char * newPath = new char[strlen(path)];
-         StripLastDirectory(path, newPath);
-         fsb.path = newPath;
-         delete newPath;
-         return true;
-      }
-   };
-   Window s7 { toolBar, size = { w = 8 } };
-   GroupToggleToolButton selectedPanel;
-   GroupToggleToolButton panelTree   { toolBar, this, id = ExplorerToolId::panelTree, selected = &selectedPanel, checked = true };
-   GroupToggleToolButton panelSearch { toolBar, this, id = ExplorerToolId::panelSearch, selected = &selectedPanel };
-   selectedPanel = panelTree;
-   Window s8 { toolBar, size = { w = 8 } };
-   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 };
-   selectedView = viewList;
-   Window s9 { toolBar, size = { w = 8 } };
-   ToggleToolButton previewPictures
-   {
-      toolBar, this, id = ExplorerToolId::previewPictures;
-
-      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
-      {
-         fsb.previewPictures = button.checked;
-         return true;
-      }
-   };
-
-   Window s10 { toolBar, size = { w = 8 } };
-   ToolButton newWindow
-   {
-      toolBar, this, id = ExplorerToolId::newWindow;
-
-      bool NotifyClicked(Button button, int x, int y, Modifiers mods)
-      {
-         ExplorerWindow { }.Create();
-         return true;
-      }
-   };
-
-   /*void OnDestroy()
-   {
-      iconBag.window = null;
-      delete iconBag;
-   }*/
-
-   bool OnLoadGraphics()
-   {
-      iconBag.Load();
-      return true;
-   }
-
-   void OnUnloadGraphics()
-   {
-      iconBag.Unload();
-   }
-
-   FileSystemBox fsb
-   {
-      stack, this;
-      //anchor = { left = 0, top = 4, right = 0, bottom = 0 };
-      anchor.left = 0;
-      anchor.bottom = 0;
-      anchor.right = 0;
-      locationBox = addressBar;
-      navigateFolders = true;
-   };
-
-   bool OnPostCreate()
-   {
-      addressBar.path = fsb.path;
-      return true;
-   }
-}