comparison Modules/FailSafe.lua @ 42:8168280420ae

Added a new option to both sound notifications to limit playing of the sound to once per mailbox visit, instead of once per mailbox refresh / bags update.
author Zerotorescue
date Sat, 11 Sep 2010 21:31:26 +0200
parents 2b2bea9c7446
children eadff31e61e8
comparison
equal deleted inserted replaced
41:2b2bea9c7446 42:8168280420ae
29 -- Even though Ace can unregister our events it's neater to do it manually too 29 -- Even though Ace can unregister our events it's neater to do it manually too
30 function mod:OnDisable() 30 function mod:OnDisable()
31 self:Debug("OnDisable"); 31 self:Debug("OnDisable");
32 32
33 self:UnregisterEvent("MAIL_SHOW"); 33 self:UnregisterEvent("MAIL_SHOW");
34
35 -- If we were toggling this module off while the mailbox is opened we must unregister all events
36 if MailFrame:IsVisible() then
37 self:MAIL_CLOSED();
38 end
34 end 39 end
35 40
36 function mod:MAIL_SHOW() 41 function mod:MAIL_SHOW()
37 self:Debug("MAIL_SHOW"); 42 self:Debug("MAIL_SHOW");
38 43