# HG changeset patch # User Zerotorescue # Date 1286550634 -7200 # Node ID 1a815139e4c37f0d044ca048bda408da39fde295 # Parent c6230eb845ad48a8c6da24ad826372f20790a2f4 Fixed pullout hiding to avoid fatal errors. Updated TOC to include dependencies. Updated summary to stop timer when closing the window and to make AH mods optional. diff -r c6230eb845ad -r 1a815139e4c3 Core.lua --- a/Core.lua Fri Oct 08 16:38:47 2010 +0200 +++ b/Core.lua Fri Oct 08 17:10:34 2010 +0200 @@ -514,7 +514,7 @@ -- We MUST close this pullout or we can get errors or even game client crashes once we click another group or close the config dialog! local count = AceGUI:GetNextWidgetNum("Dropdown-Pullout"); - for i = 0, count do + for i = 1, count do if _G['AceGUI30Pullout' .. i] then _G['AceGUI30Pullout' .. i]:Hide(); end @@ -1001,7 +1001,7 @@ -- We MUST close this pullout or we can get errors or even game client crashes once we click another group or close the config dialog! local count = AceGUI:GetNextWidgetNum("Dropdown-Pullout"); - for i = 0, count do + for i = 1, count do if _G['AceGUI30Pullout' .. i] then _G['AceGUI30Pullout' .. i]:Hide(); end @@ -1466,6 +1466,8 @@ end self.db.global.groups[name] = temp; + + self:FillGroupOptions(); end end, get = false, @@ -1527,6 +1529,8 @@ return lowBuy; end + + return -2; end diff -r c6230eb845ad -r 1a815139e4c3 Inventory.toc --- a/Inventory.toc Fri Oct 08 16:38:47 2010 +0200 +++ b/Inventory.toc Fri Oct 08 17:10:34 2010 +0200 @@ -4,6 +4,8 @@ ## Author: Zerotorescue ## Version: @project-version@ ## SavedVariables: InventoryDB +## Dependencies: Altoholic +## OptionalDeps: Auc-Advanced, Auc-ScanData, AdvancedTradeSkillWindow, Skillet, GnomeWorks, Auctionator embeds.xml diff -r c6230eb845ad -r 1a815139e4c3 Summary.lua --- a/Summary.lua Fri Oct 08 16:38:47 2010 +0200 +++ b/Summary.lua Fri Oct 08 17:10:34 2010 +0200 @@ -73,6 +73,7 @@ mod.frame:SetLayout("Fill"); mod.frame:SetCallback("OnClose", function(widget) AceGUI:Release(widget); + mod:CancelTimer(self.tmrUpdater, true); end); -- ScrollFrame child @@ -280,6 +281,7 @@ if CACHE_ITEMS_TOTAL > 0 then cacheStart = GetTime(); + self:CancelTimer(self.tmrUpdater, true); self.tmrUpdater = self:ScheduleRepeatingTimer("UpdateNextItem", .01); -- Once every 100 frames (or once every x frames if you have less than 100 FPS, basically, once every frame) end end @@ -308,7 +310,7 @@ i = i + 1; CACHE_ITEMS_CURRENT = CACHE_ITEMS_CURRENT + 1; - mod.frame:SetStatusText("Caching auction values and item-counts... " .. floor(CACHE_ITEMS_CURRENT / CACHE_ITEMS_TOTAL * 100) .. "% has already been processed."); + mod.frame:SetStatusText(("Caching auction values and item-counts... %d% has already been processed."):format(floor(CACHE_ITEMS_CURRENT / CACHE_ITEMS_TOTAL * 100))); if i >= CACHE_ITEMS_PER_UPDATE then return; @@ -349,7 +351,11 @@ end function mod:DisplayMoney(value, priceThreshold) - if value < priceThreshold then + if value == -1 then + return "|cff0000ffNone up|r"; + elseif value == -2 then + return "|cff0000ffNo AH mod|r"; + elseif value < priceThreshold then return ("|cffff0000%s|r"):format(addon:ReadableMoney(value or 0, true)); else return addon:ReadableMoney(value or 0, true);