remove browse mode and code that became dead as a result of its removal, because the new plan is to launch the program from the terminal (and terminal navigation is okay)

This commit is contained in:
2025-08-26 15:36:39 +01:00
parent 6c9149bfaa
commit a98ca50cf5
14 changed files with 1 additions and 414 deletions

View File

@@ -45,36 +45,6 @@ struct
TextIO.closeOut io
end
fun getDirList (dir, acc, rootPath) =
case OS.FileSys.readDir dir of
SOME path =>
let
val folderPath = String.concat [rootPath, "/", path]
in
if OS.FileSys.isDir folderPath then
getDirList (dir, AppType.IS_FOLDER path :: acc, rootPath)
else if OS.FileSys.isLink folderPath then
getDirList (dir, acc, rootPath)
else
getDirList (dir, AppType.IS_FILE path :: acc, rootPath)
end
| NONE => let val acc = List.rev acc in Vector.fromList acc end
fun loadFiles (path, inputMailbox) =
let
val path = if String.size path = 0 then OS.FileSys.getDir () else path
val dir = OS.FileSys.openDir path
val dirList = getDirList (dir, [], path)
val _ = OS.FileSys.closeDir dir
val inputMsg = FILE_BROWSER_AND_PATH {fileBrowser = dirList, path = path}
in
Mailbox.send (inputMailbox, inputMsg)
end
fun selectPath (path, inputMailbox) =
if OS.FileSys.isDir path then loadFiles (path, inputMailbox)
else loadSquares (path, inputMailbox)
fun run (fileMailbox, inputMailbox) =
let
val _ =
@@ -83,8 +53,6 @@ struct
| EXPORT_SQUARES str => saveString (exportFilename, str)
| EXPORT_COLLISIONS str => saveString (collisionFilename, str)
| LOAD_SQUARES => loadSquares (filename, inputMailbox)
| LOAD_FILES path => loadFiles (path, inputMailbox)
| SELECT_PATH path => selectPath (path, inputMailbox)
in
run (fileMailbox, inputMailbox)
end

View File

@@ -128,10 +128,6 @@ struct
andalso mods = 0x0
then
Mailbox.send (mailbox, KEY_SPACE)
else if
key = Input.KEY_O () andalso action = Input.PRESS () andalso mods = 0x02
then
Mailbox.send (mailbox, KEY_CTRL_O)
else if
key = Input.KEY_0 () andalso action = Input.PRESS () andalso mods = 0
then