diff Core.lua @ 85:c15dbeb84ddc

Fixed an error when toggling auto mail on or off.
author Zerotorescue
date Fri, 17 Sep 2010 11:44:08 +0200
parents eadff31e61e8
children 0a8e4a93316d
line wrap: on
line diff
--- 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,