diff Core.lua @ 46:1805df31794d

Only when holding the shift key while opening the mailbox will toggle the opening status. If you want to do it somewhere in the middle of your mailbox visit, just untick the mail opener checkbox. Holding shift while clicking the open all button will now auto loot every single mail with attachments. /mo d will now return the id of the chatframe being used, if it's using one already existing. Changelog and TOC update.
author Zerotorescue
date Sun, 12 Sep 2010 16:36:18 +0200
parents 8168280420ae
children 8e2138877ebf
line wrap: on
line diff
--- a/Core.lua	Sun Sep 12 15:53:19 2010 +0200
+++ b/Core.lua	Sun Sep 12 16:36:18 2010 +0200
@@ -368,6 +368,13 @@
 		self.cbOpenAll:SetChecked(false);
 	end
 	
+	if IsShiftKeyDown() then
+		print("|cff15ff00Mail Opener|r: |cffff0000Disabling|r automatic opening of mail, shift key was down when opening the mailbox.");
+		
+		AutoOpenMail = false;
+		self.cbOpenAll:SetChecked(false);
+	end
+	
 	self:ToggleQAStatus();
 	
 	-- Hide the InboxTooMuchMail warning to allow room for our mail remaining info line
@@ -458,12 +465,8 @@
 		end, 61);
 		self:Debug("tmrRecheck 61");
 		
-		if not IsShiftKeyDown() then
-			-- Allow overriding of mailopening with the shift key
-			
-			-- Open the current mail
-			self:ScheduleOpen(false);
-		end
+		-- Open the current mail
+		self:ScheduleOpen(false);
 	elseif currentMailWithAttachments < tempLastAmount then
 		-- We lost a mail
 		
@@ -474,12 +477,8 @@
 		-- Yell that we successfully opened/removed a mail
 		self:SendMessage("MO_MAIL_EMPTIED");
 	elseif (currentMailWithAttachments == 50 and tempLastAmount == 50) then
-		if not IsShiftKeyDown() then
-			-- Allow overriding of mailopening with the shift key
-			
-			-- Open the current mail
-			self:ScheduleOpen(false);
-		end
+		-- Open the current mail
+		self:ScheduleOpen(false);
 	end
 end