Mercurial > wow > mailopener
comparison Core.lua @ 7:7249f9f1205a
Removed BETA popup.
| author | Zerotorescue |
|---|---|
| date | Wed, 08 Sep 2010 22:18:07 +0200 |
| parents | f10c8a083d2a |
| children | 1b2d819b4fa8 |
comparison
equal
deleted
inserted
replaced
| 6:f10c8a083d2a | 7:7249f9f1205a |
|---|---|
| 5 | 5 |
| 6 local AutoOpenMail, MailOpenerConfig, lastAmount, lastQuickAuctionsStatus, freshList, mailboxEmptySoundPlayed; | 6 local AutoOpenMail, MailOpenerConfig, lastAmount, lastQuickAuctionsStatus, freshList, mailboxEmptySoundPlayed; |
| 7 | 7 |
| 8 function MailOpener:OnInitialize() | 8 function MailOpener:OnInitialize() |
| 9 local defaults = { | 9 local defaults = { |
| 10 global = { | 10 --BETA:global = { |
| 11 uses = 0; | 11 --BETA: uses = 0; |
| 12 }, | 12 --BETA:}, |
| 13 profile = { | 13 profile = { |
| 14 general = { | 14 general = { |
| 15 defaultStatus = "_enabled", | 15 defaultStatus = "_enabled", |
| 16 defaultQAStatus = "__remember", | 16 defaultQAStatus = "__remember", |
| 17 continueOpeningStackableItems = false, | 17 continueOpeningStackableItems = false, |
| 178 button:SetScript("OnClick", function() | 178 button:SetScript("OnClick", function() |
| 179 MailOpener:EnableConfigModule(); | 179 MailOpener:EnableConfigModule(); |
| 180 | 180 |
| 181 MailOpenerConfig:Show(); | 181 MailOpenerConfig:Show(); |
| 182 | 182 |
| 183 if MailOpener.db.global.uses >= 15 then | 183 --BETA:if MailOpener.db.global.uses >= 15 then |
| 184 MailOpener:ShowBetaPopup(); | 184 --BETA: MailOpener:ShowBetaPopup(); |
| 185 end | 185 --BETA:end |
| 186 end); | 186 end); |
| 187 | 187 |
| 188 self.btnConfig = button; | 188 self.btnConfig = button; |
| 189 | 189 |
| 190 -- Disable the AddonLoader slash commands | 190 -- Disable the AddonLoader slash commands |
| 233 | 233 |
| 234 -- Reset variables | 234 -- Reset variables |
| 235 lastAmount = 0; | 235 lastAmount = 0; |
| 236 self.debugChannel = nil; | 236 self.debugChannel = nil; |
| 237 | 237 |
| 238 self.db.global.uses = ( self.db.global.uses + 1 ); | 238 --BETA:self.db.global.uses = ( self.db.global.uses + 1 ); |
| 239 | 239 |
| 240 if (self.db.global.uses % 15) == 0 then | 240 --BETA:if (self.db.global.uses % 15) == 0 then |
| 241 -- Automatically show once every 15 uses | 241 --BETA: -- Automatically show once every 15 uses |
| 242 self:ShowBetaPopup(); | 242 --BETA: self:ShowBetaPopup(); |
| 243 end | 243 --BETA:end |
| 244 | 244 |
| 245 -- If we were toggling this addon on while the mailbox is opened we must register all events again | 245 -- If we were toggling this addon on while the mailbox is opened we must register all events again |
| 246 if MailFrame:IsVisible() then | 246 if MailFrame:IsVisible() then |
| 247 self:MAIL_SHOW(); | 247 self:MAIL_SHOW(); |
| 248 end | 248 end |
| 628 else | 628 else |
| 629 return format(COPPER_AMOUNT_TEXTURE, copper, 0, 0); | 629 return format(COPPER_AMOUNT_TEXTURE, copper, 0, 0); |
| 630 end | 630 end |
| 631 end | 631 end |
| 632 | 632 |
| 633 -- General copy window for multiple things (clickable URLs, the time remaining, and such) | |
| 633 StaticPopupDialogs["MailOpenerCopyWindow"] = { | 634 StaticPopupDialogs["MailOpenerCopyWindow"] = { |
| 634 text = "Please CTRL-C to copy.", | 635 text = "Please CTRL-C to copy.", |
| 635 button2 = CLOSE, | 636 button2 = CLOSE, |
| 636 hasEditBox = 1, | 637 hasEditBox = 1, |
| 637 hasWideEditBox = 1, | 638 hasWideEditBox = 1, |
| 660 whileDead = 1, | 661 whileDead = 1, |
| 661 hideOnEscape = 1, | 662 hideOnEscape = 1, |
| 662 maxLetters = 1024, | 663 maxLetters = 1024, |
| 663 }; | 664 }; |
| 664 | 665 |
| 665 -- The below either has to be removed or changed when releasing | 666 --BETA: The below either has to be removed or changed when releasing |
| 666 | 667 |
| 668 --[[ | |
| 669 BETA/ALPHA request box | |
| 667 function MailOpener:ShowBetaPopup() | 670 function MailOpener:ShowBetaPopup() |
| 668 function TableDump(key, val, jumps) | 671 function TableDump(key, val, jumps) |
| 669 local cache = ""; | 672 local cache = ""; |
| 670 | 673 |
| 671 if not jumps then | 674 if not jumps then |
| 771 local label = AceGUI:Create("Label"); | 774 local label = AceGUI:Create("Label"); |
| 772 label:SetText("\n\nps. You can always view this window again at a later time by clicking the \"Config\" button in the mail frame.\nps2. The information above is completely Mail Opener related. It will be used to determine the best default settings."); | 775 label:SetText("\n\nps. You can always view this window again at a later time by clicking the \"Config\" button in the mail frame.\nps2. The information above is completely Mail Opener related. It will be used to determine the best default settings."); |
| 773 label:SetFullWidth(true); | 776 label:SetFullWidth(true); |
| 774 frame:AddChild(label); | 777 frame:AddChild(label); |
| 775 end | 778 end |
| 779 ]] |
