comparison 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
comparison
equal deleted inserted replaced
45:e9072491dc3f 46:1805df31794d
366 366
367 MailOpener:Disable(); 367 MailOpener:Disable();
368 self.cbOpenAll:SetChecked(false); 368 self.cbOpenAll:SetChecked(false);
369 end 369 end
370 370
371 if IsShiftKeyDown() then
372 print("|cff15ff00Mail Opener|r: |cffff0000Disabling|r automatic opening of mail, shift key was down when opening the mailbox.");
373
374 AutoOpenMail = false;
375 self.cbOpenAll:SetChecked(false);
376 end
377
371 self:ToggleQAStatus(); 378 self:ToggleQAStatus();
372 379
373 -- Hide the InboxTooMuchMail warning to allow room for our mail remaining info line 380 -- Hide the InboxTooMuchMail warning to allow room for our mail remaining info line
374 InboxTooMuchMail:Hide() 381 InboxTooMuchMail:Hide()
375 InboxTooMuchMail.Show = function() end 382 InboxTooMuchMail.Show = function() end
456 -- Look for mail 463 -- Look for mail
457 self:Recheck(); 464 self:Recheck();
458 end, 61); 465 end, 61);
459 self:Debug("tmrRecheck 61"); 466 self:Debug("tmrRecheck 61");
460 467
461 if not IsShiftKeyDown() then 468 -- Open the current mail
462 -- Allow overriding of mailopening with the shift key 469 self:ScheduleOpen(false);
463
464 -- Open the current mail
465 self:ScheduleOpen(false);
466 end
467 elseif currentMailWithAttachments < tempLastAmount then 470 elseif currentMailWithAttachments < tempLastAmount then
468 -- We lost a mail 471 -- We lost a mail
469 472
470 --TODO: NYI: May need to delay this until the mail is actually deleted to keep the mail count more realtime 473 --TODO: NYI: May need to delay this until the mail is actually deleted to keep the mail count more realtime
471 474
472 self:Debug("MO_MAIL_EMPTIED"); 475 self:Debug("MO_MAIL_EMPTIED");
473 476
474 -- Yell that we successfully opened/removed a mail 477 -- Yell that we successfully opened/removed a mail
475 self:SendMessage("MO_MAIL_EMPTIED"); 478 self:SendMessage("MO_MAIL_EMPTIED");
476 elseif (currentMailWithAttachments == 50 and tempLastAmount == 50) then 479 elseif (currentMailWithAttachments == 50 and tempLastAmount == 50) then
477 if not IsShiftKeyDown() then 480 -- Open the current mail
478 -- Allow overriding of mailopening with the shift key 481 self:ScheduleOpen(false);
479
480 -- Open the current mail
481 self:ScheduleOpen(false);
482 end
483 end 482 end
484 end 483 end
485 484
486 function MailOpener:ScheduleOpen(continued) 485 function MailOpener:ScheduleOpen(continued)
487 if lastAmount > 0 then 486 if lastAmount > 0 then