diff 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
line wrap: on
line diff
--- a/Modules/Config.lua	Sat Sep 11 18:43:14 2010 +0200
+++ b/Modules/Config.lua	Sat Sep 11 21:31:26 2010 +0200
@@ -679,14 +679,19 @@
 				inline = true,
 				name = "Sound Notifications",
 				args = {
+					descriptionMailProcessed = {
+						order = 61,
+						type = "description",
+						name = "Play a sound when...",
+					},
 					bagsFullSound = {
 						order = 100,
 						type = "toggle",
-						name = "Play a sound when your |cfffed000inventory is full|r",
+						name = "Inventory is full",
 						desc = "Play a sound when your inventory is full. You can select what sound in the select box next to this.",
 						set = function(i, v) MailOpener.db.profile.notifications.bagsFullSound = v; end,
 						get = function() return MailOpener.db.profile.notifications.bagsFullSound; end,
-						width = "double",
+						width = "medium",
 					},
 					bagsFullSoundFile = {
 						order = 101,
@@ -710,19 +715,29 @@
 						order = 102,
 						type = "toggle",
 						name = "Only once",
-						desc = "Only play this sound once each time new mail has been arrived.",
+						desc = "Only play this sound once each time new mail has been arrived or your bags are updated.",
 						set = function(i, v) MailOpener.db.profile.notifications.bagsFullSoundOnlyOnce = v; end,
 						get = function() return MailOpener.db.profile.notifications.bagsFullSoundOnlyOnce; end,
 						disabled = function() return (not MailOpener.db.profile.notifications.bagsFullSound); end,
+						--width = "half",
+					},
+					bagsFullSoundOnlyOncePerMailboxVisit = {
+						order = 103,
+						type = "toggle",
+						name = "...per mailbox visit",
+						desc = "Only play this sound once each time you visit the mailbox.",
+						set = function(i, v) MailOpener.db.profile.notifications.bagsFullSoundOnlyOncePerMailboxVisit = v; end,
+						get = function() return MailOpener.db.profile.notifications.bagsFullSoundOnlyOncePerMailboxVisit; end,
+						disabled = function() return (not MailOpener.db.profile.notifications.bagsFullSound or not MailOpener.db.profile.notifications.bagsFullSoundOnlyOnce); end,
 					},
 					mailboxEmptySound = {
 						order = 110,
 						type = "toggle",
-						name = "Play a sound when |cfffed000no more mail can be opened|r",
+						name = "No more mail can be opened",
 						desc = "Play a sound when no more mail can be opened. You can select what sound in the select box next to this.",
 						set = function(i, v) MailOpener.db.profile.notifications.mailboxEmptySound = v; end,
 						get = function() return MailOpener.db.profile.notifications.mailboxEmptySound; end,
-						width = "double",
+						--width = "double",
 					},
 					mailboxEmptySoundFile = {
 						order = 111,
@@ -750,6 +765,16 @@
 						set = function(i, v) MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce = v; end,
 						get = function() return MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce; end,
 						disabled = function() return (not MailOpener.db.profile.notifications.mailboxEmptySound); end,
+						--width = "half",
+					},
+					mailboxEmptySoundOnlyOncePerMailboxVisit = {
+						order = 113,
+						type = "toggle",
+						name = "...per mailbox visit",
+						desc = "Only play this sound once each time you visit the mailbox.",
+						set = function(i, v) MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOncePerMailboxVisit = v; end,
+						get = function() return MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOncePerMailboxVisit; end,
+						disabled = function() return (not MailOpener.db.profile.notifications.bagsFullSound or not MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce); end,
 					},
 				},
 			}, -- end Sound Notifications config inline group