fixes for new lists
ckaotik [01-17-10 - 17:19]
diff --git a/core.lua b/core.lua
index e790dcf..f3f8ef4 100644
--- a/core.lua
+++ b/core.lua
@@ -426,8 +426,8 @@ function BrokerGarbage:Tooltip(wut)
end
-- add useful(?) information
- if (BG_GlobalDB.showLost and BG_GlobalDB.moneyLostByDeleting ~= 0)
- or (BG_GlobalDB.showEarned and BG_GlobalDB.moneyEarned ~= 0) then
+ if (BG_GlobalDB.showLost and BG_LocalDB.moneyLostByDeleting ~= 0)
+ or (BG_GlobalDB.showEarned and BG_LocalDB.moneyEarned ~= 0) then
BrokerGarbage.tt:AddSeparator(2)
if BG_LocalDB.moneyLostByDeleting ~= 0 then
@@ -614,10 +614,11 @@ function BrokerGarbage:ScanInventory()
select(2,GetItemInfo(itemID))))
end
- if quality and (quality <= BG_GlobalDB.dropQuality
+ if quality and
+ (quality <= BG_GlobalDB.dropQuality
or BG_GlobalDB.include[itemID] or BG_LocalDB.include[itemID]
or BG_GlobalDB.autoSellList[itemID] or BG_LocalDB.autoSellList[itemID])
- and not BG_GlobalDB.exclude[itemID] then -- save excluded items!!!
+ and not BG_GlobalDB.exclude[itemID] and not BG_LocalDB.exclude[itemID] then -- save excluded items!!!
local value, source = BrokerGarbage:GetItemValue(itemLink,count)
-- make included items appear in tooltip list as "forced"
diff --git a/options.lua b/options.lua
index dd1555f..dec09af 100644
--- a/options.lua
+++ b/options.lua
@@ -26,9 +26,7 @@ BrokerGarbage.listButtons = {
exclude = {},
}
--- show me!
-BrokerGarbage.options:SetScript("OnShow", function(frame)
-
+local function ShowOptions(frame)
local title, subtitle = LibStub("tekKonfig-Heading").new(BrokerGarbage.options, addonName, BrokerGarbage.locale.subTitle)
local autosell = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.options, nil, BrokerGarbage.locale.autoSellTitle, "TOPLEFT", subtitle, "BOTTOMLEFT", -2, -4)
@@ -357,7 +355,7 @@ BrokerGarbage.options:SetScript("OnShow", function(frame)
button.itemID = itemID
button.itemLink = itemLink
button:SetNormalTexture(texture)
- button:GetNormalTexture():SetDesaturated(globalList[itemID]) -- desaturate global list items
+ button:GetNormalTexture():SetDesaturated(globalList[itemID] or false) -- desaturate global list items
button:SetChecked(false)
button:Show()
else
@@ -376,7 +374,7 @@ BrokerGarbage.options:SetScript("OnShow", function(frame)
tex:SetPoint("CENTER")
tex:SetWidth(36/37*66) tex:SetHeight(36/37*66)
- iconbutton:GetNormalTexture():SetDesaturated(globalList[itemID]) -- desaturate global list items
+ iconbutton:GetNormalTexture():SetDesaturated(globalList[itemID] or false) -- desaturate global list items
iconbutton:SetScript("OnEnter", ShowTooltip)
iconbutton:SetScript("OnLeave", HideTooltip)
@@ -529,9 +527,13 @@ BrokerGarbage.options:SetScript("OnShow", function(frame)
buttons = {}
ListOptionsUpdate("include")
ListOptionsUpdate("exclude")
- frame:SetScript("OnShow", nil)
+ BrokerGarbage.options:SetScript("OnShow", nil)
BrokerGarbage.listOptions:SetScript("OnShow", ListOptionsUpdate)
-end)
+end
+
+-- show me!
+BrokerGarbage.options:SetScript("OnShow", ShowOptions)
+BrokerGarbage.listOptions:SetScript("OnShow", ShowOptions)
InterfaceOptions_AddCategory(BrokerGarbage.options)
InterfaceOptions_AddCategory(BrokerGarbage.listOptions)