From aaf41670ab8f5fef52fa5b1563928dacd323de94 Mon Sep 17 00:00:00 2001 From: Jim-Bim Date: Tue, 28 Apr 2009 18:13:03 +0000 Subject: [PATCH] AckisRecipeList: - added function which wipes the exclusion list (Ticket 508) - added clear exclusion list and reset filters to ace options - closing ARL now properly hides the no search results popup --- ARLConfig.lua | 16 +++++++++++++++- ARLFrame.lua | 20 ++++++++++++-------- AckisRecipeList.lua | 10 ++++++++++ Locals/testenUS.lua | 3 +++ 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/ARLConfig.lua b/ARLConfig.lua index d2d08b7..a19bcca 100644 --- a/ARLConfig.lua +++ b/ARLConfig.lua @@ -1049,9 +1049,23 @@ local function fullOptions() desc = L["VIEW_EXCLUSION_LIST_DESC"], func = function(info) addon:ViewExclusionList() end, }, - resetguiwindow = { + clearexclusionlist = { order = 15, type = "execute", + name = L["Clear Exclusion List"], + desc = L["CLEAR_EXCLUSION_LIST_DESC"], + func = function(info) addon:ClearExclusionList() end, + }, + resetallfilters = { + order = 16, + type = "execute", + name = L["Reset All Filters"], + desc = L["RESET_DESC"], + func = function(info) addon.resetFilters() end, + }, + resetguiwindow = { + order = 17, + type = "execute", name = L["Reset Window Position"], desc = L["RESET_WINDOW_DESC"], func = function(info) addon:ResetGUI() end, diff --git a/ARLFrame.lua b/ARLFrame.lua index 493638b..53a09cc 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -1957,6 +1957,7 @@ function addon:SwitchProfs(button) StaticPopup_Hide("ARL_ALLFILTERED") StaticPopup_Hide("ARL_ALLKNOWN") StaticPopup_Hide("ARL_ALLEXCLUDED") + StaticPopup_Hide("ARL_SEARCHFILTERED") -- ok, so first off, if we've never done this before, there is no "current" -- and a single iteration will do nicely, thank you @@ -2759,17 +2760,18 @@ function addon.resetFilters() local _, currentclass = UnitClass("player") filterdb.classes[strlower(currentclass)] = true - addon.resetTitle() - - -- Uncheck the seven buttons - HideARL_ExpOptCB() + if (addon.Frame and addon.Frame:IsVisible()) then + addon.resetTitle() - -- Hide the flyaway panel - addon.Flyaway:Hide() + -- Uncheck the seven buttons + HideARL_ExpOptCB() - -- Reset the display - ReDisplay() + -- Hide the flyaway panel + addon.Flyaway:Hide() + -- Reset the display + ReDisplay() + end end -- Description: @@ -3350,6 +3352,7 @@ function addon:CreateFrame( StaticPopup_Hide("ARL_ALLFILTERED") StaticPopup_Hide("ARL_ALLKNOWN") StaticPopup_Hide("ARL_ALLEXCLUDED") + StaticPopup_Hide("ARL_SEARCHFILTERED") this:GetParent():Hide() end ) @@ -3499,6 +3502,7 @@ function addon:CreateFrame( StaticPopup_Hide("ARL_ALLFILTERED") StaticPopup_Hide("ARL_ALLKNOWN") StaticPopup_Hide("ARL_ALLEXCLUDED") + StaticPopup_Hide("ARL_SEARCHFILTERED") this:GetParent():Hide() end ) diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index fd21619..b7bd8bc 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -109,6 +109,7 @@ local pairs = pairs local select = select local table = table +local twipe = table.wipe local tremove = table.remove local tconcat = table.concat local tsort = table.sort @@ -2135,6 +2136,15 @@ function addon:ViewExclusionList() end +function addon:ClearExclusionList() + + local exclusionlist = addon.db.profile.exclusionlist + + -- Nuke our exclusion table + exclusionlist = twipe(exclusionlist) + +end + --[[ Searching Functions diff --git a/Locals/testenUS.lua b/Locals/testenUS.lua index 376ba0d..6f080ad 100644 --- a/Locals/testenUS.lua +++ b/Locals/testenUS.lua @@ -56,9 +56,12 @@ Alt-click to remove all waypoints from the mini-map and world map."]] L["Text Dump"] = true L["TEXT_DUMP_DESC"] = "Displays all recipes in a comma separated value format which can be copied and pasted into another client." L["View Exclusion List"] = true +L["Clear Exclusion List"] = true +L["Reset All Filters"] = true L["Scan Button Position"] = true L["SCANBUTTONPOSITION_DESC"] = "Allows you to customize where the scan button is placed on the tradeskill frame." L["VIEW_EXCLUSION_LIST_DESC"] = "Prints out a list of all recipes on the exclusion list." +L["CLEAR_EXCLUSION_LIST_DESC"] = "Removes all recipes from the exclusion list." L["MAINFILTER_OPTIONS_DESC"] = "Allows you to specify how ARL handles different filters." L["DISPLAY_OPTIONS_DESC"] = "Allows you to customize how the GUI behaves." L["SORTING_OPTIONS_DESC"] = "Allows you to customize the way displayed recipes are sorted." -- 1.7.9.5