explorer: using ShellOpen under windows and Execute for calling ide under linux until...
[ede] / explorer / src / ExplorerWindow.ec
index 82c991e..20747ee 100644 (file)
@@ -16,7 +16,11 @@ enum ExplorerToolId
 
 class ExplorerWindow : Window
 {
+#ifdef _DEBUG
+   text = "Ecere Explorer (Debug)";
+#else
    text = "Ecere Explorer";
+#endif
    background = activeBorder;
    borderStyle = sizable;
    hasMaximize = true;
@@ -121,6 +125,13 @@ class ExplorerWindow : Window
             case goBack:
             case goForward:
                break;
+            case goHome:
+            {
+               char * home = getenv("HOME");
+               if(home && home[0] && FileExists(home).isDirectory)
+                  view.path = home;
+               break;
+            }
             case goUp:
             {
                char * path = view.path;
@@ -288,14 +299,27 @@ class ExplorerWindow : Window
       navigateFolders = true;
       borderStyle = none;
 
+      multiSelect = true;
+
       bool NotifyNodeOpen(FileSystemBox box, FileSystemNode node)
       {
          if(node.type.isFile)
          {
+         #ifndef __WIN32__
             char command[MAX_LOCATION];
-            char * t = node.path;
-            sprintf(command, "ide %s", node.path);
-            ShellOpen(command);
+            /*_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, "ide %s", node.path);
+            /*else
+               sprintf(command, "%s", node.path);*/
+            Execute(command);
+         #else
+            ShellOpen(node.path);
+         #endif
          }
          return true;
       }