Compare commits

..

No commits in common. "f6e61c839ca06104ab4a9a114139612f5ba94ee4" and "d16558853cb7e64be9e0006e56732a96d039729f" have entirely different histories.

2 changed files with 9 additions and 15 deletions

View File

@ -143,7 +143,7 @@ local function itemList(groups, wBudget, hBudget, savedState, onClick, setPage,
for i=entryStart,entryEnd do
local group = groups[i]
local text = group:getSimpleName()
local text = group:getDisplayName()
local count = tostring(group:getItemCount())
-- Fit text inside of width budget
@ -241,7 +241,7 @@ local PAGES = {
state.height,
state.pageState[state.currentPage],
function(element, x, y, source, group)
print("Clicked: "..group:getSimpleName())
print("Clicked: "..group:getDisplayName())
return true
end,
function(page)
@ -253,7 +253,7 @@ local PAGES = {
state:itemTransaction(function()
for _,nodeStack in ipairs(state.node:find(function(s) return not s:isEmpty() end)) do
if not state.controller:insertStack(nodeStack) then
print("Couldn't find a free slot for: "..nodeStack:getSimpleName())
print("Couldn't find a free slot for: "..(nodeStack:getDisplayName() or nodeStack:getName() or "[EMPTY]"))
end
end
end)
@ -291,14 +291,16 @@ local CONTROLLER_STATE = {
monitor = monitor,
nextPage = "MAIN",
exit = false,
pageState = {}
pageState = {},
lock = lock,
unlock = unlock,
isLocked = isLocked
}
function CONTROLLER_STATE:itemTransaction(transact)
lock()
self.lock()
transact()
saveState(CACHE_FILE, self.controller)
unlock()
self.unlock()
end
os.queueEvent("dummy_event")

View File

@ -33,14 +33,6 @@ function ItemGroup:getDisplayName()
return self:_getIdentityStack():getDisplayName()
end
function ItemGroup:getSimpleName()
return self:isEmpty() and "[EMPTY]" or self:_getIdentityStack():getSimpleName()
end
function ItemGroup:isEmpty()
return self:_getIdentityStack():isEmpty()
end
function ItemGroup:getName()
return self:_getIdentityStack():getName()
end