diff Modules/Config.lua @ 77:aabb70411186

Can now add URLs to tips. Added a request to help localize the addon in the tips.
author Zerotorescue
date Wed, 15 Sep 2010 23:52:24 +0200
parents f01e0184a275
children f5558317ced3
line wrap: on
line diff
--- a/Modules/Config.lua	Wed Sep 15 23:51:43 2010 +0200
+++ b/Modules/Config.lua	Wed Sep 15 23:52:24 2010 +0200
@@ -24,7 +24,7 @@
 
 local AceConfigDialog;
 	
-local tip; -- if this is nil, it will be filled with a table, once that table is processed, this var will be re-used with the currently selected tip
+local tip, tipLink; -- if "tip" is nil, it will be filled with a table, once that table is processed, this var will be re-used with the currently selected tip
 
 function mod:OnEnable()
 	MailOpener:Debug("Enabling |cff00ffffConfig|r module.");
@@ -75,14 +75,23 @@
 		},
 		L["You can click the time remaining text to get it into a popup dialog so you can copy it (with |cfffed000CTRL-C|r) and then paste it (with |cfffed000CTRL-V|r) elsewhere."],
 		{
-			txt = L["If you are looking for an addon with many handy modifications for |cfffed000sending|r mail, you might want to consider |cfffed000Postal|r."],
+			txt = L["If you are looking for an addon with many handy modifications for |cfffed000sending|r mail, you might want to consider |cfffed000Postal|r (click the button below for a download link)."],
 			shown = (not MailOpener.PostalEnabled),
+			url = "http://wow.curse.com/downloads/wow-addons/details/postal.aspx",
 		},
 		L["|cfffed000Cost on Delivery|r and |cfffed000Blizzard|r mail will always be skipped, regardless of any filters."],
 		L["|cfffed000Right-click|r the |cfffed000open all|r button to quickly adjust your mail opening filters."],
 		L["|cfffed000Shift-click|r the |cfffed000open all|r button to temporarily override your filters and loot every single mail containing attachments and/or gold."],
-		L["Please report |cfffed000issues|r and |cfffed000suggestions|r/|cfffed000requests|r at the |cfffed000CurseForge ticket tracker|r, I will try to process and respond to them all (you can find a link to the ticket tracker in the addon description at Curse)."],
+		{
+			txt = L["Please report |cfffed000issues|r and |cfffed000suggestions|r/|cfffed000requests|r at the |cfffed000CurseForge ticket tracker|r, I will try to process and respond to them all (you can get a link to the ticket tracker by clicking the button below)."],
+			url = "http://wow.curseforge.com/addons/mailopener/tickets/",
+		},
+		{
+			txt = L["Your chance to contribute to this addon! Please help localizing Mail Opener if you master a second language supported by WoW. You can do so by clicking the button below to get a link to the localization pages, login with your Curse account and then you can start localizing."],
+			url = "http://wow.curseforge.com/addons/mailopener/localization/",
+		},
 	};
+	tipLink = nil;
 	
 	-- Remove any "hidden" tips
 	for i = table.getn(tip), 1 do
@@ -104,6 +113,10 @@
 	
 	-- We don't need to leave the tip-table in memory, so overwrite it
 	if type(tip[selectedTip]) == "table" then
+		if tip[selectedTip]['url'] then
+			tipLink = tip[selectedTip]['url'];
+		end
+		
 		tip = tip[selectedTip]['txt'];
 	else
 		tip = tip[selectedTip];
@@ -490,6 +503,18 @@
 						width = "half",
 						func = function() self:NextTip(); self:GetTip(); end,
 					},
+					tipLink = {
+						order = 30,
+						type = "execute",
+						name = L["Copy URL"],
+						width = "half",
+						func = function()
+							MailOpener.currentPopupContents = tipLink;
+							
+							StaticPopup_Show("MailOpenerCopyWindow");
+						end,
+						hidden = function() return tipLink == nil; end,
+					},
 				},
 			}, -- end Tip
 		},