From 8d014c0098ce1003965f6faded64c522db3491a3 Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Wed, 22 Apr 2020 23:36:03 -0600 Subject: [PATCH] remove a few screen savers - some bugfixes --- ccemux/system/ccemux.lua | 7 +++++-- common/DiskCopy.lua | 4 ++-- common/Events.lua | 4 ---- common/edit.lua | 6 +++++- screenSaver/etc/fstab | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ccemux/system/ccemux.lua b/ccemux/system/ccemux.lua index f05df3d..d2f0e43 100644 --- a/ccemux/system/ccemux.lua +++ b/ccemux/system/ccemux.lua @@ -46,6 +46,7 @@ local tab = UI.Tab { columns = { { heading = 'Side', key = 'side', width = 8 }, { heading = 'Type', key = 'type' }, + { heading = 'ID', key = 'args', width = 4 }, }, }, } @@ -56,7 +57,7 @@ function tab:updatePeripherals(config) table.insert(self.grid.values, { side = k, type = v.type, - args = v.args, + args = v.args and v.args.id, }) end self.grid:update() @@ -83,7 +84,6 @@ function tab:eventHandler(event) self:emit({ type = 'error_message', message = 'Invalid drive ID' }) else ccemux.detach(event.values.side) - ccemux.attach(event.values.side, event.values.type) local config = Config.load('ccemux') config[event.values.side] = { @@ -93,6 +93,9 @@ function tab:eventHandler(event) config[event.values.side].args = { id = event.values.drive_id } + ccemux.attach(event.values.side, event.values.type, { id = event.values.drive_id }) + else + ccemux.attach(event.values.side, event.values.type) end Config.update('ccemux', config) self:updatePeripherals(config) diff --git a/common/DiskCopy.lua b/common/DiskCopy.lua index b3efc4e..cf9d616 100644 --- a/common/DiskCopy.lua +++ b/common/DiskCopy.lua @@ -94,7 +94,7 @@ function page:enable() self.eject.value = config.eject self.automatic.value = config.automatic - self.dir.x = math.floor((self.width / 2) - 3) + 1 + self.dir:move(math.floor((self.width / 2) - 3) + 1, self.dir.y) UI.Page.enable(self) end @@ -218,7 +218,7 @@ function page:copy() self.progress:sync() self.progress.value = 0 - self.progress:clear() +-- self.progress:clear() self:scan() diff --git a/common/Events.lua b/common/Events.lua index 783e38c..ae58ca2 100644 --- a/common/Events.lua +++ b/common/Events.lua @@ -43,10 +43,6 @@ local page = UI.Page { return row end, - draw = function(self) - self:adjustWidth() - UI.Grid.draw(self) - end, }, accelerators = { f = 'filter', diff --git a/common/edit.lua b/common/edit.lua index 804d40c..c2097e3 100644 --- a/common/edit.lua +++ b/common/edit.lua @@ -575,6 +575,10 @@ local page = UI.Page { actions.dirty_all() actions.redraw() end, + setCursorPos = function(self, cx, cy) + self.cursorBlink = cy >= 1 and cy <= self.height + UI.Window.setCursorPos(self, cx, cy) + end, draw = function() actions.redraw() end, @@ -715,7 +719,7 @@ local function redraw() if dirty.y > 0 then for dy = 1, h do local sLine = tLines[dy + scrollY] - if sLine ~= nil then + if sLine and #sLine > 0 then if dy + scrollY >= dirty.y and dy + scrollY <= dirty.ey then page.editor:clearLine(dy) writeHighlighted(sLine, dy + scrollY, dy) diff --git a/screenSaver/etc/fstab b/screenSaver/etc/fstab index e89b176..31905fb 100644 --- a/screenSaver/etc/fstab +++ b/screenSaver/etc/fstab @@ -4,11 +4,11 @@ packages/screenSaver/savers/visualizer.lua urlfs https://raw.githubusercontent.c packages/screenSaver/savers/random.lua urlfs https://pastebin.com/raw/XXW0r5zt packages/screenSaver/savers/melting.lua urlfs http://pastebin.com/raw/raUv6Pap packages/screenSaver/savers/bubbles.lua urlfs https://pastebin.com/raw/JCR8YTww -packages/screenSaver/savers/fire.lua urlfs https://pastebin.com/raw/4CY4AYj3 +#packages/screenSaver/savers/fire.lua urlfs https://pastebin.com/raw/4CY4AYj3 packages/screenSaver/savers/rain.lua urlfs https://pastebin.com/raw/P86Hm99N packages/screenSaver/savers/snow.lua urlfs https://pastebin.com/raw/j1dwdLKw packages/screenSaver/savers/fireworks.lua urlfs https://pastebin.com/raw/Yn5sWt3f packages/screenSaver/savers/starfield.lua urlfs https://pastebin.com/raw/AQm9R6nT -packages/screenSaver/savers/nyan.lua urlfs https://pastebin.com/raw/YJnT6Adu +#packages/screenSaver/savers/nyan.lua urlfs https://pastebin.com/raw/YJnT6Adu packages/screenSaver/savers/bounce.lua urlfs https://pastebin.com/raw/WLrfdyNy packages/screenSaver/savers/antfarm.lua urlfs https://pastebin.com/raw/h9x3h7aw \ No newline at end of file