Added support for showing/hiding retired recipes and removed "Show" from "Show Known" and "Show Unknown".
James D. Callahan III [03-28-10 - 03:37]
Added support for showing/hiding retired recipes and removed "Show" from "Show Known" and "Show Unknown".
diff --git a/ARL.lua b/ARL.lua
index 6948e11..6567dbe 100644
--- a/ARL.lua
+++ b/ARL.lua
@@ -252,6 +252,7 @@ function addon:OnInitialize()
skill = true,
known = false,
unknown = true,
+ retired = false,
},
-------------------------------------------------------------------------------
-- Obtain Filters
@@ -1294,6 +1295,11 @@ do
return false
end
end
+
+ -- Display retired recipes?
+ if not general_filters.retired and recipe_flags[F.RETIRED] then
+ return false
+ end
local obtain_filters = filter_db.obtain
local game_version = recipe.genesis
local V = private.game_versions
diff --git a/Frame.lua b/Frame.lua
index c8df626..87cb835 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -1855,7 +1855,11 @@ MainPanel.filter_menu.general.known.text:SetText(L["Show Known"])
MainPanel.filter_menu.general.unknown = CreateFrame("CheckButton", nil, MainPanel.filter_menu.general)
InitializeCheckButton(MainPanel.filter_menu.general.unknown, MainPanel.filter_menu.general, L["UNKNOWN_DESC"], "unknown", 3, 1, 0)
-MainPanel.filter_menu.general.unknown.text:SetText(L["Show Unknown"])
+MainPanel.filter_menu.general.unknown.text:SetText(_G.UNKNOWN)
+
+MainPanel.filter_menu.general.retired = CreateFrame("CheckButton", nil, MainPanel.filter_menu.general)
+InitializeCheckButton(MainPanel.filter_menu.general.retired, MainPanel.filter_menu.general, L["RETIRED_DESC"], "retired", 3, 2, 0)
+MainPanel.filter_menu.general.retired.text:SetText(L["Retired"])
-------------------------------------------------------------------------------
-- Create the Class toggle and CheckButtons for MainPanel.filter_menu.general
@@ -3996,6 +4000,7 @@ function addon:InitializeFrame()
["faction"] = { cb = filter_menu.general.faction, svroot = filterdb.general },
["known"] = { cb = filter_menu.general.known, svroot = filterdb.general },
["unknown"] = { cb = filter_menu.general.unknown, svroot = filterdb.general },
+ ["retired"] = { cb = filter_menu.general.retired, svroot = filterdb.general },
------------------------------------------------------------------------------------------------
-- Classes
------------------------------------------------------------------------------------------------
diff --git a/Locales/devel-enUS.lua b/Locales/devel-enUS.lua
index 2c9a07f..86b5a12 100644
--- a/Locales/devel-enUS.lua
+++ b/Locales/devel-enUS.lua
@@ -231,10 +231,11 @@ Right-click here to select your own class.]]
L["Specialties"] = true
L["SPECIALTY_DESC"] = "Include all trade-skill specialties in the scan."
L["SKILL_DESC"] = "Include all recipes in the scan, regardless of your current skill level."
-L["Show Known"] = true
+L["Show Known"] = "Known"
L["KNOWN_DESC"] = "Include all known recipes in the scan."
-L["Show Unknown"] = true
L["UNKNOWN_DESC"] = "Include all unknown recipes in the scan."
+L["RETIRED_DESC"] = "Include recipes which can no longer be acquired."
+L["Retired"] = true
-- Obtain Filter UI Elements and their associated descriptions
L["INSTANCE_DESC"] = "Recipes obtained from (5 man) instances should be included in the scan."