From 18e3baf8324afcc9a130900c0f68eb57fb89b4f2 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Fri, 28 May 2010 08:26:02 -0400 Subject: [PATCH] Renamed RecipeMatchesSearch() to SearchBox:MatchesRecipe() --- Frame.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Frame.lua b/Frame.lua index aa236c6..5fa3370 100644 --- a/Frame.lua +++ b/Frame.lua @@ -1569,6 +1569,16 @@ function SearchBox:Reset() ListFrame:Update(false, false) end +-- If there is text in the search box, return the recipe's RELEVANT state. +function SearchBox:MatchesRecipe(recipe) + local editbox_text = self:GetText() + + if editbox_text ~= "" and editbox_text ~= _G.SEARCH then + return recipe:HasState("RELEVANT") + end + return true +end + SearchBox:SetScript("OnEnterPressed", function(self) local searchtext = self:GetText() @@ -3059,16 +3069,6 @@ do return insert_index end - -- If there is text in the search box, return the recipe's RELEVANT state. - local function RecipeMatchesSearch(recipe) - local editbox_text = SearchBox:GetText() - - if editbox_text ~= "" and editbox_text ~= _G.SEARCH then - return recipe:HasState("RELEVANT") - end - return true - end - -- Used for Location and Acquisition sort - since many recipes have multiple locations/acquire types it is -- necessary to ensure each is counted only once. local recipe_registry = {} -- 1.7.9.5