From e703c7f7b60cc96a3301dbe1a09a1284e7b87a34 Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Fri, 17 Apr 2020 20:40:34 -0600 Subject: [PATCH] changes for deprecated ui methods --- sys/apps/Files.lua | 2 +- sys/apps/Lua.lua | 6 +++--- sys/apps/Network.lua | 7 ++++--- sys/apps/PackageManager.lua | 4 ++-- sys/apps/Sniff.lua | 7 +++---- sys/apps/System.lua | 4 ++-- sys/apps/Tasks.lua | 4 ++-- sys/apps/Welcome.lua | 4 ++-- sys/apps/inspect.lua | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sys/apps/Files.lua b/sys/apps/Files.lua index 36d67e2..65c806d 100644 --- a/sys/apps/Files.lua +++ b/sys/apps/Files.lua @@ -343,7 +343,7 @@ function Browser:eventHandler(event) local file = self.grid:getSelected() if event.type == 'quit' then - Event.exitPullEvents() + UI:quit() elseif event.type == 'edit' and file then self:run('edit', file.name) diff --git a/sys/apps/Lua.lua b/sys/apps/Lua.lua index 95b68bc..7343b2d 100644 --- a/sys/apps/Lua.lua +++ b/sys/apps/Lua.lua @@ -378,11 +378,11 @@ function page:executeStatement(statement) end if _exit then - UI:exitPullEvents() + UI:quit() end end -local args = { ... } +local args = Util.parse(...) if args[1] then command = 'args[1]' sandboxEnv.args = args @@ -391,4 +391,4 @@ if args[1] then end UI:setPage(page) -UI:pullEvents() +UI:start() diff --git a/sys/apps/Network.lua b/sys/apps/Network.lua index 215967d..a951b69 100644 --- a/sys/apps/Network.lua +++ b/sys/apps/Network.lua @@ -111,7 +111,8 @@ local page = UI.Page { event = 'slide_hide', }, text = UI.TextArea { - x = 2, y = 2, + x = 1, y = 2, + marginLeft = 1, value = [[ In order to connect to another computer: @@ -252,7 +253,7 @@ function page:eventHandler(event) Config.update('network', config) elseif event.type == 'quit' then - Event.exitPullEvents() + UI:quit() end UI.Page.eventHandler(self, event) end @@ -290,4 +291,4 @@ if not device.wireless_modem then end UI:setPage(page) -UI:pullEvents() +UI:start() diff --git a/sys/apps/PackageManager.lua b/sys/apps/PackageManager.lua index 6960066..ec8d9ea 100644 --- a/sys/apps/PackageManager.lua +++ b/sys/apps/PackageManager.lua @@ -183,7 +183,7 @@ function page:eventHandler(event) self.action.button:draw() elseif event.type == 'quit' then - UI:exitPullEvents() + UI:quit() end UI.Page.eventHandler(self, event) end @@ -195,4 +195,4 @@ Packages:downloadList() page:loadPackages() page:sync() -UI:pullEvents() +UI:start() diff --git a/sys/apps/Sniff.lua b/sys/apps/Sniff.lua index c0c08d3..bec9ac0 100644 --- a/sys/apps/Sniff.lua +++ b/sys/apps/Sniff.lua @@ -5,7 +5,6 @@ local Util = require('opus.util') local colors = _G.colors local device = _G.device local textutils = _G.textutils -local peripheral = _G.peripheral local multishell = _ENV.multishell local gridColumns = {} @@ -280,7 +279,7 @@ function page.packetSlide:eventHandler(event) end function page.packetGrid:getDisplayValues(row) - local row = Util.shallowCopy(row) + row = Util.shallowCopy(row) row.distance = Util.toBytes(Util.round(row.distance), 2) return row end @@ -356,7 +355,7 @@ function page:eventHandler(event) self.packetSlide:show(event.selected) elseif event.type == 'quit' then - Event.exitPullEvents() + UI:quit() else return UI.Page.eventHandler(self, event) end @@ -386,4 +385,4 @@ if args[1] then end UI:setPage(page) -UI:pullEvents() +UI:start() diff --git a/sys/apps/System.lua b/sys/apps/System.lua index 5ee1efb..7005d83 100644 --- a/sys/apps/System.lua +++ b/sys/apps/System.lua @@ -42,7 +42,7 @@ end function systemPage:eventHandler(event) if event.type == 'quit' then - UI:exitPullEvents() + UI:quit() elseif event.type == 'success_message' then self.notification:success(event.message) @@ -82,4 +82,4 @@ local plugins = loadDirectory(fs.combine(programDir, 'system'), { }) systemPage.tabs.settings.grid:setValues(plugins) UI:setPage(systemPage) -UI:pullEvents() +UI:start() diff --git a/sys/apps/Tasks.lua b/sys/apps/Tasks.lua index 62b8401..f8c2edd 100644 --- a/sys/apps/Tasks.lua +++ b/sys/apps/Tasks.lua @@ -52,7 +52,7 @@ local page = UI.Page { end end if event.type == 'quit' then - Event.exitPullEvents() + UI:quit() end UI.Page.eventHandler(self, event) end @@ -65,4 +65,4 @@ Event.onInterval(1, function() end) UI:setPage(page) -UI:pullEvents() +UI:start() diff --git a/sys/apps/Welcome.lua b/sys/apps/Welcome.lua index 980f27f..1154fbf 100644 --- a/sys/apps/Welcome.lua +++ b/sys/apps/Welcome.lua @@ -131,7 +131,7 @@ function page:eventHandler(event) shell.openForegroundTab('PackageManager') elseif event.type == 'wizard_complete' or event.type == 'cancel' then - UI.exitPullEvents() + UI:quit() else return UI.Page.eventHandler(self, event) @@ -140,4 +140,4 @@ function page:eventHandler(event) end UI:setPage(page) -UI:pullEvents() +UI:start() diff --git a/sys/apps/inspect.lua b/sys/apps/inspect.lua index d2117db..0033525 100644 --- a/sys/apps/inspect.lua +++ b/sys/apps/inspect.lua @@ -194,4 +194,4 @@ page = UI.Page { } UI:setPage(page) -UI:pullEvents() +UI:start()