Quantcast

Add a toggle to determine if you show pop-ups for missing recipes. They'll always show for the first run after a patch however. (Ticket 377)

ackis [02-24-09 - 20:00]
Add a toggle to determine if you show pop-ups for missing recipes.  They'll always show for the first run after a patch however.  (Ticket 377)
Filename
ARLConfig.lua
ARLFrame.lua
AckisRecipeList.lua
Locals/ARLLocals-enUS.lua
diff --git a/ARLConfig.lua b/ARLConfig.lua
index 8ca0128..0daaf37 100644
--- a/ARLConfig.lua
+++ b/ARLConfig.lua
@@ -1107,6 +1107,14 @@ local function fullOptions()
 							get		= function() return addon.db.profile.closeguionskillclose end,
 							set		= function() addon.db.profile.closeguionskillclose = not addon.db.profile.closeguionskillclose end,
 						},
+						hidepopup = {
+							order	= 36,
+							type	= "toggle",
+							name	= L["Hide Pop-Up"],
+							desc	= L["HIDEPOPUP_DESC"],
+							get		= function() return addon.db.profile.hidepopup end,
+							set		= function() addon.db.profile.hidepopup = not addon.db.profile.hidepopup end,
+						},
 						spacer2 = {
 							order	= 39,
 							type	= "description",
diff --git a/ARLFrame.lua b/ARLFrame.lua
index 303665b..a0015f5 100644
--- a/ARLFrame.lua
+++ b/ARLFrame.lua
@@ -85,6 +85,8 @@ local playerData = {}
 local arlTooltip = _G["arlTooltip"]
 local arlTooltip2 = _G["arlTooltip2"]

+local addonversion = GetAddOnMetadata("AckisRecipeList", "Version")
+
 local ARL_SearchText,ARL_LastSearchedText
 local ARL_ExpGeneralOptCB,ARL_ExpObtainOptCB,ARL_ExpBindingOptCB,ARL_ExpItemOptCB,ARL_ExpPlayerOptCB,ARL_ExpRepOptCB,ARL_RepOldWorldCB,ARL_RepBCCB,ARL_RepLKCB

@@ -1061,18 +1063,38 @@ local function RecipeList_Update()
 		ARL_ExpandButton:SetNormalFontObject("GameFontDisableSmall")
 		ARL_ExpandButton:Disable()

+		local showpopup = false
+
+		if (addon.profile.db.hidepopup ~= true) then
+			showpopup = true
+		end
+
+		-- If we haven't run this before we'll show pop-ups for the first time.
+		if (addon.profile.db.addonversion ~= addonversion) then
+			addon.profile.db.addonversion = addonversion
+			showpopup = true
+		end
+
 		-- If the recipe total is at 0, it means we have not scanned the profession yet
 		if (playerData.recipes_total == 0) then
-			StaticPopup_Show("ARL_NOTSCANNED")
+			if (showpopup == true) then
+				StaticPopup_Show("ARL_NOTSCANNED")
+			end
 		-- We know all the recipes
 		elseif (playerData.recipes_known == playerData.recipes_total) then
-			StaticPopup_Show("ARL_ALLKNOWN")
+			if (showpopup == true) then
+				StaticPopup_Show("ARL_ALLKNOWN")
+			end
 		-- Our filters are actually filtering something
 		elseif ((playerData.recipes_total_filtered - playerData.recipes_known_filtered) == 0) then
-			StaticPopup_Show("ARL_ALLFILTERED")
+			if (showpopup == true) then
+				StaticPopup_Show("ARL_ALLFILTERED")
+			end
 		-- Our exclusion list is preventing something from being displayed
 		elseif (playerData.excluded_recipes_unknown ~= 0) then
-			StaticPopup_Show("ARL_ALLEXCLUDED")
+			if (showpopup == true) then
+				StaticPopup_Show("ARL_ALLEXCLUDED")
+			end
 		else
 			addon:Print(L["NO_DISPLAY"])
 			addon:Print("DEBUG: recipes_total: " .. playerData.recipes_total)
@@ -1358,7 +1380,6 @@ function addon.resetTitle()

 	-- reset the frame title line
 	local myTitle = ""
-	local addonversion = GetAddOnMetadata("AckisRecipeList", "Version")

 	if (addon.Frame._Expanded == true) then

diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua
index 15a800b..3c5eb6e 100644
--- a/AckisRecipeList.lua
+++ b/AckisRecipeList.lua
@@ -155,6 +155,7 @@ function addon:OnInitialize()
 			scanbuttonlocation = "TR",
 			spelltooltiplocation = "Right",
 			acquiretooltiplocation = "Mouse",
+			hidepopup = false,
 			minimap = true,
 			worldmap = true,

diff --git a/Locals/ARLLocals-enUS.lua b/Locals/ARLLocals-enUS.lua
index 29db667..f783959 100644
--- a/Locals/ARLLocals-enUS.lua
+++ b/Locals/ARLLocals-enUS.lua
@@ -127,6 +127,8 @@ L["WORLDMAP_DESC"]			= "Do you want missing vendor recipes to appear on the worl
 L["MINIMAP_DESC"]			= "Do you want missing vendor recipes to appear on the mini map."
 L["Clear Waypoints"]		= true
 L["CLEAR_WAYPOINTS_DESC"]	= "Remove all ARL waypoints from TomTom."
+L["Hide Pop-Up"]			= true
+L["HIDEPOPUP_DESC"]			= "Prevents pop-ups notifying you why the scan window is empty from showing.  Pop-ups will always show for the first time after a new version has been added."

 -- Filter Config Options
 L["Filtering Options"]		= true