Ecere Software
/
ede
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Explorer; libede: Fixes to compile, warnings; fixed single window coming up when...
[ede]
/
explorer
/
src
/
Explorer.ec
diff --git
a/explorer/src/Explorer.ec
b/explorer/src/Explorer.ec
index
134b675
..
6b9f872
100644
(file)
--- a/
explorer/src/Explorer.ec
+++ b/
explorer/src/Explorer.ec
@@
-46,12
+46,13
@@
class Explorer : GuiApplication
openArgsStartAt = 2;
else if(!strcmpi(argv[1], "find") && argc > 2)
{
openArgsStartAt = 2;
else if(!strcmpi(argv[1], "find") && argc > 2)
{
- char * unquoted;
if(argv[2][0] == '\"')
if(argv[2][0] == '\"')
- StripQuotes(argv[2], unquoted);
+ {
+ findWhat = new char[strlen(argv[2])+1];
+ StripQuotes(argv[2], findWhat);
+ }
else
else
- unquoted = argv[2];
- findWhat = CopyString(unquoted);
+ findWhat = CopyString(argv[2]);
if(argc > 3)
{
if(!strcmpi(argv[3], "in") && argc > 4)
if(argc > 3)
{
if(!strcmpi(argv[3], "in") && argc > 4)
@@
-61,7
+62,7
@@
class Explorer : GuiApplication
}
else
searchPath = ""; // same
}
else
searchPath = ""; // same
- }
+ }
else if(!strcmpi(argv[1], "search") && argc > 2)
searchPath = argv[2];
else if(!strcmpi(argv[1], "compare") && argc > 2)
else if(!strcmpi(argv[1], "search") && argc > 2)
searchPath = argv[2];
else if(!strcmpi(argv[1], "compare") && argc > 2)
@@
-71,11
+72,11
@@
class Explorer : GuiApplication
if(argc == 3)
{
goPath = ""; // current dir
if(argc == 3)
{
goPath = ""; // current dir
- comparedPaths.Add(
goPath);
+ comparedPaths.Add(
CopyString((const char *)goPath)); // TODO: Review whether this gets freed?
}
for(c = 2; c < argc; c++)
{
}
for(c = 2; c < argc; c++)
{
- char * s;
+ c
onst c
har * s;
goPath = argv[c];
s = goPath;
if(s)
goPath = argv[c];
s = goPath;
if(s)
@@
-106,6
+107,8
@@
class Explorer : GuiApplication
explorerWnd.Create();
explorerWnd.location = goPath;//explorerWnd.GoTo(goPath, false, false);
}
explorerWnd.Create();
explorerWnd.location = goPath;//explorerWnd.GoTo(goPath, false, false);
}
+ if(openArgsStartAt == -1)
+ break;
}
}
else if(searchPath)
}
}
else if(searchPath)
@@
-121,8
+124,14
@@
class Explorer : GuiApplication
explorerWnd.Create();
explorerWnd.view.columnsCompareStyle = true;
explorerWnd.comparedLocations = comparedPaths;
explorerWnd.Create();
explorerWnd.view.columnsCompareStyle = true;
explorerWnd.comparedLocations = comparedPaths;
+ comparedPaths = null;
// delete comparedPaths;
}
// delete comparedPaths;
}
+ if(comparedPaths)
+ {
+ comparedPaths.Free();
+ delete comparedPaths;
+ }
return true;
}
}
return true;
}
}
@@
-131,17
+140,20
@@
struct QuickPathTool
{
char path[MAX_LOCATION];
{
char path[MAX_LOCATION];
- property c
har *
+ property c
onst char *
{
set
{
{
set
{
- char * unquoted;
GetWorkingDir(path, MAX_LOCATION);
if(value[0] == '\"')
GetWorkingDir(path, MAX_LOCATION);
if(value[0] == '\"')
+ {
+ char * unquoted = new char[strlen(value) + 1];
StripQuotes(value, unquoted);
StripQuotes(value, unquoted);
+ PathCat(path, unquoted);
+ delete unquoted;
+ }
else
else
- unquoted = value;
- PathCat(path, unquoted);
+ PathCat(path, value);
if(!FileExists(path))
{
// this incomplete functionality is not quite at it's place in this class
if(!FileExists(path))
{
// this incomplete functionality is not quite at it's place in this class
@@
-152,7
+164,7
@@
struct QuickPathTool
StripLastDirectory(path, path);
if(FileExists(path))
{
StripLastDirectory(path, path);
if(FileExists(path))
{
- // TODO: message location does not exist,
+ // TODO: message location does not exist,
// this higher location exists though
// go there?
break;
// this higher location exists though
// go there?
break;
@@
-160,7
+172,7
@@
struct QuickPathTool
}
if(!len)
{
}
if(!len)
{
- // TODO: message location does not exist,
+ // TODO: message location does not exist,
// unable to select alternate location
}
path[0] = '\0';
// unable to select alternate location
}
path[0] = '\0';