Quantcast

-Added new Blacklist Window. You can now blacklist items by itemID.

Xruptor [12-10-11 - 18:22]
-Added new Blacklist Window. You can now blacklist items by itemID.
Note: these items will still be added to the database.  They just will never be displayed in the toolips.
-Revamped the Profiles Window.
-Removed tekKonfigDropdown library as it was no longer needed.
-Updated the localization to reflect the new changes. Also added some more localization where it was required.
Filename
BagSync.lua
BagSync.toc
BagSync_Blacklist.lua
BagSync_Minimap.lua
BagSync_Profiles.lua
Bindings.xml
libs/tekKonfigDropdown.lua
localization/localization.lua
diff --git a/BagSync.lua b/BagSync.lua
index 56fa0e6..4a24f52 100644
--- a/BagSync.lua
+++ b/BagSync.lua
@@ -29,6 +29,7 @@ local BS_DB
 local BS_GD
 local BS_TD
 local BS_CD
+local BS_BL
 local MAX_GUILDBANK_SLOTS_PER_TAB = 98
 local doTokenUpdate = 0
 local guildTabQueryQueue = {}
@@ -80,7 +81,7 @@ local dataobj = ldb:NewDataObject("BagSyncLDB", {
 --        MAIN OBJ	        --
 ------------------------------

-local BagSync = CreateFrame("frame", "BagSync", UIParent)
+local BagSync = CreateFrame("Frame", "BagSync", UIParent)

 BagSync:SetScript('OnEvent', function(self, event, ...)
 	if self[event] then
@@ -123,6 +124,11 @@ local function StartupDB()
 	BagSyncCRAFT_DB[currentRealm] = BagSyncCRAFT_DB[currentRealm] or {}
 	BagSyncCRAFT_DB[currentRealm][currentPlayer] = BagSyncCRAFT_DB[currentRealm][currentPlayer] or {}
 	BS_CD = BagSyncCRAFT_DB[currentRealm][currentPlayer]
+
+	--blacklist by realm
+	BagSyncBLACKLIST_DB = BagSyncBLACKLIST_DB or {}
+	BagSyncBLACKLIST_DB[currentRealm] = BagSyncBLACKLIST_DB[currentRealm] or {}
+	BS_BL = BagSyncBLACKLIST_DB[currentRealm]
 end

 function BagSync:FixDB_Data(onlyChkGuild)
@@ -935,25 +941,26 @@ end

 local function AddOwners(frame, link)
 	frame.BagSyncShowOnce = nil
-
-	--only show tooltips in search frame if the option is enabled
-	if BagSyncOpt.tooltipOnlySearch and frame:GetOwner() and frame:GetOwner():GetName() and string.sub(frame:GetOwner():GetName(), 1, 16) ~= "BagSyncSearchRow" then
+
+	--if we can't convert the item link then lets just ignore it altogether
+	local itemLink = ToShortLink(link)
+	if not itemLink then
 		frame:Show()
 		return
 	end

-	local itemLink = ToShortLink(link)
-	if not itemLink then
+	--only show tooltips in search frame if the option is enabled
+	if BagSyncOpt.tooltipOnlySearch and frame:GetOwner() and frame:GetOwner():GetName() and string.sub(frame:GetOwner():GetName(), 1, 16) ~= "BagSyncSearchRow" then
 		frame:Show()
 		return
 	end

-	--ignore the hearthstone
-	if itemLink and tonumber(itemLink) and tonumber(itemLink) == 6948 then
+	--ignore the hearthstone and blacklisted items
+	if itemLink and tonumber(itemLink) and (tonumber(itemLink) == 6948 or BS_BL[tonumber(itemLink)]) then
 		frame:Show()
 		return
 	end
-
+
 	--lag check (check for previously displayed data) if so then display it
 	if lastItem and itemLink and itemLink == lastItem then
 		for i = 1, #lastDisplayed do
@@ -1121,13 +1128,13 @@ end

 function BagSync:PLAYER_LOGIN()

-	 BINDING_HEADER_BAGSYNC = "BagSync"
-	 BINDING_NAME_BAGSYNCTOGGLESEARCH = L["Toggle Search"]
-	 BINDING_NAME_BAGSYNCTOGGLETOKENS = L["Toggle Tokens"]
-	 BINDING_NAME_BAGSYNCTOGGLEPROFILES = L["Toggle Profiles"]
-	 BINDING_NAME_BAGSYNCTOGGLECRAFTS = L["Toggle Professions"]
-
-
+	BINDING_HEADER_BAGSYNC = "BagSync"
+	BINDING_NAME_BAGSYNCTOGGLESEARCH = L["Toggle Search"]
+	BINDING_NAME_BAGSYNCTOGGLETOKENS = L["Toggle Tokens"]
+	BINDING_NAME_BAGSYNCTOGGLEPROFILES = L["Toggle Profiles"]
+	BINDING_NAME_BAGSYNCTOGGLECRAFTS = L["Toggle Professions"]
+	BINDING_NAME_BAGSYNCTOGGLEBLACKLIST = L["Toggle Blacklist"]
+
 	local ver = GetAddOnMetadata("BagSync","Version") or 0

 	--load our player info after login
@@ -1254,6 +1261,13 @@ function BagSync:PLAYER_LOGIN()
 					BagSync_CraftsFrame:Show()
 				end
 				return true
+			elseif c and c:lower() == L["blacklist"] then
+				if BagSync_BlackListFrame:IsVisible() then
+					BagSync_BlackListFrame:Hide()
+				else
+					BagSync_BlackListFrame:Show()
+				end
+				return true
 			elseif c and c:lower() == L["fixdb"] then
 				self:FixDB_Data()
 				return true
@@ -1278,6 +1292,7 @@ function BagSync:PLAYER_LOGIN()
 		DEFAULT_CHAT_FRAME:AddMessage(L["/bgs tokens - Opens the tokens/currency window."])
 		DEFAULT_CHAT_FRAME:AddMessage(L["/bgs profiles - Opens the profiles window."])
 		DEFAULT_CHAT_FRAME:AddMessage(L["/bgs professions - Opens the professions window."])
+		DEFAULT_CHAT_FRAME:AddMessage(L["/bgs blacklist - Opens the blacklist window."])
 		DEFAULT_CHAT_FRAME:AddMessage(L["/bgs fixdb - Runs the database fix (FixDB) on BagSync."])
 		DEFAULT_CHAT_FRAME:AddMessage(L["/bgs config - Opens the BagSync Config Window"] )

diff --git a/BagSync.toc b/BagSync.toc
index 4c1a082..aa12644 100644
--- a/BagSync.toc
+++ b/BagSync.toc
@@ -3,13 +3,12 @@
 ## Notes: BagSync tracks your characters items and displays it within tooltips.
 ## Author: Xruptor
 ## Version: 6.7
-## SavedVariables: BagSyncDB, BagSyncOpt, BagSyncGUILD_DB, BagSyncTOKEN_DB, BagSyncCRAFT_DB
+## SavedVariables: BagSyncDB, BagSyncOpt, BagSyncGUILD_DB, BagSyncTOKEN_DB, BagSyncCRAFT_DB, BagSyncBLACKLIST_DB

 localization\localization.lua
 libs\LibStub.lua
 libs\CallbackHandler-1.0.lua
 libs\tekKonfigScroll.lua
-libs\tekKonfigDropdown.lua
 libs\LibItemSearch-1.0.lua
 libs\LibDataBroker-1.1.lua

@@ -17,6 +16,7 @@ BagSync_Minimap.lua
 BagSync_Search.lua
 BagSync_Tokens.lua
 BagSync_Crafts.lua
+BagSync_Blacklist.lua
 BagSync_Profiles.lua
 BagSync_Config.lua
 BagSync.lua
diff --git a/BagSync_Blacklist.lua b/BagSync_Blacklist.lua
new file mode 100644
index 0000000..9e0e2f4
--- /dev/null
+++ b/BagSync_Blacklist.lua
@@ -0,0 +1,217 @@
+local L = BAGSYNC_L
+local blacklistTable = {}
+local tRows, tAnchor = {}
+local currentPlayer = UnitName('player')
+local currentRealm = GetRealmName()
+local storedBarCount = 0
+local prevClickedBar
+
+local bgBlackList = CreateFrame("Frame","BagSync_BlackListFrame", UIParent)
+
+--itemid popup
+StaticPopupDialogs["BAGSYNC_BLACKLIST"] = {
+	text = L["Please enter an itemid. (Use Wowhead.com)"],
+	button1 = "Yes",
+	button2 = "No",
+	hasEditBox = true,
+    hasWideEditBox = true,
+	timeout = 0,
+	exclusive = 1,
+	hideOnEscape = 1,
+	EditBoxOnEscapePressed = function(self) self:GetParent():Hide() end,
+	OnAccept = function (self, data, data2)
+		local text = self.editBox:GetText()
+		if BagSync_BlackListFrame then
+			BagSync_BlackListFrame:processAdd(text)
+		end
+	end,
+	whileDead = 1,
+	maxLetters = 255,
+}
+
+local function LoadSlider()
+
+	local EDGEGAP, ROWHEIGHT, ROWGAP, GAP = 16, 20, 2, 4
+	local FRAME_HEIGHT = bgBlackList:GetHeight() - 90
+	local SCROLL_TOP_POSITION = -80
+	local totaltRows = math.floor((FRAME_HEIGHT-22)/(ROWHEIGHT + ROWGAP))
+
+	for i=1, totaltRows do
+		if not tRows[i] then
+			local row = CreateFrame("Button", nil, bgBlackList)
+			if not tAnchor then row:SetPoint("BOTTOMLEFT", bgBlackList, "TOPLEFT", 0, SCROLL_TOP_POSITION)
+			else row:SetPoint("TOP", tAnchor, "BOTTOM", 0, -ROWGAP) end
+			row:SetPoint("LEFT", EDGEGAP, 0)
+			row:SetPoint("RIGHT", -EDGEGAP*2-8, 0)
+			row:SetHeight(ROWHEIGHT)
+			row:EnableMouse(true)
+			row:SetBackdrop({
+				bgFile = "Interface\\Buttons\\WHITE8x8",
+			})
+			row:SetBackdropColor(0,0,0,0)
+			tAnchor = row
+			tRows[i] = row
+
+			local title = row:CreateFontString(nil, "BACKGROUND", "GameFontNormal")
+			title:SetPoint("LEFT")
+			title:SetJustifyH("LEFT")
+			title:SetWidth(row:GetWidth())
+			title:SetHeight(ROWHEIGHT)
+			row.title = title
+
+			row:SetScript("OnClick", function (self, button, down)
+				if prevClickedBar then
+					prevClickedBar:SetBackdropColor(0,0,0,0)
+				end
+				prevClickedBar = self
+				self:SetBackdropColor(0,1,0,0.25)
+			end)
+		end
+	end
+
+	local offset = 0
+	local RefreshBlackList = function()
+		if not BagSync_BlackListFrame:IsVisible() then return end
+		for i,row in ipairs(tRows) do
+			if (i + offset) <= #blacklistTable then
+				if blacklistTable[i + offset] then
+					row.title:SetText(blacklistTable[i + offset])
+					row:Show()
+				end
+			else
+				row:Hide()
+			end
+		end
+	end
+
+	RefreshBlackList()
+
+	if not bgBlackList.scrollbar then
+		bgBlackList.scrollbar = LibStub("tekKonfig-Scroll").new(bgBlackList, nil, #tRows/2)
+		bgBlackList.scrollbar:ClearAllPoints()
+		bgBlackList.scrollbar:SetPoint("TOP", tRows[1], 0, -16)
+		bgBlackList.scrollbar:SetPoint("BOTTOM", tRows[#tRows], 0, 16)
+		bgBlackList.scrollbar:SetPoint("RIGHT", -16, 0)
+	end
+
+	if #blacklistTable > 0 then
+		bgBlackList.scrollbar:SetMinMaxValues(0, math.max(0, #blacklistTable - #tRows))
+		bgBlackList.scrollbar:SetValue(0)
+		bgBlackList.scrollbar:Show()
+	else
+		bgBlackList.scrollbar:Hide()
+	end
+
+	local f = bgBlackList.scrollbar:GetScript("OnValueChanged")
+	bgBlackList.scrollbar:SetScript("OnValueChanged", function(self, value, ...)
+		offset = math.floor(value)
+		RefreshBlackList()
+		return f(self, value, ...)
+	end)
+
+	bgBlackList:EnableMouseWheel()
+	bgBlackList:SetScript("OnMouseWheel", function(self, val)
+		bgBlackList.scrollbar:SetValue(bgBlackList.scrollbar:GetValue() - val*#tRows/2)
+	end)
+end
+
+local function DoBlackList()
+	if not BagSync or not BagSyncBLACKLIST_DB then return end
+	if not BagSyncBLACKLIST_DB[currentRealm] then return end
+
+	blacklistTable = {} --reset
+	local tmp = {}
+
+	--loop through our blacklist
+	-----------------------------------
+	if BagSyncBLACKLIST_DB[currentRealm] then
+		for k, v in pairs(BagSyncBLACKLIST_DB[currentRealm]) do
+			table.insert(blacklistTable, k)
+		end
+	end
+	-----------------------------------
+
+	--sort it
+	table.sort(blacklistTable)
+
+	LoadSlider()
+end
+
+bgBlackList:SetFrameStrata("HIGH")
+bgBlackList:SetToplevel(true)
+bgBlackList:EnableMouse(true)
+bgBlackList:SetMovable(true)
+bgBlackList:SetClampedToScreen(true)
+bgBlackList:SetWidth(380)
+bgBlackList:SetHeight(490)
+
+bgBlackList:SetBackdrop({
+		bgFile = "Interface/Tooltips/UI-Tooltip-Background",
+		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
+		tile = true,
+		tileSize = 16,
+		edgeSize = 32,
+		insets = { left = 5, right = 5, top = 5, bottom = 5 }
+})
+
+bgBlackList:SetBackdropColor(0,0,0,1)
+bgBlackList:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
+
+local addonTitle = bgBlackList:CreateFontString(nil, "BACKGROUND", "GameFontNormal")
+addonTitle:SetPoint("CENTER", bgBlackList, "TOP", 0, -20)
+addonTitle:SetText("|cFF99CC33BagSync|r |cFFFFFFFF("..L["Blacklist"]..")|r")
+
+local closeButton = CreateFrame("Button", nil, bgBlackList, "UIPanelCloseButton");
+closeButton:SetPoint("TOPRIGHT", bgBlackList, -15, -8);
+
+--Add ItemID
+local addItemButton = CreateFrame("Button", nil, bgBlackList, "UIPanelButtonTemplate")
+addItemButton:SetWidth(130)
+addItemButton:SetHeight(25)
+addItemButton:SetPoint("BOTTOMLEFT", bgBlackList, "BOTTOMLEFT", 20, 15)
+addItemButton:SetText(L["Add ItemID"])
+addItemButton:SetScript("OnClick", function() StaticPopup_Show("BAGSYNC_BLACKLIST") end)
+
+--Remove ItemID
+local removeItemButton = CreateFrame("Button", nil, bgBlackList, "UIPanelButtonTemplate")
+removeItemButton:SetWidth(130)
+removeItemButton:SetHeight(25)
+removeItemButton:SetPoint("BOTTOMRIGHT", bgBlackList, "BOTTOMRIGHT", -20, 15)
+removeItemButton:SetText(L["Remove ItemID"])
+removeItemButton:SetScript("OnClick", function()
+	if not BagSync or not BagSyncBLACKLIST_DB then return end
+	if not BagSyncBLACKLIST_DB[currentRealm] then return end
+	if not prevClickedBar or not prevClickedBar.title or not prevClickedBar.title:GetText() then return end
+	if not tonumber(prevClickedBar.title:GetText()) then return end
+	BagSyncBLACKLIST_DB[currentRealm][tonumber(prevClickedBar.title:GetText())] = nil
+	DoBlackList()
+end)
+
+bgBlackList:SetScript("OnShow", function(self) DoBlackList(); LoadSlider(); end)
+bgBlackList:SetScript("OnHide", function(self)
+	blacklistTable = {}
+end)
+
+bgBlackList:SetScript("OnMouseDown", function(frame, button)
+	if frame:IsMovable() then
+		frame.isMoving = true
+		frame:StartMoving()
+	end
+end)
+
+bgBlackList:SetScript("OnMouseUp", function(frame, button)
+	if( frame.isMoving ) then
+		frame.isMoving = nil
+		frame:StopMovingOrSizing()
+	end
+end)
+
+function bgBlackList:processAdd(itemid)
+	if not BagSync or not BagSyncBLACKLIST_DB then return end
+	if not BagSyncBLACKLIST_DB[currentRealm] then return end
+	if not tonumber(itemid) then return end
+	BagSyncBLACKLIST_DB[currentRealm][tonumber(itemid)] = true
+	DoBlackList()
+end
+
+bgBlackList:Hide()
diff --git a/BagSync_Minimap.lua b/BagSync_Minimap.lua
index d252b88..9da8a1e 100644
--- a/BagSync_Minimap.lua
+++ b/BagSync_Minimap.lua
@@ -53,6 +53,9 @@ bgsMinimapDD.initialize = function(self, level)
 		addButton(level, L["Professions"], nil, 1, nil, 'professions', function(frame, ...)
 			if BagSync_CraftsFrame then BagSync_CraftsFrame:Show() end
 		end)
+		addButton(level, L["Blacklist"], nil, 1, nil, 'blacklist', function(frame, ...)
+			if BagSync_BlackListFrame then BagSync_BlackListFrame:Show() end
+		end)
 		addButton(level, L["Gold"], nil, 1, nil, 'gold', function(frame, ...)
 			if BagSync then BagSync:ShowMoneyTooltip() end
 		end)
diff --git a/BagSync_Profiles.lua b/BagSync_Profiles.lua
index 7024e87..afb3ebe 100644
--- a/BagSync_Profiles.lua
+++ b/BagSync_Profiles.lua
@@ -1,28 +1,26 @@
 local L = BAGSYNC_L
 local currentPlayer = UnitName('player')
 local currentRealm = GetRealmName()
-
 local bgProfiles = CreateFrame("Frame","BagSync_ProfilesFrame", UIParent)

-local function LoadProfiles()
+--lets do the dropdown menu of DOOM
+local bgsProfilesDD = CreateFrame("Frame", "bgsProfilesDD")
+bgsProfilesDD.displayMode = 'MENU'
+
+local function addButton(level, text, isTitle, notCheckable, hasArrow, value, func)
+	local info = UIDropDownMenu_CreateInfo()
+	info.text = text
+	info.isTitle = isTitle
+	info.notCheckable = notCheckable
+	info.hasArrow = hasArrow
+	info.value = value
+	info.func = func
+	UIDropDownMenu_AddButton(info, level)
+end
+
+bgsProfilesDD.initialize = function(self, level)
 	if not BagSync or not BagSyncDB then return end
 	if not BagSyncDB[currentRealm] then return end
-
-	local profile_DD, profile_DD_text, profile_DD_container, profile_DD_label = LibStub("tekKonfig-Dropdown").new(bgProfiles, L["Profiles"], "CENTER", bgProfiles, "CENTER", -25, 0)
-
-	profile_DD_container:SetHeight(28)
-	profile_DD:SetWidth(180)
-	profile_DD:ClearAllPoints()
-	profile_DD:SetPoint("LEFT", profile_DD_label, "RIGHT", -8, -2)
-	profile_DD_text:SetText(' ')
-	profile_DD.tiptext = L["Select a profile to delete.\nNOTE: This is irreversible!"]
-
-	bgProfiles.DDText = profile_DD_text
-
-	local function OnClick(self)
-		profile_DD_text:SetText(self.value)
-		GameTooltip:Hide()
-	end

 	local tmp = {}

@@ -31,22 +29,23 @@ local function LoadProfiles()
 		table.insert(tmp, k)
 	end
 	table.sort(tmp, function(a,b) return (a < b) end)
-
-	UIDropDownMenu_Initialize(profile_DD, function()
-		local info = UIDropDownMenu_CreateInfo()
-
-		info.func = OnClick

-		--display sorted listed of names
+	if level == 1 then
+		PlaySound('gsTitleOptionExit')
+
 		for i=1, #tmp do
-			info.text = tmp[i]
-			info.value = tmp[i]
-			info.notCheckable = true
-			UIDropDownMenu_AddButton(info)
+			addButton(level, tmp[i], nil, 1, nil, tmp[i], function(frame, ...)
+				if BagSyncProfilesToonNameText then
+					BagSyncProfilesToonNameText:SetText(tmp[i])
+				end
+			end)
 		end
+
+		addButton(level, "", nil, 1) --space ;)
+		addButton(level, L["Close"], nil, 1)
+
+	end

-	end)
-
 end

 bgProfiles:SetFrameStrata("HIGH")
@@ -76,6 +75,27 @@ addonTitle:SetText("|cFF99CC33BagSync|r |cFFFFFFFF("..L["Profiles"]..")|r")
 local closeButton = CreateFrame("Button", nil, bgProfiles, "UIPanelCloseButton");
 closeButton:SetPoint("TOPRIGHT", bgProfiles, -15, -8);

+local warningLabel = bgProfiles:CreateFontString(nil, "BACKGROUND", "GameFontNormal")
+warningLabel:SetPoint("CENTER", bgProfiles, 0, 29)
+warningLabel:SetText("|cFFDF2B2B"..L["Select a profile to delete.\nNOTE: This is irreversible!"].."|r")
+bgProfiles.warningLabel = warningLabel
+
+local buttonText = bgProfiles:CreateFontString("BagSyncProfilesToonNameText", nil, "GameFontNormal")
+buttonText:SetText(L["Click Here"])
+buttonText:SetPoint("CENTER")
+
+bgProfiles.toonName = CreateFrame("Button", "BagSyncProfilesToonName", bgProfiles);
+bgProfiles.toonName:SetPoint("CENTER", bgProfiles, 0, 0)
+bgProfiles.toonName:SetHeight(21);
+bgProfiles.toonName:SetWidth(266);
+bgProfiles.toonName:SetFontString(buttonText)
+bgProfiles.toonName:SetBackdrop({
+	bgFile = "Interface\\Buttons\\WHITE8x8",
+})
+bgProfiles.toonName:SetBackdropColor(0,1,0,0.25)
+bgProfiles.toonName:SetScript("OnClick", function() ToggleDropDownMenu(1, nil, bgsProfilesDD, 'cursor', 0, 0)  end)
+bgProfiles.toonName.text = buttonText
+
 bgProfiles.deleteButton = CreateFrame("Button", nil, bgProfiles, "UIPanelButtonTemplate");
 bgProfiles.deleteButton:SetPoint("BOTTOM", bgProfiles, "BOTTOM", -70, 20);
 bgProfiles.deleteButton:SetHeight(21);
@@ -91,7 +111,7 @@ bgProfiles.confirmButton:SetText(L["Confirm"]);
 bgProfiles.confirmButton:Disable()

 bgProfiles.confirmButton:SetScript("OnClick", function()
-	local name = BagSync_ProfilesFrame.DDText:GetText()
+	local name = BagSyncProfilesToonNameText:GetText()
 	if name and BagSyncDB and BagSyncDB[currentRealm] and BagSyncDB[currentRealm][name] then
 		BagSyncDB[currentRealm][name] = nil
 		BagSyncOpt.delName = name
@@ -99,14 +119,12 @@ bgProfiles.confirmButton:SetScript("OnClick", function()
 		BagSync_ProfilesFrame:Hide()
 		ReloadUI()
 	else
-		print("BagSync: Error user not found to delete!")
+		print(L["BagSync: Error user not found!"])
 	end
 	BagSync_ProfilesFrame.confirmButton:Disable()
 end)

-
-bgProfiles:SetScript("OnShow", function(self) LoadProfiles() end)
-bgProfiles:SetScript("OnHide", function(self) GameTooltip:Hide() end)
+bgProfiles:SetScript("OnHide", function(self) bgsProfilesDD:Hide() end)

 bgProfiles:SetScript("OnMouseDown", function(frame, button)
 	if frame:IsMovable() then
diff --git a/Bindings.xml b/Bindings.xml
index 230a5bf..d9837cc 100644
--- a/Bindings.xml
+++ b/Bindings.xml
@@ -27,4 +27,11 @@
 		BagSync_CraftsFrame:Show()
 	end
   </Binding>
+   <Binding name="BAGSYNCTOGGLEBLACKLIST" header="BAGSYNC">
+	if BagSync_BlackListFrame:IsVisible() then
+		BagSync_BlackListFrame:Hide()
+	else
+		BagSync_BlackListFrame:Show()
+	end
+  </Binding>
 </Bindings>
diff --git a/libs/tekKonfigDropdown.lua b/libs/tekKonfigDropdown.lua
deleted file mode 100644
index 42a9b16..0000000
--- a/libs/tekKonfigDropdown.lua
+++ /dev/null
@@ -1,85 +0,0 @@
-local lib, oldminor = LibStub:NewLibrary("tekKonfig-Dropdown", 3)
-if not lib then return end
-oldminor = oldminor or 0
-
-
-local GameTooltip = GameTooltip
-local function HideTooltip() GameTooltip:Hide() end
-local function ShowTooltip(self)
-	if self.frame.tiptext then
-		GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
-		GameTooltip:SetText(self.frame.tiptext, nil, nil, nil, nil, true)
-	end
-end
-local function ShowTooltip2(self) ShowTooltip(self.container) end
-
-
-local function OnClick(self)
-	ToggleDropDownMenu(nil, nil, self:GetParent())
-	PlaySound("igMainMenuOptionCheckBoxOn")
-end
-
-local function OnHide() CloseDropDownMenus() end
-
-
--- Create a dropdown.
--- All args optional, parent recommended
-function lib.new(parent, label, ...)
-	local container = CreateFrame("Button", nil, parent)
-	container:SetWidth(149+13) container:SetHeight(32+24)
-	container:SetScript("OnEnter", ShowTooltip)
-	container:SetScript("OnLeave", HideTooltip)
-	if select("#", ...) > 0 then container:SetPoint(...) end
-
-	local name = "tekKonfigDropdown"..GetTime()  -- Sadly, some of these frames must be named
-	local f = CreateFrame("Frame", name, parent)
-	f:SetWidth(149) f:SetHeight(32)
-	f:SetPoint("TOPLEFT", container, -13, -24)
-	f:EnableMouse(true)
-	f:SetScript("OnHide", OnHide)
-	container.frame = f
-
-	local ltex = f:CreateTexture(name.."Left", "ARTWORK")
-	ltex:SetWidth(25) ltex:SetHeight(64)
-	ltex:SetPoint("TOPLEFT", 0, 17)
-	ltex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
-	ltex:SetTexCoord(0, 0.1953125, 0, 1)
-
-	local rtex = f:CreateTexture(nil, "ARTWORK")
-	rtex:SetWidth(25) rtex:SetHeight(64)
-	rtex:SetPoint("RIGHT")
-	rtex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
-	rtex:SetTexCoord(0.8046875, 1, 0, 1)
-
-	local mtex = f:CreateTexture(nil, "ARTWORK")
-	mtex:SetWidth(115) mtex:SetHeight(64)
-	mtex:SetPoint("LEFT", ltex, "RIGHT")
-	mtex:SetPoint("RIGHT", rtex, "LEFT")
-	mtex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
-	mtex:SetTexCoord(0.1953125, 0.8046875, 0, 1)
-
-	local text = f:CreateFontString(name.."Text", "ARTWORK", "GameFontHighlightSmall")
-	text:SetWidth(0) text:SetHeight(10)
-	text:SetPoint("RIGHT", rtex, -43, 2)
-	text:SetJustifyH("RIGHT")
-
-	local button = CreateFrame("Button", nil, f)
-	button:SetWidth(24) button:SetHeight(24)
-	button:SetPoint("TOPRIGHT", rtex, -16, -18)
-	button:SetScript("OnClick", OnClick)
-	button:SetScript("OnEnter", ShowTooltip2)
-	button.container = container
-
-	button:SetNormalTexture("Interface\\ChatFrame\\UI-ChatIcon-ScrollDown-Up")
-	button:SetPushedTexture("Interface\\ChatFrame\\UI-ChatIcon-ScrollDown-Down")
-	button:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight")
-	button:SetDisabledTexture("Interface\\ChatFrame\\UI-ChatIcon-ScrollDown-Disabled")
-	button:GetHighlightTexture():SetBlendMode("ADD")
-
-	local labeltext = f:CreateFontString(nil, "BACKGROUND", "GameFontNormal")--GameFontHighlight
-	labeltext:SetPoint("BOTTOMLEFT", container, "TOPLEFT", 16-13, 3-24)
-	labeltext:SetText(label)
-
-	return f, text, container, labeltext
-end
-
diff --git a/localization/localization.lua b/localization/localization.lua
index dcbd8e9..5830639 100644
--- a/localization/localization.lua
+++ b/localization/localization.lua
@@ -13,6 +13,7 @@
 -- ["Tokens"] = "",
 -- ["Profiles"] = "",
 -- ["Professions"] = "",
+-- ["Blacklist"] = "",
 -- ["Gold"] = "",
 -- ["Close"] = "",
 -- ["FixDB"] = "",
@@ -24,6 +25,7 @@
 -- ["Toggle Tokens"] = "",
 -- ["Toggle Profiles"] = "",
 -- ["Toggle Professions"] = "",
+-- ["Toggle Blacklist"] = "",
 -- ["A FixDB has been performed on BagSync!  The database is now optimized!"] = "",
 -- ["ON"] = "",
 -- ["OFF"] = "",
@@ -32,6 +34,11 @@
 -- ["Left Click = Link to view tradeskill."] = "",
 -- ["Right Click = Insert tradeskill link."] = "",
 -- ["Click to view profession: "] = "",
+-- ["Click Here"] = "",
+-- ["BagSync: Error user not found!"] = "",
+-- ["Please enter an itemid. (Use Wowhead.com)"] = "",
+-- ["Add ItemID"] = "",
+-- ["Remove ItemID"] = "",
 -- ----THESE ARE FOR SLASH COMMANDS
 -- ["[itemname]"] = "",
 -- ["search"] = "",
@@ -40,6 +47,7 @@
 -- ["fixdb"] = "",
 -- ["profiles"] = "",
 -- ["professions"] = "",
+-- ["blacklist"] = "",
 -- ----------------------
 -- ["/bgs [itemname] - Does a quick search for an item"] = "",
 -- ["/bgs search - Opens the search window"] = "",
@@ -49,6 +57,7 @@
 -- ["/bgs fixdb - Runs the database fix (FixDB) on BagSync."] = "",
 -- ["/bgs config - Opens the BagSync Config Window"] = "",
 -- ["/bgs professions - Opens the professions window."] = "",
+-- ["/bgs blacklist - Opens the blacklist window."] = "",
 -- ["Display [Total] in tooltips and gold display."] = "",
 -- ["Display [Guild Name] display in tooltips."] = "",
 -- ["Enable guild bank items."] = "",