comparison Modules/Config.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 b79bb7b449c3
children ec609592bfcc
comparison
equal deleted inserted replaced
41:2b2bea9c7446 42:8168280420ae
677 order = 50, 677 order = 50,
678 type = "group", 678 type = "group",
679 inline = true, 679 inline = true,
680 name = "Sound Notifications", 680 name = "Sound Notifications",
681 args = { 681 args = {
682 descriptionMailProcessed = {
683 order = 61,
684 type = "description",
685 name = "Play a sound when...",
686 },
682 bagsFullSound = { 687 bagsFullSound = {
683 order = 100, 688 order = 100,
684 type = "toggle", 689 type = "toggle",
685 name = "Play a sound when your |cfffed000inventory is full|r", 690 name = "Inventory is full",
686 desc = "Play a sound when your inventory is full. You can select what sound in the select box next to this.", 691 desc = "Play a sound when your inventory is full. You can select what sound in the select box next to this.",
687 set = function(i, v) MailOpener.db.profile.notifications.bagsFullSound = v; end, 692 set = function(i, v) MailOpener.db.profile.notifications.bagsFullSound = v; end,
688 get = function() return MailOpener.db.profile.notifications.bagsFullSound; end, 693 get = function() return MailOpener.db.profile.notifications.bagsFullSound; end,
689 width = "double", 694 width = "medium",
690 }, 695 },
691 bagsFullSoundFile = { 696 bagsFullSoundFile = {
692 order = 101, 697 order = 101,
693 type = "select", 698 type = "select",
694 name = "Sound File", 699 name = "Sound File",
708 }, 713 },
709 bagsFullSoundOnlyOnce = { 714 bagsFullSoundOnlyOnce = {
710 order = 102, 715 order = 102,
711 type = "toggle", 716 type = "toggle",
712 name = "Only once", 717 name = "Only once",
713 desc = "Only play this sound once each time new mail has been arrived.", 718 desc = "Only play this sound once each time new mail has been arrived or your bags are updated.",
714 set = function(i, v) MailOpener.db.profile.notifications.bagsFullSoundOnlyOnce = v; end, 719 set = function(i, v) MailOpener.db.profile.notifications.bagsFullSoundOnlyOnce = v; end,
715 get = function() return MailOpener.db.profile.notifications.bagsFullSoundOnlyOnce; end, 720 get = function() return MailOpener.db.profile.notifications.bagsFullSoundOnlyOnce; end,
716 disabled = function() return (not MailOpener.db.profile.notifications.bagsFullSound); end, 721 disabled = function() return (not MailOpener.db.profile.notifications.bagsFullSound); end,
722 --width = "half",
723 },
724 bagsFullSoundOnlyOncePerMailboxVisit = {
725 order = 103,
726 type = "toggle",
727 name = "...per mailbox visit",
728 desc = "Only play this sound once each time you visit the mailbox.",
729 set = function(i, v) MailOpener.db.profile.notifications.bagsFullSoundOnlyOncePerMailboxVisit = v; end,
730 get = function() return MailOpener.db.profile.notifications.bagsFullSoundOnlyOncePerMailboxVisit; end,
731 disabled = function() return (not MailOpener.db.profile.notifications.bagsFullSound or not MailOpener.db.profile.notifications.bagsFullSoundOnlyOnce); end,
717 }, 732 },
718 mailboxEmptySound = { 733 mailboxEmptySound = {
719 order = 110, 734 order = 110,
720 type = "toggle", 735 type = "toggle",
721 name = "Play a sound when |cfffed000no more mail can be opened|r", 736 name = "No more mail can be opened",
722 desc = "Play a sound when no more mail can be opened. You can select what sound in the select box next to this.", 737 desc = "Play a sound when no more mail can be opened. You can select what sound in the select box next to this.",
723 set = function(i, v) MailOpener.db.profile.notifications.mailboxEmptySound = v; end, 738 set = function(i, v) MailOpener.db.profile.notifications.mailboxEmptySound = v; end,
724 get = function() return MailOpener.db.profile.notifications.mailboxEmptySound; end, 739 get = function() return MailOpener.db.profile.notifications.mailboxEmptySound; end,
725 width = "double", 740 --width = "double",
726 }, 741 },
727 mailboxEmptySoundFile = { 742 mailboxEmptySoundFile = {
728 order = 111, 743 order = 111,
729 type = "select", 744 type = "select",
730 name = "Sound File", 745 name = "Sound File",
748 name = "Only once", 763 name = "Only once",
749 desc = "Only play this sound once each time new mail has been arrived.", 764 desc = "Only play this sound once each time new mail has been arrived.",
750 set = function(i, v) MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce = v; end, 765 set = function(i, v) MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce = v; end,
751 get = function() return MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce; end, 766 get = function() return MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce; end,
752 disabled = function() return (not MailOpener.db.profile.notifications.mailboxEmptySound); end, 767 disabled = function() return (not MailOpener.db.profile.notifications.mailboxEmptySound); end,
768 --width = "half",
769 },
770 mailboxEmptySoundOnlyOncePerMailboxVisit = {
771 order = 113,
772 type = "toggle",
773 name = "...per mailbox visit",
774 desc = "Only play this sound once each time you visit the mailbox.",
775 set = function(i, v) MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOncePerMailboxVisit = v; end,
776 get = function() return MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOncePerMailboxVisit; end,
777 disabled = function() return (not MailOpener.db.profile.notifications.bagsFullSound or not MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce); end,
753 }, 778 },
754 }, 779 },
755 }, -- end Sound Notifications config inline group 780 }, -- end Sound Notifications config inline group
756 }, 781 },
757 }; 782 };