case goUp:
{
char * path = view.path;
- char * newPath = new char[strlen(path)];
+ char * newPath = new char[strlen(path)+1];
StripLastDirectory(path, newPath);
if(!newPath[0])
{
case panelTree:
// TODO TOFIX : need to fix Stacker for this to work
tree.visible = button.checked;
+ split.visible = button.checked;
+ if(button.checked)
+ {
+ split.rightPane = view;
+ view.anchor = { top = 0, bottom = 0, right = 0 };
+ tree.SelectLocation(view.path);
+ }
+ else
+ {
+ split.rightPane = null;
+ view.anchor = { left = 0, 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:
// TODO TOFIX : need to fix Stacker for this to work
//search.visible = button.checked;
- tree.visible = !button.checked;
+ tree.visible = false; //!button.checked;
+ split.visible = false; //!button.checked;
+ if(false/*button.checked*/)
+ {
+ split.rightPane = view;
+ view.anchor = { top = 0, bottom = 0, right = 0 };
+ }
+ else
+ {
+ split.rightPane = null;
+ view.anchor = { left = 0, top = 0, bottom = 0, right = 0 };
+ }
panels.size = { panels.size.w, panels.size.h }; // TOFIX : another Stacker fix needed
break;
case refresh:
panels, this;
};*/
- /*Tree*/FileSystemBox tree;
- /*{
+ Window hack
+ {
panels, this;
- size = { w = 240 };
anchor.top = 0;
anchor.bottom = 0;
- navigateFolders = true;
+ anchor.right = 0;
+ borderStyle = deep;
+ };
+
+ /*Tree*/FileSystemBox tree//;
+ {
+ hack, this;
+ size = { w = 240 };
+ borderStyle = none;
+ visible = false;
+ /*anchor.top = 0;
+ anchor.bottom = 0;*/
+ anchor = { left = 0, top = 0, bottom = 0 };
+
treeBranches = true;
foldersOnly = true;
- borderStyle = none;
+ autoLoad = false;
+
+ bool NotifyNodeSelect(FileSystemBox box, FileSystemNode node)
+ {
+ char p[MAX_LOCATION];
+ node.GetPath(p);
+ view.path = node.path;
+ return true;
+ }
+ };
+
+ PaneSplitter split
+ {
+ hack, this;
visible = false;
- };*/
+ leftPane = tree;//, rightPane = view;
+ split = 300;
+ };
FileSystemBox view
{
- panels, this;
- anchor.top = 0;
+ hack, this;
+ borderStyle = none;
+ /*anchor.top = 0;
anchor.bottom = 0;
- anchor.right = 0;
+ anchor.right = 0;*/
+ anchor = { left = 0, top = 0, bottom = 0, right = 0 };
+
locationBox = addressBar;
navigateFolders = true;
- borderStyle = none;
-
multiSelect = true;
+ autoLoad = false;
bool NotifyNodeOpen(FileSystemBox box, FileSystemNode node)
{
if(node.type.isFile)
{
+ #ifndef __WIN32__
char command[MAX_LOCATION];
/*_FileType t = node.type;
if(t == ewsFile || t == epjFile ||
sprintf(command, "ide %s", node.path);
/*else
sprintf(command, "%s", node.path);*/
- ShellOpen(command);
+ Execute(command);
+ #else
+ ShellOpen(node.path);
+ #endif
}
+ else if(node.type.isFolder && tree.visible)
+ tree.SelectLocation(node.path);
return true;
}
};
parent = deep, master = this;
tabCycle = true;
anchor = Anchor { top = 0, bottom = 0, right = 0 };
- };
-
- SplitWindow split
- {
- deep, this;
- leftPane = tree, rightPane = viewHolder;
- split = 300;
};*/
// Preview / Showcase
{
//userMode = true;
addressBar.path = view.path;
+ tree.path = "/"; // this should be available as a parameter
return true;
}