# HG changeset patch # User Zerotorescue # Date 1284716648 -7200 # Node ID c15dbeb84ddc181342cc7030a7d60fc131b02595 # Parent 3179c5f90a481bd0cbb6c9f31c644b166bffc2cf Fixed an error when toggling auto mail on or off. diff -r 3179c5f90a48 -r c15dbeb84ddc Core.lua --- a/Core.lua Thu Sep 16 18:30:16 2010 +0200 +++ b/Core.lua Fri Sep 17 11:44:08 2010 +0200 @@ -176,7 +176,7 @@ -- Shift key = toggle addon on or off, since addon is already on there's only one option if not MailOpener:IsEnabled() then - self:Print(L["Shift key was held down, so |cff00ff00enabling|r the entire addon as well as automatic opening of mail."]); + MailOpener:Print(L["Shift key was held down, so |cff00ff00enabling|r the entire addon as well as automatic opening of mail."]); MailOpener:Enable(); @@ -185,7 +185,7 @@ self:SetChecked(true); else - self:Print(L["Shift key was held down, so |cffff0000disabling|r the entire addon."]); + MailOpener:Print(L["Shift key was held down, so |cffff0000disabling|r the entire addon."]); MailOpener:Disable(); @@ -195,12 +195,12 @@ -- Normal click if self:GetChecked() then - self:Print(L["|cff00ff00Enabling|r automatic opening of mail."]); + MailOpener:Print(L["|cff00ff00Enabling|r automatic opening of mail."]); AutoOpenMail = true; MailOpener:ScheduleOpen(false); else - self:Print(L["|cffff0000Disabling|r automatic opening of mail."]); + MailOpener:Print(L["|cffff0000Disabling|r automatic opening of mail."]); AutoOpenMail = false; end @@ -369,16 +369,16 @@ button2 = L["No"], OnAccept = function() MailOpener.db.profile.general.defaultStatus = "_enabled"; - self:Print(L["You can always change the default status in the General config (|cff00ffff/mo c|r)."]); + MailOpener:Print(L["You can always change the default status in the General config (|cff00ffff/mo c|r)."]); - self:Print(L["|cff00ff00Enabling|r automatic opening of mail."]); + MailOpener:Print(L["|cff00ff00Enabling|r automatic opening of mail."]); MailOpener.cbOpenAll:SetChecked(true); AutoOpenMail = true; MailOpener:ScheduleOpen(false); end, OnCancel = function (_,reason) - self:Print(L["You can always change the default status in the General config (|cff00ffff/mo c|r)."]); + MailOpener:Print(L["You can always change the default status in the General config (|cff00ffff/mo c|r)."]); end, timeout = 0, whileDead = 1,