Quantcast

hrm. guess i should write down what i'm changing. whatever

ckaotik [08-27-10 - 19:36]
hrm. guess i should write down what i'm changing. whatever
Filename
core.lua
helper.lua
options.lua
diff --git a/core.lua b/core.lua
index a55c871..9be5db7 100644
--- a/core.lua
+++ b/core.lua
@@ -153,11 +153,9 @@ function BrokerGarbage:UpdateRepairButton(...)
     local sellIcon
     -- show auto-sell icon on vendor frame
     if not _G["BrokerGarbage_SellIcon"] then
-        sellIcon = CreateFrame("Button", "BrokerGarbage_SellIcon", MerchantFrame)
-        sellIcon:SetFrameStrata("DIALOG")   -- sellIcon:Raise()
-        sellIcon:SetWidth(36); sellIcon:SetHeight(36)
-        sellIcon:SetNormalTexture("Interface\\Icons\\achievement_bg_returnxflags_def_wsg")
-        sellIcon:SetHighlightTexture("Interface\\Buttons\\ButtonHilight-Square")
+        sellIcon = CreateFrame("Button", "BrokerGarbage_SellIcon", MerchantFrame, "ItemButtonTemplate")
+        SetItemButtonTexture(sellIcon, "Interface\\Icons\\achievement_bg_returnxflags_def_wsg")
+        sellIcon:SetFrameStrata("HIGH")
         sellIcon:SetScript("OnClick", BrokerGarbage.AutoSell)
         sellIcon:SetScript("OnEnter", function(self)
             GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
@@ -180,7 +178,7 @@ function BrokerGarbage:UpdateRepairButton(...)

     if MerchantBuyBackItemItemButton:IsVisible() then
         if CanMerchantRepair() then
-            if CanGuildBankRepair() then    -- move all the default icons further to the right. blizz anchors weird -.-
+            if CanGuildBankRepair() then    -- move all the default icons further to the right. blizz anchors are weird -.-
                 MerchantGuildBankRepairButton:ClearAllPoints()
                 MerchantGuildBankRepairButton:SetPoint("RIGHT", MerchantBuyBackItemItemButton, "LEFT", -22, 0)
                 MerchantRepairAllButton:ClearAllPoints()
@@ -204,11 +202,7 @@ function BrokerGarbage:UpdateRepairButton(...)
     for i = 0, 4 do
         junkValue = junkValue + (BrokerGarbage.toSellValue[i] or 0)
     end
-    if junkValue ~= 0 then
-        _G["BrokerGarbage_SellIcon"]:GetNormalTexture():SetDesaturated(false)
-    else
-        _G["BrokerGarbage_SellIcon"]:GetNormalTexture():SetDesaturated(true)
-    end
+    SetItemButtonDesaturated(_G["BrokerGarbage_SellIcon"], junkValue == 0)
 end
 hooksecurefunc("MerchantFrame_Update", BrokerGarbage.UpdateRepairButton)

diff --git a/helper.lua b/helper.lua
index e74ab49..ddbf2b9 100644
--- a/helper.lua
+++ b/helper.lua
@@ -115,7 +115,7 @@ function BrokerGarbage:CreateDefaultLists(global)
 		BG_GlobalDB.include["Consumable.Food.Edible.Basic.Conjured"] = true
 		BG_GlobalDB.forceVendorPrice["Consumable.Food.Edible.Basic"] = true
 		BG_GlobalDB.forceVendorPrice["Consumable.Water.Basic"] = true
-		BG_GlobalDB.forceVendorPrice["tradeSkill.Mat.BySource.Vendor"] = true
+		BG_GlobalDB.forceVendorPrice["Tradeskill.Mat.BySource.Vendor"] = true
 	end

 	-- tradeskills
diff --git a/options.lua b/options.lua
index 0a5096a..6578ee9 100644
--- a/options.lua
+++ b/options.lua
@@ -1259,7 +1259,7 @@ local function ShowListOptions(frame)

 					if type(item) == "number" then	-- regular item
 						BrokerGarbage.itemsCache[item] = nil
-					else					-- category string
+					else							-- category string
 						BrokerGarbage.itemsCache = {}
 					end
 				end