Quantcast

Renamed RecipeMatchesSearch() to SearchBox:MatchesRecipe()

James D. Callahan III [05-28-10 - 12:26]
Renamed RecipeMatchesSearch() to SearchBox:MatchesRecipe()
Filename
Frame.lua
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 = {}