mirror of
https://github.com/kepler155c/opus
synced 2025-01-24 14:16:53 +00:00
cleanup
This commit is contained in:
parent
bf3875adcb
commit
8cd8ec909c
@ -344,9 +344,9 @@ function Manager:click(button, x, y)
|
||||
if button == 1 then
|
||||
local c = os.clock()
|
||||
|
||||
if self.doubleClickTimer then
|
||||
debug(c - self.doubleClickTimer)
|
||||
end
|
||||
--if self.doubleClickTimer then
|
||||
-- debug(c - self.doubleClickTimer)
|
||||
--end
|
||||
|
||||
if self.doubleClickTimer and (c - self.doubleClickTimer < 1.9) and
|
||||
self.doubleClickX == x and self.doubleClickY == y and
|
||||
|
@ -5,9 +5,6 @@ local Event = require('event')
|
||||
local UI = require('ui')
|
||||
local Util = require('util')
|
||||
|
||||
local cleanEnv = Util.shallowCopy(getfenv(1))
|
||||
cleanEnv.require = nil
|
||||
|
||||
multishell.setTitle(multishell.getCurrent(), 'Files')
|
||||
UI:configure('Files', ...)
|
||||
|
||||
@ -265,7 +262,7 @@ function Browser:setDir(dirName, noStatus)
|
||||
end
|
||||
|
||||
function Browser:run(path, ...)
|
||||
local tabId = multishell.launch(cleanEnv, path, ...)
|
||||
local tabId = shell.openTab(path, ...)
|
||||
multishell.setFocus(tabId)
|
||||
end
|
||||
|
||||
@ -288,7 +285,7 @@ function Browser:eventHandler(event)
|
||||
Event.exitPullEvents()
|
||||
|
||||
elseif event.type == 'edit' and file then
|
||||
self:run('sys/apps/shell', 'edit', file.name)
|
||||
self:run('edit', file.name)
|
||||
|
||||
elseif event.type == 'shell' then
|
||||
self:run('sys/apps/shell')
|
||||
@ -340,7 +337,7 @@ function Browser:eventHandler(event)
|
||||
if file.isDir then
|
||||
self:setDir(file.fullName)
|
||||
else
|
||||
self:run('sys/apps/shell', file.name)
|
||||
self:run(file.name)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -177,14 +177,6 @@ function shell.getRunningProgram()
|
||||
return tProgramStack[#tProgramStack]
|
||||
end
|
||||
|
||||
function shell.set(name, value)
|
||||
getfenv(1)[name] = value
|
||||
end
|
||||
|
||||
function shell.get(name)
|
||||
return getfenv(1)[name]
|
||||
end
|
||||
|
||||
function shell.setAlias( _sCommand, _sProgram )
|
||||
ALIASES[ _sCommand ] = _sProgram
|
||||
end
|
||||
@ -208,9 +200,13 @@ function shell.newTab(tabInfo, ...)
|
||||
if path then
|
||||
tabInfo.path = path
|
||||
tabInfo.env = sandboxEnv
|
||||
tabInfo.args = args
|
||||
tabInfo.args = Util.shallowCopy(args)
|
||||
tabInfo.title = fs.getName(path)
|
||||
|
||||
if path ~= 'sys/apps/shell' then
|
||||
table.insert(tabInfo.args, 1, tabInfo.path)
|
||||
tabInfo.path = 'sys/apps/shell'
|
||||
end
|
||||
return multishell.openTab(tabInfo)
|
||||
end
|
||||
return nil, 'No such program'
|
||||
|
@ -25,7 +25,9 @@ if mounts then
|
||||
end
|
||||
end
|
||||
|
||||
fs.mount('usr', 'gitfs', 'kepler155c/opus-apps/develop')
|
||||
pcall(function()
|
||||
fs.mount('usr', 'gitfs', 'kepler155c/opus-apps/develop')
|
||||
end)
|
||||
|
||||
-- user environment
|
||||
if not fs.exists('usr/apps') then
|
||||
|
Loading…
Reference in New Issue
Block a user