Quantcast

Add LibAboutPanel

Erik L. Vonderscheer [06-14-09 - 10:18]
Add LibAboutPanel
Defualt expressions update
Filename
.pkgmeta
TradeFilter3.lua
TradeFilter3.toc
TradeFilter3Options.lua
diff --git a/.pkgmeta b/.pkgmeta
index 26a164a..e066e5b 100644
--- a/.pkgmeta
+++ b/.pkgmeta
@@ -34,5 +34,8 @@ externals:
  libs/LibFriends-1.0:
   url: svn://svn.wowace.com/wow/libfriends-1-0/mainline/trunk/LibFriends-1.0
   tag: latest
+ libs/LibAboutPanel:
+  url: git://git.curseforge.net/wow/libaboutpanel/mainline.git
+  tag: latest

 license-output: License.txt
diff --git a/TradeFilter3.lua b/TradeFilter3.lua
index 19a1b09..fe173ab 100644
--- a/TradeFilter3.lua
+++ b/TradeFilter3.lua
@@ -49,7 +49,6 @@ local lower = _G.string.lower
 local formatIt = _G.string.format
 local friendCache = {}
 local currentFriend
-local filtered = false
 local redirectFrame = "SPAM"
 local debugFrame = "DEBUG"
 local lastArg1
@@ -72,11 +71,9 @@ defaults = {
 			"CUSTOM FILTER 2",
 			"CUSTOM FILTER 3",
 			"[lL][fF] [pP][oO][rR][tT]",
-			"[lL][fF][mM]",
 			"[bB][uU][yY][iI][nN][gG]",
-			"wt[bBsStT]",
-			"[lL][fF][wWeE]",
-			"[lL][fF][eE][nN][cC][hH][aA][nN][tT]",
+			"[wW][tT][bBsStT]",
+			"[lL][fF][wWeEmM]",
 			"[lL][fF] [eE][nN][cC][hH][aA][nN][tT]",
 			"[lL][fF] [jJ][cC]",
 			"[lL][fF] [dD][pP][sS]",
@@ -90,6 +87,7 @@ defaults = {
 			"lockpick",
 			"[sS][eE][lL][lL][iI][nN][gG]",
 			"[bB][uU][yY][iI][nN][gG]",
+			"2[vV]2",
 			"3[vV]3",
 			"5[vV]5",
 		},
@@ -100,6 +98,7 @@ function TF3:OnInitialize()
 	--[[ Libraries ]]--
 	local L =  LibStub("AceLocale-3.0"):GetLocale("TradeFilter3")
 	local ACD = LibStub("AceConfigDialog-3.0")
+	local LAP = LibStub("LibAboutPanel")

 	self.db = LibStub("AceDB-3.0"):New("TradeFilter3DB", defaults);

@@ -119,6 +118,7 @@ function TF3:OnInitialize()
 	self.OptionsPanel.channel = ACD:AddToBlizOptions(self.name, L["channelGroup"], self.name, "channelGroup")
 	self.OptionsPanel.custom = ACD:AddToBlizOptions(self.name, L["addFilterGroup"], self.name, "addFilterGroup")
 	self.OptionsPanel.profiles = ACD:AddToBlizOptions("TradeFilter3P", L["Profiles"], self.name)
+	self.OptionsPanel.about = LAP.new(self.name, self.name)

 	if IsLoggedIn() then
 		self:IsLoggedIn()
@@ -266,51 +266,51 @@ function TF3:FilterFunc(...)
 	local arg1 = lower(arg1)
 	if (filterFuncList and self.db.profile.turnOn) then
 		filtered = true
-		--[===[@debug@
+		--@alpha@
 		if (self.db.profile.debug) then
 			TF3:FindFrame(debugFrame, "arg1: " .. arg1 .. " arg2: " .. arg2)
 		end
-		--@end-debug@]===]
+		--@end-alpha@
 		if (self.db.profile.addfilter_enable) then
 			for i, matchIt in ipairs(self.db.profile.filter) do
-				--[===[@debug@
+				--@alpha@
 				if (self.db.profile.debug) then
 					TF3:FindFrame(debugFrame, "Checking for Match with " .. matchIt)
 				end
-				--@end-debug@]===]
+				--@end-alpha@
 				if (find(arg1, matchIt)) then
-					--[===[@debug@
+					--@alpha@
 					if (self.db.profile.debug) then
 						TF3:FindFrame(debugFrame, "|cff00ff00**** Matched ***|r")
 					end
-					--@end-debug@]===]
+					--@end-alpha@
 				filtered = false
 				end
 			end
 		else
 			for i=4,#self.db.profile.filter do
-				--[===[@debug@
+				--@alpha@
 				if (self.db.profile.debug) then
 					TF3:FindFrame(debugFrame, "Checking for Match with " .. self.db.profile.filter[i])
 				end
-				--@end-debug@]===]
+				--@end-alpha@
 				if (find(arg1, self.db.profile.filter[i])) then
-					--[===[@debug@
+					--@alpha@
 					if (self.db.profile.debug) then
 						TF3:FindFrame(debugFrame, "|cff00ff00**** Matched ***|r")
 					end
-					--@end-debug@]===]
+					--@end-alpha@
 				filtered = false
 				end
 			end
 		end
 		if (filtered == true) then
 			if (lastArg1 ~= arg1 or lastArg2 ~= arg2) then
-				--[===[@debug@
+				--@alpha@
 				if (self.db.profile.debug) then
 					TF3:FindFrame(debugFrame, "|cff00ff00*** NO Match - Redirected ***|r")
 				end
-				--@end-debug@]===]
+				--@end-alpha@
 				if (self.db.profile.redirect) then
 					TF3:FindFrame(redirectFrame, "zID:" .. formatIt(CHAT_CHANNEL_GET, arg7) .. " cID:" .. formatIt(CHAT_CHANNEL_GET, arg8) .. " - " .. formatIt(CHAT_CHANNEL_GET, arg2) .. arg1)
 				end
diff --git a/TradeFilter3.toc b/TradeFilter3.toc
index 6514912..4f67b52 100644
--- a/TradeFilter3.toc
+++ b/TradeFilter3.toc
@@ -2,8 +2,8 @@
 ## Title: Trade|cffffffffFilter|r3
 ## Notes: Filter the shit outta trade channel.
 ## Author: @project-author@
-## Release Date: @project-date-iso@
-## Inspired By: crashmstr(wowzn AT crashmstr DOT com)
+## X-Date: @project-date-iso@
+## X-Credits: crashmstr(wowzn AT crashmstr DOT com)
 ## X-eMail: evonder AT gmail DOT com
 ## X-Website:
 ## X-Category: Chat & Communication
@@ -28,6 +28,7 @@ libs\AceGUI-3.0\AceGUI-3.0.xml
 libs\AceLocale-3.0\AceLocale-3.0.xml
 libs\AceConfig-3.0\AceConfig-3.0.xml
 libs\LibFriends-1.0\lib.xml
+libs\LibAboutPanel\LibAboutPanel.lua
 #@end-no-lib-strip@

 ## Locale ##
diff --git a/TradeFilter3Options.lua b/TradeFilter3Options.lua
index f7df10e..6c11589 100644
--- a/TradeFilter3Options.lua
+++ b/TradeFilter3Options.lua
@@ -43,7 +43,7 @@ options = {
 					get = function() return TF3.db.profile.redirect end,
 					set = function() TF3.db.profile.redirect = not TF3.db.profile.redirect end,
 				},
-				--@debug@
+				--@alpha@
 				debug = {
 					type = 'toggle',
 					order = 3,
@@ -55,7 +55,7 @@ options = {
 					get = function() return TF3.db.profile.debug end,
 					set = function() TF3.db.profile.debug = not TF3.db.profile.debug end,
 				},
-				--@end-debug@
+				--@end-alpha@
 				reload = {
 					type = 'execute',
 					name = L["RUI"],