Mercurial > wow > mailopener
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 76:364791db5503 | 77:aabb70411186 |
|---|---|
| 22 Media:Register("sound", "Whisper Ping", [[Sound\interface\iTellMessage.wav]]); | 22 Media:Register("sound", "Whisper Ping", [[Sound\interface\iTellMessage.wav]]); |
| 23 Media:Register("sound", "You Will Die!", [[Sound\Creature\CThun\CThunYouWillDIe.wav]]); | 23 Media:Register("sound", "You Will Die!", [[Sound\Creature\CThun\CThunYouWillDIe.wav]]); |
| 24 | 24 |
| 25 local AceConfigDialog; | 25 local AceConfigDialog; |
| 26 | 26 |
| 27 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 | 27 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 |
| 28 | 28 |
| 29 function mod:OnEnable() | 29 function mod:OnEnable() |
| 30 MailOpener:Debug("Enabling |cff00ffffConfig|r module."); | 30 MailOpener:Debug("Enabling |cff00ffffConfig|r module."); |
| 31 | 31 |
| 32 if MailOpener.db.global.currentTip == -1 and MailOpener.db.profile.general.continueOpening == false then | 32 if MailOpener.db.global.currentTip == -1 and MailOpener.db.profile.general.continueOpening == false then |
| 73 txt = L["|cfffed000Mail Opener|r is not meant to be a full replacement of |cfffed000Postal|r, it will only handle the opening of your mail and you can run both addons simultaneously."], | 73 txt = L["|cfffed000Mail Opener|r is not meant to be a full replacement of |cfffed000Postal|r, it will only handle the opening of your mail and you can run both addons simultaneously."], |
| 74 shown = (MailOpener.PostalEnabled), | 74 shown = (MailOpener.PostalEnabled), |
| 75 }, | 75 }, |
| 76 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."], | 76 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."], |
| 77 { | 77 { |
| 78 txt = L["If you are looking for an addon with many handy modifications for |cfffed000sending|r mail, you might want to consider |cfffed000Postal|r."], | 78 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)."], |
| 79 shown = (not MailOpener.PostalEnabled), | 79 shown = (not MailOpener.PostalEnabled), |
| 80 url = "http://wow.curse.com/downloads/wow-addons/details/postal.aspx", | |
| 80 }, | 81 }, |
| 81 L["|cfffed000Cost on Delivery|r and |cfffed000Blizzard|r mail will always be skipped, regardless of any filters."], | 82 L["|cfffed000Cost on Delivery|r and |cfffed000Blizzard|r mail will always be skipped, regardless of any filters."], |
| 82 L["|cfffed000Right-click|r the |cfffed000open all|r button to quickly adjust your mail opening filters."], | 83 L["|cfffed000Right-click|r the |cfffed000open all|r button to quickly adjust your mail opening filters."], |
| 83 L["|cfffed000Shift-click|r the |cfffed000open all|r button to temporarily override your filters and loot every single mail containing attachments and/or gold."], | 84 L["|cfffed000Shift-click|r the |cfffed000open all|r button to temporarily override your filters and loot every single mail containing attachments and/or gold."], |
| 84 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)."], | 85 { |
| 86 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)."], | |
| 87 url = "http://wow.curseforge.com/addons/mailopener/tickets/", | |
| 88 }, | |
| 89 { | |
| 90 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."], | |
| 91 url = "http://wow.curseforge.com/addons/mailopener/localization/", | |
| 92 }, | |
| 85 }; | 93 }; |
| 94 tipLink = nil; | |
| 86 | 95 |
| 87 -- Remove any "hidden" tips | 96 -- Remove any "hidden" tips |
| 88 for i = table.getn(tip), 1 do | 97 for i = table.getn(tip), 1 do |
| 89 local val = tip[i]; | 98 local val = tip[i]; |
| 90 | 99 |
| 102 MailOpener.db.global.currentTip = tipsAvailable; | 111 MailOpener.db.global.currentTip = tipsAvailable; |
| 103 end | 112 end |
| 104 | 113 |
| 105 -- We don't need to leave the tip-table in memory, so overwrite it | 114 -- We don't need to leave the tip-table in memory, so overwrite it |
| 106 if type(tip[selectedTip]) == "table" then | 115 if type(tip[selectedTip]) == "table" then |
| 116 if tip[selectedTip]['url'] then | |
| 117 tipLink = tip[selectedTip]['url']; | |
| 118 end | |
| 119 | |
| 107 tip = tip[selectedTip]['txt']; | 120 tip = tip[selectedTip]['txt']; |
| 108 else | 121 else |
| 109 tip = tip[selectedTip]; | 122 tip = tip[selectedTip]; |
| 110 end | 123 end |
| 111 end | 124 end |
| 488 type = "execute", | 501 type = "execute", |
| 489 name = L["Next Tip"], | 502 name = L["Next Tip"], |
| 490 width = "half", | 503 width = "half", |
| 491 func = function() self:NextTip(); self:GetTip(); end, | 504 func = function() self:NextTip(); self:GetTip(); end, |
| 492 }, | 505 }, |
| 506 tipLink = { | |
| 507 order = 30, | |
| 508 type = "execute", | |
| 509 name = L["Copy URL"], | |
| 510 width = "half", | |
| 511 func = function() | |
| 512 MailOpener.currentPopupContents = tipLink; | |
| 513 | |
| 514 StaticPopup_Show("MailOpenerCopyWindow"); | |
| 515 end, | |
| 516 hidden = function() return tipLink == nil; end, | |
| 517 }, | |
| 493 }, | 518 }, |
| 494 }, -- end Tip | 519 }, -- end Tip |
| 495 }, | 520 }, |
| 496 }; | 521 }; |
| 497 | 522 |
