searchInSubDirs, searchStart, searchStop,
hasHeader
};
-static char * iconNames[Icon::enumSize] =
+static const char * iconNames[Icon::enumSize] =
{
"<:ecere>emblems/unreadable.png", /* missing */
int treeSplit;
int searchSplit;
-
+
ExplorerToolId lastViewId;
*/
menu = Menu { };
-
+
Menu fileMenu { menu, "File", f };
Menu windowMenu { menu, "Window", w };
MenuItem itemNewWindow { windowMenu, "New Window", n, NotifySelect = NewWindow_NotifySelect };
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;
+ const char * path = view.path;
char * newPath = new char[strlen(path)+1];
StripLastDirectory(path, newPath);
if(!newPath[0])
ToggleIconToolButton viewDetails { toolBar, this, icon = viewDetails, toolTip = "Toggle Listing Details";
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
- view.details = true;
+ view.details = button.checked;
view.treeBranches = false;
view.Refresh();
view.Activate();
{
//((FileSystemCacheIterator)fileSystemIterator).cache = testCache;
//((FileSystemIterator)fileSystemIterator)
+ return true;
}
bool NotifyNodeOpen(FileSystemBox box, FileSystemBoxSelection selection)
//PrintLn(node.name);
if(box.selection.nodes.count == 1)
- itemString = node.name;
+ itemString = CopyString(node.name);
else
itemString = PrintString(box.selection.nodes.count, " items");
text = PrintString("Open ", itemString);
if(CreateNewFileDialog { /*master = */ew/*, parent = parent*/, currentDirectory = selection ? ew.view.selection.node.path : ew.view.path }.Modal() == ok )
ew.Refresh();
}
+ return true;
}
//void NewFolder()
if(CreateDirectoryDialog { /*master = */ew/*, parent = parent*/, currentDirectory = selection ? ew.view.selection.node.path : ew.view.path }.Modal() == ok )
ew.Refresh();
}
+ return true;
}
//void GoTo(char * location/*, bool viewIsAtLocation, bool treeIsAtLocation*/)
- property char * location
+ property const char * location
{
set
{
void UpdateHistoryItem(FileSystemBoxSelection selection)
{
- HistoryItem item = history[historyIndex];
-
- if(!item.holdRecordingSelection)
+ if(history.count > historyIndex) // TODO: Review why this would happen...
{
- if(selection.node || (selection.nodes && selection.nodes.count))
+ HistoryItem item = history[historyIndex];
+
+ if(!item.holdRecordingSelection)
{
- item.selection.Free();
- if(selection.nodes.count)
+ if(selection.node || (selection.nodes && selection.nodes.count))
{
- for(node : selection.nodes)
- item.selection.Add(CopyString(node.path));
+ item.selection.Free();
+ if(selection.nodes.count)
+ {
+ for(node : selection.nodes)
+ item.selection.Add(CopyString(node.path));
+ }
+ else if(selection.node)
+ item.selection.Add(CopyString(selection.node.path));
}
- else if(selection.node)
- item.selection.Add(CopyString(selection.node.path));
}
+ else
+ item.holdRecordingSelection = false;
}
- else
- item.holdRecordingSelection = false;
}
void SearchStart()
}
return true;
}*/
-
+
/*bool ViewNotifyItemOpen(ExplorerView view, ExplorerFileItem item)
{
ExplorerFileBranch branch = tree.branch;
if(item.type.isFolderType)
{
ExplorerFileBranch child;
-
+
if(!branch.loaded || !branch.childrenLoaded)
BranchLoad(branch, tree.tree);
for(child = branch.children.first; child; child = child.next)
if(!strcmp(child.name, item.name))
break;
-
+
if(child)
{
if(branch.row.collapsed)
//userMode = true;
addressBar.path = view.path;
ReadyTree();
+ view.Refresh();
return true;
}
NotifyItemOpen = ViewNotifyItemOpen;
};
lastViewId = viewList;
-
+
tree.Load();
view.Load(tree.root);
}*/