annotate Modules/Config.lua @ 34:69fc1ca8881f

Now maintaining a manual changelog as Curse only takes the last change from the repository which is usually just tagging.
author Zerotorescue
date Fri, 10 Sep 2010 19:21:22 +0200
parents 90d58723ac0a
children b79bb7b449c3
rev   line source
Zerotorescue@0 1 local MailOpener = LibStub("AceAddon-3.0"):GetAddon("MailOpener");
Zerotorescue@31 2 local mod = MailOpener:NewModule("Config", "AceEvent-3.0", "AceTimer-3.0");
Zerotorescue@0 3
Zerotorescue@31 4 mod.moduleDescription = "Builds and loads the config frame(s) and handles the slash commands. Automatically loaded when needed.";
Zerotorescue@31 5 mod.moduleRequired = false;
Zerotorescue@4 6
Zerotorescue@0 7 local Media = LibStub("LibSharedMedia-3.0");
Zerotorescue@0 8 Media:Register("sound", "Cartoon FX", [[Sound\Doodad\Goblin_Lottery_Open03.wav]]);
Zerotorescue@0 9 Media:Register("sound", "Cheer", [[Sound\Event Sounds\OgreEventCheerUnique.wav]]);
Zerotorescue@0 10 Media:Register("sound", "Explosion", [[Sound\Doodad\Hellfire_Raid_FX_Explosion05.wav]]);
Zerotorescue@0 11 Media:Register("sound", "Fel Nova", [[Sound\Spells\SeepingGaseous_Fel_Nova.wav]]);
Zerotorescue@0 12 Media:Register("sound", "Fel Portal", [[Sound\Spells\Sunwell_Fel_PortalStand.wav]]);
Zerotorescue@0 13 Media:Register("sound", "Magic Click", [[Sound\interface\MagicClick.wav]]);
Zerotorescue@0 14 Media:Register("sound", "Rubber Ducky", [[Sound\Doodad\Goblin_Lottery_Open01.wav]]);
Zerotorescue@0 15 Media:Register("sound", "Shing!", [[Sound\Doodad\PortcullisActive_Closed.wav]]);
Zerotorescue@0 16 Media:Register("sound", "Simon Chime", [[Sound\Doodad\SimonGame_LargeBlueTree.wav]]);
Zerotorescue@0 17 Media:Register("sound", "Simon Error", [[Sound\Spells\SimonGame_Visual_BadPress.wav]]);
Zerotorescue@0 18 Media:Register("sound", "Simon Start", [[Sound\Spells\SimonGame_Visual_GameStart.wav]]);
Zerotorescue@0 19 Media:Register("sound", "War Drums", [[Sound\Event Sounds\Event_wardrum_ogre.wav]]);
Zerotorescue@0 20 Media:Register("sound", "Wham!", [[Sound\Doodad\PVP_Lordaeron_Door_Open.wav]]);
Zerotorescue@0 21 Media:Register("sound", "Whisper Ping", [[Sound\interface\iTellMessage.wav]]);
Zerotorescue@0 22 Media:Register("sound", "You Will Die!", [[Sound\Creature\CThun\CThunYouWillDIe.wav]]);
Zerotorescue@0 23
Zerotorescue@0 24 local AceConfigDialog;
Zerotorescue@0 25
Zerotorescue@31 26 function mod:OnEnable()
Zerotorescue@0 27 MailOpener:Debug("Enabling |cff00ffffConfig|r module.");
Zerotorescue@0 28 end
Zerotorescue@0 29
Zerotorescue@31 30 function mod:CommandHandler(message)
Zerotorescue@0 31 local cmd, arg = string.split(" ", (message or ""), 2);
Zerotorescue@0 32 cmd = string.lower(cmd);
Zerotorescue@0 33
Zerotorescue@0 34 if cmd == "c" or cmd == "config" or cmd == "conf" or cmd == "option" or cmd == "options" or cmd == "opt" or cmd == "setting" or cmd == "settings" then
Zerotorescue@0 35 self:Show();
Zerotorescue@0 36 elseif cmd == "d" or cmd == "debug" then
Zerotorescue@0 37 MailOpener.debugChannel = false;
Zerotorescue@0 38 for i = 1, NUM_CHAT_WINDOWS do
Zerotorescue@0 39 local name = GetChatWindowInfo(i);
Zerotorescue@0 40
Zerotorescue@0 41 if name:upper() == "DEBUG" then
Zerotorescue@0 42 MailOpener.debugChannel = _G["ChatFrame" .. i];
Zerotorescue@0 43
Zerotorescue@0 44 print("A debug channel already exists, used the old one.");
Zerotorescue@0 45 return;
Zerotorescue@0 46 end
Zerotorescue@0 47 end
Zerotorescue@0 48
Zerotorescue@0 49 if not MailOpener.debugChannel then
Zerotorescue@0 50 -- Create a new debug channel
Zerotorescue@0 51 local chatFrame = FCF_OpenNewWindow('Debug');
Zerotorescue@0 52 ChatFrame_RemoveAllMessageGroups(chatFrame);
Zerotorescue@0 53 MailOpener.debugChannel = chatFrame;
Zerotorescue@0 54
Zerotorescue@0 55 print("New debug channel created.");
Zerotorescue@0 56 end
Zerotorescue@0 57 else
Zerotorescue@0 58 print("Wrong command, available: /mo config (or /mo c)");
Zerotorescue@0 59 end
Zerotorescue@0 60 end
Zerotorescue@0 61
Zerotorescue@31 62 function mod:Load()
Zerotorescue@0 63 if not AceConfigDialog then
Zerotorescue@0 64 local options = self:GetOptions();
Zerotorescue@0 65
Zerotorescue@0 66 -- Build options dialog
Zerotorescue@0 67 AceConfigDialog = LibStub("AceConfigDialog-3.0");
Zerotorescue@0 68 -- Register options table
Zerotorescue@0 69 LibStub("AceConfig-3.0"):RegisterOptionsTable("Mail Opener", options);
Zerotorescue@0 70 -- Set a nice default size
Zerotorescue@0 71 AceConfigDialog:SetDefaultSize("Mail Opener", 950, 600);
Zerotorescue@0 72
Zerotorescue@0 73 -- In case the addon is loaded from another condition, always call the remove interface options
Zerotorescue@0 74 if AddonLoader and AddonLoader.RemoveInterfaceOptions then
Zerotorescue@0 75 AddonLoader:RemoveInterfaceOptions("Mail Opener");
Zerotorescue@0 76 end
Zerotorescue@0 77
Zerotorescue@0 78 -- Add to the blizzard addons options thing
Zerotorescue@0 79 AceConfigDialog:AddToBlizOptions("Mail Opener");
Zerotorescue@0 80 end
Zerotorescue@0 81 end
Zerotorescue@0 82
Zerotorescue@31 83 function mod:Show()
Zerotorescue@0 84 self:Load();
Zerotorescue@0 85
Zerotorescue@0 86 AceConfigDialog:Open("Mail Opener");
Zerotorescue@0 87 end
Zerotorescue@0 88
Zerotorescue@31 89 function mod:GetOptions()
Zerotorescue@0 90 local options = {
Zerotorescue@0 91 type = "group",
Zerotorescue@0 92 name = "Mail Opener",
Zerotorescue@0 93 childGroups = "tree",
Zerotorescue@0 94 args = {
Zerotorescue@0 95 },
Zerotorescue@0 96 };
Zerotorescue@0 97
Zerotorescue@0 98 options.args.general = self:GetGeneralOptions();
Zerotorescue@0 99
Zerotorescue@0 100 options.args.notifications = self:GetNotificationsOptions();
Zerotorescue@0 101
Zerotorescue@0 102 options = self:GetModuleOptions(options);
Zerotorescue@0 103
Zerotorescue@0 104 options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(MailOpener.db, true);
Zerotorescue@0 105 options.args.profiles.order = 1000; -- we want this as last group
Zerotorescue@0 106
Zerotorescue@0 107 return options;
Zerotorescue@0 108 end
Zerotorescue@0 109
Zerotorescue@31 110 -- Get the options group for every one of our modules
Zerotorescue@31 111 function mod:GetModuleOptions(options)
Zerotorescue@31 112 -- Go through all our modules
Zerotorescue@0 113 for name, module in MailOpener:IterateModules() do
Zerotorescue@31 114 -- Look if they even have an options group
Zerotorescue@0 115 if module.GetOptionsGroup then
Zerotorescue@31 116 -- Get that options group
Zerotorescue@31 117 local moduleGroup = module:GetOptionsGroup();
Zerotorescue@31 118
Zerotorescue@31 119 -- If it's set to be a subgroup of the modules group, put it there
Zerotorescue@31 120 if moduleGroup['type'] == "modulesSubGroup" then
Zerotorescue@31 121 moduleGroup['type'] = "group";
Zerotorescue@31 122
Zerotorescue@31 123 -- If the modules group doesn't exist yet, make it
Zerotorescue@31 124 if options.args.Modules == nil then
Zerotorescue@31 125 options.args.Modules = self:GetModuleGroupsContainer();
Zerotorescue@31 126 end
Zerotorescue@31 127
Zerotorescue@31 128 -- Add to the modules sub group
Zerotorescue@31 129 options.args.Modules.args[name] = moduleGroup;
Zerotorescue@31 130 else
Zerotorescue@31 131 options.args[name] = moduleGroup;
Zerotorescue@31 132 end
Zerotorescue@31 133
Zerotorescue@0 134 end
Zerotorescue@0 135 end
Zerotorescue@0 136
Zerotorescue@0 137 return options;
Zerotorescue@0 138 end
Zerotorescue@0 139
Zerotorescue@31 140 function mod:GetModuleGroupsContainer()
Zerotorescue@31 141 local modulesConfigGroup = {
Zerotorescue@31 142 order = 400,
Zerotorescue@31 143 type = "group",
Zerotorescue@31 144 childGroups = "tree",
Zerotorescue@31 145 name = "Modules",
Zerotorescue@31 146 desc = "Change settings for modules or toggle them on or off.",
Zerotorescue@31 147 args = {
Zerotorescue@31 148 General = {
Zerotorescue@31 149 order = 10,
Zerotorescue@31 150 type = "group",
Zerotorescue@31 151 inline = true,
Zerotorescue@31 152 name = "Modules Status",
Zerotorescue@31 153 args = {
Zerotorescue@31 154 headerName = {
Zerotorescue@31 155 order = 0,
Zerotorescue@31 156 width = "normal",
Zerotorescue@31 157 type = "description",
Zerotorescue@31 158 fontSize = "medium",
Zerotorescue@31 159 name = "|cfffed000Module Name|r",
Zerotorescue@31 160 },
Zerotorescue@31 161 headerStatus = {
Zerotorescue@31 162 order = 1,
Zerotorescue@31 163 width = "half",
Zerotorescue@31 164 type = "description",
Zerotorescue@31 165 fontSize = "medium",
Zerotorescue@31 166 name = "|cfffed000Status|r",
Zerotorescue@31 167 },
Zerotorescue@31 168 headerDefault = {
Zerotorescue@31 169 order = 2,
Zerotorescue@31 170 width = "normal",
Zerotorescue@31 171 type = "description",
Zerotorescue@31 172 fontSize = "medium",
Zerotorescue@31 173 name = "|cfffed000Default Status|r",
Zerotorescue@31 174 },
Zerotorescue@31 175 headerseperator = {
Zerotorescue@31 176 order = 3,
Zerotorescue@31 177 type = "description",
Zerotorescue@31 178 name = "",
Zerotorescue@31 179 },
Zerotorescue@31 180 },
Zerotorescue@31 181 },
Zerotorescue@31 182 },
Zerotorescue@31 183 };
Zerotorescue@31 184
Zerotorescue@31 185 -- Make a list of modules and their statuses
Zerotorescue@31 186 local orderNo = 5;
Zerotorescue@31 187 for moduleName, module in MailOpener:IterateModules() do
Zerotorescue@31 188 -- Display each module as NAME CURRENT STATUS DEFAULT STATUS
Zerotorescue@31 189
Zerotorescue@31 190 -- Name
Zerotorescue@31 191 modulesConfigGroup.args.General.args[moduleName .. "name"] = {
Zerotorescue@31 192 order = orderNo,
Zerotorescue@31 193 width = "normal",
Zerotorescue@31 194 type = "description",
Zerotorescue@31 195 fontSize = "medium",
Zerotorescue@31 196 name = function()
Zerotorescue@31 197 return moduleName;
Zerotorescue@31 198 end,
Zerotorescue@31 199 };
Zerotorescue@31 200 -- Current status
Zerotorescue@31 201 modulesConfigGroup.args.General.args[moduleName .. "status"] = {
Zerotorescue@31 202 order = ( orderNo + 1 ),
Zerotorescue@31 203 width = "half",
Zerotorescue@31 204 type = "description",
Zerotorescue@31 205 fontSize = "medium",
Zerotorescue@31 206 name = function()
Zerotorescue@31 207 if module:IsEnabled() then
Zerotorescue@31 208 return "|cff00ff00Enabled|r";
Zerotorescue@31 209 else
Zerotorescue@31 210 return "|cffff0000Disabled|r";
Zerotorescue@31 211 end
Zerotorescue@31 212 end,
Zerotorescue@31 213 };
Zerotorescue@31 214 -- Default status
Zerotorescue@31 215 modulesConfigGroup.args.General.args[moduleName .. "default"] = {
Zerotorescue@31 216 order = ( orderNo + 2 ),
Zerotorescue@31 217 width = "normal",
Zerotorescue@31 218 type = "description",
Zerotorescue@31 219 fontSize = "medium",
Zerotorescue@31 220 name = function()
Zerotorescue@31 221 local desc = "";
Zerotorescue@31 222 if MailOpener.db.profile.modules[moduleName] == nil or MailOpener.db.profile.modules[moduleName] == true then
Zerotorescue@31 223 desc = "|cff00ff00Enabled|r";
Zerotorescue@31 224 else
Zerotorescue@31 225 desc = "|cffff0000Disabled|r";
Zerotorescue@31 226 end
Zerotorescue@31 227
Zerotorescue@31 228 if module.moduleRequired then
Zerotorescue@31 229 desc = desc .. " (Required module)";
Zerotorescue@31 230 end
Zerotorescue@31 231
Zerotorescue@31 232 return desc;
Zerotorescue@31 233 end,
Zerotorescue@31 234 };
Zerotorescue@31 235
Zerotorescue@31 236 -- Seperator
Zerotorescue@31 237 modulesConfigGroup.args.General.args[moduleName .. "seperator"] = {
Zerotorescue@31 238 order = ( orderNo + 3 ),
Zerotorescue@31 239 type = "description",
Zerotorescue@31 240 name = "",
Zerotorescue@31 241 };
Zerotorescue@31 242
Zerotorescue@31 243 if module.moduleDescription then
Zerotorescue@31 244 -- Description
Zerotorescue@31 245 modulesConfigGroup.args.General.args[moduleName .. "description"] = {
Zerotorescue@31 246 order = ( orderNo + 4 ),
Zerotorescue@31 247 type = "description",
Zerotorescue@31 248 name = function()
Zerotorescue@31 249 return "|cfffed000" .. module.moduleDescription .. "|r";
Zerotorescue@31 250 end,
Zerotorescue@31 251 };
Zerotorescue@31 252 end
Zerotorescue@31 253
Zerotorescue@31 254 orderNo = orderNo + 5;
Zerotorescue@31 255 end
Zerotorescue@31 256
Zerotorescue@31 257 return modulesConfigGroup;
Zerotorescue@31 258 end
Zerotorescue@31 259
Zerotorescue@31 260 function mod:GetGeneralOptions()
Zerotorescue@0 261 local generalConfigGroup = {
Zerotorescue@0 262 order = 100,
Zerotorescue@0 263 type = "group",
Zerotorescue@0 264 name = "General",
Zerotorescue@0 265 desc = "Change general Mail Opener settings.",
Zerotorescue@0 266 args = {
Zerotorescue@0 267 -- General config inline group
Zerotorescue@0 268 generalConfig = {
Zerotorescue@0 269 order = 10,
Zerotorescue@0 270 type = "group",
Zerotorescue@0 271 inline = true,
Zerotorescue@0 272 name = "General",
Zerotorescue@0 273 args = {
Zerotorescue@0 274 defaultStatus = {
Zerotorescue@0 275 order = 0,
Zerotorescue@0 276 type = "select",
Zerotorescue@0 277 name = "Default mail opener status",
Zerotorescue@0 278 desc = "Select the default Mail Opener status when you open a mailbox for the first time since your log on.",
Zerotorescue@0 279 values = {
Zerotorescue@4 280 _enabled = "Completely enabled",
Zerotorescue@4 281 disabled = "Auto opening disabled",
Zerotorescue@4 282 xdisabled = "Addon Disabled",
Zerotorescue@0 283 },
Zerotorescue@0 284 get = function() return MailOpener.db.profile.general.defaultStatus; end,
Zerotorescue@0 285 set = function(i, v) MailOpener.db.profile.general.defaultStatus = v; end,
Zerotorescue@0 286 },
Zerotorescue@0 287 defaultQAStatus = {
Zerotorescue@0 288 order = 10,
Zerotorescue@0 289 type = "select",
Zerotorescue@0 290 name = "Default QA Auto Mail status",
Zerotorescue@0 291 desc = "Select the default Quick Auctions auto mail status whenever you open a mailbox.",
Zerotorescue@0 292 values = {
Zerotorescue@0 293 __remember = "Remember",
Zerotorescue@0 294 _enabled = "Enabled",
Zerotorescue@0 295 disabled = "Disabled",
Zerotorescue@0 296 },
Zerotorescue@0 297 get = function() return MailOpener.db.profile.general.defaultQAStatus; end,
Zerotorescue@0 298 set = function(i, v) MailOpener.db.profile.general.defaultQAStatus = v; end,
Zerotorescue@0 299 hidden = (not MailOpener.QuickAuctionsEnabled),
Zerotorescue@0 300 },
Zerotorescue@0 301 continueOpeningStackableItems = {
Zerotorescue@0 302 order = 15,
Zerotorescue@0 303 type = "toggle",
Zerotorescue@0 304 name = "Continue trying to open mail after your bags are full",
Zerotorescue@0 305 desc = "If there are a lot of stackable items in your mailbox (e.g. glyphs) you may want to toggle this option on.\n\nThis will cause your Blizzard error frame to get extremely spammy if there are many mails remaining. With this disabled, Mail Opener will completely stop opening mail while your inventory is full.",
Zerotorescue@0 306 width = "full",
Zerotorescue@0 307 get = function() return MailOpener.db.profile.general.continueOpeningStackableItems; end,
Zerotorescue@0 308 set = function(i, v) MailOpener.db.profile.general.continueOpeningStackableItems = v; end,
Zerotorescue@0 309 },
Zerotorescue@0 310 autoDisableQAAutoMail = {
Zerotorescue@0 311 order = 20,
Zerotorescue@0 312 type = "toggle",
Zerotorescue@0 313 name = "Turn Quick Auction's auto mailing |cffff0000off|r when opening mail",
Zerotorescue@0 314 desc = "Quick Auction's auto mailing is buggy when using other mail opening addons. If you are collecting mail while auto mailer is enabled wrong items may be send to the wrong character.\n\nTo solve this you must disable Quick Auction's auto mail while opening mail and you can re-enable it when mail opening is finished.",
Zerotorescue@0 315 width = "full",
Zerotorescue@0 316 get = function() return MailOpener.db.profile.general.autoDisableQAAutoMail; end,
Zerotorescue@0 317 set = function(i, v) MailOpener.db.profile.general.autoDisableQAAutoMail = v; end,
Zerotorescue@0 318 hidden = (not MailOpener.QuickAuctionsEnabled),
Zerotorescue@0 319 },
Zerotorescue@0 320 autoReenableQAAutoMail = {
Zerotorescue@0 321 order = 30,
Zerotorescue@0 322 type = "toggle",
Zerotorescue@0 323 name = "Turn Quick Auction's auto mailing |cff00ff00on|r after opening mail has finished",
Zerotorescue@0 324 desc = "Quick Auction's auto mailing is buggy when using other mail opening addons. If you are collecting mail while auto mailer is enabled wrong items may be send to the wrong character.\n\nTo solve this you must disable Quick Auction's auto mail while opening mail and you can re-enable it when mail opening is finished.",
Zerotorescue@0 325 width = "full",
Zerotorescue@0 326 get = function() return MailOpener.db.profile.general.autoReenableQAAutoMail; end,
Zerotorescue@0 327 set = function(i, v) MailOpener.db.profile.general.autoReenableQAAutoMail = v; end,
Zerotorescue@0 328 hidden = (not MailOpener.QuickAuctionsEnabled),
Zerotorescue@0 329 disabled = function() return (MailOpener.db.profile.general.autoSetBackQAAutoMail and not MailOpener.db.profile.general.autoReenableQAAutoMail); end,
Zerotorescue@0 330 },
Zerotorescue@0 331 autoSetBackQAAutoMail = {
Zerotorescue@0 332 order = 40,
Zerotorescue@0 333 type = "toggle",
Zerotorescue@0 334 name = "Set Quick Auction's auto mailing |cff00ffffback|r after opening mail has finished (remember it)",
Zerotorescue@0 335 desc = "Instead of always turning Quick Auction's auto mail on after mail opening you can choose to set it back to the value it was prior to opening mail.",
Zerotorescue@0 336 width = "full",
Zerotorescue@0 337 get = function() return MailOpener.db.profile.general.autoSetBackQAAutoMail; end,
Zerotorescue@0 338 set = function(i, v) MailOpener.db.profile.general.autoSetBackQAAutoMail = v; end,
Zerotorescue@0 339 hidden = (not MailOpener.QuickAuctionsEnabled),
Zerotorescue@0 340 disabled = function() return (MailOpener.db.profile.general.autoReenableQAAutoMail and not MailOpener.db.profile.general.autoSetBackQAAutoMail); end,
Zerotorescue@0 341 },
Zerotorescue@0 342 },
Zerotorescue@0 343 }, -- end General config inline group
Zerotorescue@0 344 -- Profile config inline group
Zerotorescue@0 345 profileConfig = {
Zerotorescue@0 346 order = 15,
Zerotorescue@0 347 type = "group",
Zerotorescue@0 348 inline = true,
Zerotorescue@0 349 name = "New Character Specfic Profile",
Zerotorescue@0 350 args = {
Zerotorescue@0 351 description = {
Zerotorescue@0 352 order = 10,
Zerotorescue@0 353 type = "description",
Zerotorescue@0 354 name = "You can create a new profile to allow different behaviour for different characters. Imagine setting up a profile for your AH banker which will retrieve all sorts of mail containing items while other characters don't automatically open mail with items sent by other players.",
Zerotorescue@0 355 },
Zerotorescue@0 356 header = {
Zerotorescue@0 357 order = 15,
Zerotorescue@0 358 type = "header",
Zerotorescue@0 359 name = "",
Zerotorescue@0 360 },
Zerotorescue@0 361 createNewProfile = {
Zerotorescue@0 362 order = 20,
Zerotorescue@0 363 type = "execute",
Zerotorescue@0 364 name = "Create a new character specific profile",
Zerotorescue@0 365 desc = "Create a new profile for this user. You can also make profile groups at the profiles tab to the left.",
Zerotorescue@0 366 width = "double",
Zerotorescue@0 367 func = function()
Zerotorescue@0 368 MailOpener.db:SetProfile(UnitName("player") .. " - " .. GetRealmName());
Zerotorescue@0 369 end,
Zerotorescue@0 370 },
Zerotorescue@0 371 },
Zerotorescue@0 372 }, -- end Profile config inline group
Zerotorescue@0 373 },
Zerotorescue@0 374 };
Zerotorescue@0 375
Zerotorescue@0 376 return generalConfigGroup;
Zerotorescue@0 377 end
Zerotorescue@0 378
Zerotorescue@31 379 function mod:GetNotificationsOptions()
Zerotorescue@0 380 local notificationsConfigGroup = {
Zerotorescue@0 381 order = 200,
Zerotorescue@0 382 type = "group",
Zerotorescue@0 383 name = "Notifications",
Zerotorescue@0 384 desc = "Toggle notifications.",
Zerotorescue@0 385 args = {
Zerotorescue@0 386 -- Notifications config inline group
Zerotorescue@0 387 nofitications = {
Zerotorescue@0 388 order = 10,
Zerotorescue@0 389 type = "group",
Zerotorescue@0 390 inline = true,
Zerotorescue@0 391 name = "Notifications",
Zerotorescue@0 392 args = {
Zerotorescue@0 393 description = {
Zerotorescue@0 394 order = 10,
Zerotorescue@0 395 type = "description",
Zerotorescue@0 396 name = "Toggle which notification you wish to see.",
Zerotorescue@0 397 },
Zerotorescue@0 398 },
Zerotorescue@0 399 }, -- end Notifications config inline group
Zerotorescue@0 400
Zerotorescue@0 401 -- General Notifications config inline group
Zerotorescue@0 402 general = {
Zerotorescue@0 403 order = 20,
Zerotorescue@0 404 type = "group",
Zerotorescue@0 405 inline = true,
Zerotorescue@0 406 name = "General Notifications",
Zerotorescue@0 407 args = {
Zerotorescue@0 408 welcome = {
Zerotorescue@0 409 order = 20,
Zerotorescue@0 410 type = "toggle",
Zerotorescue@0 411 name = "Show message when |cfffed000opening the mailbox|r",
Zerotorescue@0 412 desc = "Print the welcome message whenever you open the mailbox.",
Zerotorescue@0 413 set = function(i, v) MailOpener.db.profile.notifications.welcome = v; end,
Zerotorescue@0 414 get = function() return MailOpener.db.profile.notifications.welcome; end,
Zerotorescue@0 415 width = "double",
Zerotorescue@0 416 },
Zerotorescue@0 417 bye = {
Zerotorescue@0 418 order = 21,
Zerotorescue@0 419 type = "toggle",
Zerotorescue@0 420 name = "Show message when |cfffed000closing the mailbox|r",
Zerotorescue@0 421 desc = "Print the bye message whenever you close the mailbox.",
Zerotorescue@0 422 set = function(i, v) MailOpener.db.profile.notifications.bye = v; end,
Zerotorescue@0 423 get = function() return MailOpener.db.profile.notifications.bye; end,
Zerotorescue@0 424 width = "double",
Zerotorescue@0 425 },
Zerotorescue@0 426 fishedOpeningBatch = {
Zerotorescue@0 427 order = 22,
Zerotorescue@0 428 type = "toggle",
Zerotorescue@0 429 name = "Announce when |cfffed000finished opening the current batch|r",
Zerotorescue@0 430 desc = "Announce when opening of the current batch of mails has been completed.",
Zerotorescue@0 431 set = function(i, v) MailOpener.db.profile.notifications.finishedCurrentBatch = v; end,
Zerotorescue@0 432 get = function() return MailOpener.db.profile.notifications.finishedCurrentBatch; end,
Zerotorescue@0 433 width = "double",
Zerotorescue@0 434 },
Zerotorescue@0 435 noMoreMailAvailable = {
Zerotorescue@0 436 order = 23,
Zerotorescue@0 437 type = "toggle",
Zerotorescue@0 438 name = "Announce when |cfffed000the mailbox is completely empty|r",
Zerotorescue@0 439 desc = "Announce when there is nothing left for Mail Opener to open.",
Zerotorescue@0 440 set = function(i, v) MailOpener.db.profile.notifications.mailboxIsEmpty = v; end,
Zerotorescue@0 441 get = function() return MailOpener.db.profile.notifications.mailboxIsEmpty; end,
Zerotorescue@0 442 width = "double",
Zerotorescue@0 443 },
Zerotorescue@0 444 },
Zerotorescue@0 445 }, -- end General Notifications config inline group
Zerotorescue@0 446
Zerotorescue@0 447 -- Mail Skipped Notifications config inline group
Zerotorescue@0 448 mailSkipped = {
Zerotorescue@0 449 order = 30,
Zerotorescue@0 450 type = "group",
Zerotorescue@0 451 inline = true,
Zerotorescue@0 452 name = "Mail Skipped Notifications",
Zerotorescue@0 453 args = {
Zerotorescue@0 454 descriptionMailSkipped = {
Zerotorescue@0 455 order = 31,
Zerotorescue@0 456 type = "description",
Zerotorescue@0 457 name = "Announce when mail is skipped because...",
Zerotorescue@0 458 },
Zerotorescue@0 459
Zerotorescue@0 460 skippedToggleAll = {
Zerotorescue@0 461 order = 35,
Zerotorescue@0 462 type = "toggle",
Zerotorescue@0 463 name = "Toggle everything",
Zerotorescue@0 464 desc = "Announce when mail is skipped for |cfffed000any|r reason.",
Zerotorescue@0 465 set = function(i, v) MailOpener.db.profile.notifications.skipped.all = v; end,
Zerotorescue@0 466 get = function() return MailOpener.db.profile.notifications.skipped.all; end,
Zerotorescue@0 467 },
Zerotorescue@0 468 skippedInventoryFull = {
Zerotorescue@0 469 order = 36,
Zerotorescue@0 470 type = "toggle",
Zerotorescue@0 471 name = "Your inventory is full",
Zerotorescue@0 472 desc = "Announce when mail is skipped because |cfffed000your inventory is full|r.",
Zerotorescue@0 473 set = function(i, v) MailOpener.db.profile.notifications.skipped.inventoryFull = v; end,
Zerotorescue@0 474 get = function() return MailOpener.db.profile.notifications.skipped.inventoryFull; end,
Zerotorescue@0 475 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 476 },
Zerotorescue@0 477 skippedKeepFreeSpaceLimit = {
Zerotorescue@0 478 order = 37,
Zerotorescue@0 479 type = "toggle",
Zerotorescue@0 480 name = "Keep free space limit reached",
Zerotorescue@0 481 desc = "Announce when mail is skipped because |cfffed000the keep free space limit has been reached|r.",
Zerotorescue@0 482 set = function(i, v) MailOpener.db.profile.notifications.skipped.keepFreeSpaceLimit = v; end,
Zerotorescue@0 483 get = function() return MailOpener.db.profile.notifications.skipped.keepFreeSpaceLimit; end,
Zerotorescue@0 484 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 485 },
Zerotorescue@0 486 skippedGMMail = {
Zerotorescue@0 487 order = 38,
Zerotorescue@0 488 type = "toggle",
Zerotorescue@0 489 name = "GM mail",
Zerotorescue@0 490 desc = "Announce when mail is skipped because it's |cfffed000mail sent by a Game Master|r.",
Zerotorescue@0 491 set = function(i, v) MailOpener.db.profile.notifications.skipped.GMMail = v; end,
Zerotorescue@0 492 get = function() return MailOpener.db.profile.notifications.skipped.GMMail; end,
Zerotorescue@0 493 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 494 },
Zerotorescue@0 495 skippedCOD = {
Zerotorescue@0 496 order = 39,
Zerotorescue@0 497 type = "toggle",
Zerotorescue@0 498 name = "C.O.D. mail",
Zerotorescue@0 499 desc = "Announce when mail is skipped because it's |cfffed000a Cost On Delivery mail|r.",
Zerotorescue@0 500 set = function(i, v) MailOpener.db.profile.notifications.skipped.COD = v; end,
Zerotorescue@0 501 get = function() return MailOpener.db.profile.notifications.skipped.COD; end,
Zerotorescue@0 502 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 503 },
Zerotorescue@0 504 skippedNormalGoldMail = {
Zerotorescue@0 505 order = 40,
Zerotorescue@0 506 type = "toggle",
Zerotorescue@0 507 name = "Normal mail with gold",
Zerotorescue@0 508 desc = "Announce when mail is skipped because it's |cfffed000normal mail containing gold|r.",
Zerotorescue@0 509 set = function(i, v) MailOpener.db.profile.notifications.skipped.normalGoldMail = v; end,
Zerotorescue@0 510 get = function() return MailOpener.db.profile.notifications.skipped.normalGoldMail; end,
Zerotorescue@0 511 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 512 },
Zerotorescue@0 513 skippedNormalItemsMail = {
Zerotorescue@0 514 order = 41,
Zerotorescue@0 515 type = "toggle",
Zerotorescue@0 516 name = "Normal mail with attachments",
Zerotorescue@0 517 desc = "Announce when mail is skipped because it's |cfffed000normal mail containing items|r.",
Zerotorescue@0 518 set = function(i, v) MailOpener.db.profile.notifications.skipped.normalItemsMail = v; end,
Zerotorescue@0 519 get = function() return MailOpener.db.profile.notifications.skipped.normalItemsMail; end,
Zerotorescue@0 520 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 521 },
Zerotorescue@0 522 skippedAHExpired = {
Zerotorescue@0 523 order = 42,
Zerotorescue@0 524 type = "toggle",
Zerotorescue@0 525 name = "Auction expired mail",
Zerotorescue@0 526 desc = "Announce when mail is skipped because it's |cfffed000auction expired mail|r.",
Zerotorescue@0 527 set = function(i, v) MailOpener.db.profile.notifications.skipped.AHexpired = v; end,
Zerotorescue@0 528 get = function() return MailOpener.db.profile.notifications.skipped.AHexpired; end,
Zerotorescue@0 529 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 530 },
Zerotorescue@0 531 skippedAHSuccessful = {
Zerotorescue@0 532 order = 43,
Zerotorescue@0 533 type = "toggle",
Zerotorescue@0 534 name = "Auction successful mail",
Zerotorescue@0 535 desc = "Announce when mail is skipped because it's |cfffed000auction successful mail|r.",
Zerotorescue@0 536 set = function(i, v) MailOpener.db.profile.notifications.skipped.AHsuccess = v; end,
Zerotorescue@0 537 get = function() return MailOpener.db.profile.notifications.skipped.AHsuccess; end,
Zerotorescue@0 538 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 539 },
Zerotorescue@0 540 skippedAHWon = {
Zerotorescue@0 541 order = 44,
Zerotorescue@0 542 type = "toggle",
Zerotorescue@0 543 name = "Auction won mail",
Zerotorescue@0 544 desc = "Announce when mail is skipped because it's |cfffed000auction won mail|r.",
Zerotorescue@0 545 set = function(i, v) MailOpener.db.profile.notifications.skipped.AHwon = v; end,
Zerotorescue@0 546 get = function() return MailOpener.db.profile.notifications.skipped.AHwon; end,
Zerotorescue@0 547 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 548 },
Zerotorescue@0 549 skippedAHCanceled = {
Zerotorescue@0 550 order = 45,
Zerotorescue@0 551 type = "toggle",
Zerotorescue@0 552 name = "Auction canceled mail",
Zerotorescue@0 553 desc = "Announce when mail is skipped because it's |cfffed000auction canceled mail|r.",
Zerotorescue@0 554 set = function(i, v) MailOpener.db.profile.notifications.skipped.AHcanceled = v; end,
Zerotorescue@0 555 get = function() return MailOpener.db.profile.notifications.skipped.AHcanceled; end,
Zerotorescue@0 556 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 557 },
Zerotorescue@0 558 skippedAHOutbid = {
Zerotorescue@0 559 order = 46,
Zerotorescue@0 560 type = "toggle",
Zerotorescue@0 561 name = "Auction outbid mail",
Zerotorescue@0 562 desc = "Announce when mail is skipped because it's |cfffed000auction outbid mail|r.",
Zerotorescue@0 563 set = function(i, v) MailOpener.db.profile.notifications.skipped.AHoutbid = v; end,
Zerotorescue@0 564 get = function() return MailOpener.db.profile.notifications.skipped.AHoutbid; end,
Zerotorescue@0 565 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 566 },
Zerotorescue@0 567 skippedOther = {
Zerotorescue@0 568 order = 47,
Zerotorescue@0 569 type = "toggle",
Zerotorescue@0 570 name = "Other mail (e.g. plain text)",
Zerotorescue@0 571 desc = "Announce when mail is skipped because it's |cfffed000any other kind of mail|r (e.g. plain text).",
Zerotorescue@0 572 set = function(i, v) MailOpener.db.profile.notifications.skipped.other = v; end,
Zerotorescue@0 573 get = function() return MailOpener.db.profile.notifications.skipped.other; end,
Zerotorescue@0 574 disabled = function() return (not MailOpener.db.profile.notifications.skipped.all); end,
Zerotorescue@0 575 },
Zerotorescue@0 576 },
Zerotorescue@0 577 }, -- end Mail Skipped Notifications config inline group
Zerotorescue@0 578
Zerotorescue@0 579 -- Mail Processed Notifications config inline group
Zerotorescue@0 580 mailProcessed = {
Zerotorescue@0 581 order = 40,
Zerotorescue@0 582 type = "group",
Zerotorescue@0 583 inline = true,
Zerotorescue@0 584 name = "Mail Processed Notifications",
Zerotorescue@0 585 args = {
Zerotorescue@0 586 descriptionMailProcessed = {
Zerotorescue@0 587 order = 61,
Zerotorescue@0 588 type = "description",
Zerotorescue@0 589 name = "Announce when mail is processed because...",
Zerotorescue@0 590 },
Zerotorescue@0 591
Zerotorescue@0 592 processedToggleAll = {
Zerotorescue@0 593 order = 65,
Zerotorescue@0 594 type = "toggle",
Zerotorescue@0 595 name = "Toggle everything",
Zerotorescue@0 596 desc = "Announce when mail is processed for |cfffed000any|r reason.",
Zerotorescue@0 597 set = function(i, v) MailOpener.db.profile.notifications.processed.all = v; end,
Zerotorescue@0 598 get = function() return MailOpener.db.profile.notifications.processed.all; end,
Zerotorescue@0 599 },
Zerotorescue@0 600 processedNormalGoldMail = {
Zerotorescue@0 601 order = 70,
Zerotorescue@0 602 type = "toggle",
Zerotorescue@0 603 name = "Normal mail with gold",
Zerotorescue@0 604 desc = "Announce when mail is processed because it's |cfffed000normal mail containing gold|r.",
Zerotorescue@0 605 set = function(i, v) MailOpener.db.profile.notifications.processed.normalGoldMail = v; end,
Zerotorescue@0 606 get = function() return MailOpener.db.profile.notifications.processed.normalGoldMail; end,
Zerotorescue@0 607 disabled = function() return (not MailOpener.db.profile.notifications.processed.all); end,
Zerotorescue@0 608 },
Zerotorescue@0 609 processedNormalItemsMail = {
Zerotorescue@0 610 order = 71,
Zerotorescue@0 611 type = "toggle",
Zerotorescue@0 612 name = "Normal mail with attachments",
Zerotorescue@0 613 desc = "Announce when mail is processed because it's |cfffed000normal mail containing items|r.",
Zerotorescue@0 614 set = function(i, v) MailOpener.db.profile.notifications.processed.normalItemsMail = v; end,
Zerotorescue@0 615 get = function() return MailOpener.db.profile.notifications.processed.normalItemsMail; end,
Zerotorescue@0 616 disabled = function() return (not MailOpener.db.profile.notifications.processed.all); end,
Zerotorescue@0 617 },
Zerotorescue@0 618 processedAHExpired = {
Zerotorescue@0 619 order = 72,
Zerotorescue@0 620 type = "toggle",
Zerotorescue@0 621 name = "Auction expired mail",
Zerotorescue@0 622 desc = "Announce when mail is processed because it's |cfffed000auction expired mail|r.",
Zerotorescue@0 623 set = function(i, v) MailOpener.db.profile.notifications.processed.AHexpired = v; end,
Zerotorescue@0 624 get = function() return MailOpener.db.profile.notifications.processed.AHexpired; end,
Zerotorescue@0 625 disabled = function() return (not MailOpener.db.profile.notifications.processed.all); end,
Zerotorescue@0 626 },
Zerotorescue@0 627 processedAHSuccessful = {
Zerotorescue@0 628 order = 73,
Zerotorescue@0 629 type = "toggle",
Zerotorescue@0 630 name = "Auction successful mail",
Zerotorescue@0 631 desc = "Announce when mail is processed because it's |cfffed000auction successful mail|r.",
Zerotorescue@0 632 set = function(i, v) MailOpener.db.profile.notifications.processed.AHsuccess = v; end,
Zerotorescue@0 633 get = function() return MailOpener.db.profile.notifications.processed.AHsuccess; end,
Zerotorescue@0 634 disabled = function() return (not MailOpener.db.profile.notifications.processed.all); end,
Zerotorescue@0 635 },
Zerotorescue@0 636 processedAHWon = {
Zerotorescue@0 637 order = 74,
Zerotorescue@0 638 type = "toggle",
Zerotorescue@0 639 name = "Auction won mail",
Zerotorescue@0 640 desc = "Announce when mail is processed because it's |cfffed000auction won mail|r.",
Zerotorescue@0 641 set = function(i, v) MailOpener.db.profile.notifications.processed.AHwon = v; end,
Zerotorescue@0 642 get = function() return MailOpener.db.profile.notifications.processed.AHwon; end,
Zerotorescue@0 643 disabled = function() return (not MailOpener.db.profile.notifications.processed.all); end,
Zerotorescue@0 644 },
Zerotorescue@0 645 processedAHCanceled = {
Zerotorescue@0 646 order = 75,
Zerotorescue@0 647 type = "toggle",
Zerotorescue@0 648 name = "Auction canceled mail",
Zerotorescue@0 649 desc = "Announce when mail is processed because it's |cfffed000auction canceled mail|r.",
Zerotorescue@0 650 set = function(i, v) MailOpener.db.profile.notifications.processed.AHcanceled = v; end,
Zerotorescue@0 651 get = function() return MailOpener.db.profile.notifications.processed.AHcanceled; end,
Zerotorescue@0 652 disabled = function() return (not MailOpener.db.profile.notifications.processed.all); end,
Zerotorescue@0 653 },
Zerotorescue@0 654 processedAHOutbid = {
Zerotorescue@0 655 order = 76,
Zerotorescue@0 656 type = "toggle",
Zerotorescue@0 657 name = "Auction outbid mail",
Zerotorescue@0 658 desc = "Announce when mail is processed because it's |cfffed000auction outbid mail|r.",
Zerotorescue@0 659 set = function(i, v) MailOpener.db.profile.notifications.processed.AHoutbid = v; end,
Zerotorescue@0 660 get = function() return MailOpener.db.profile.notifications.processed.AHoutbid; end,
Zerotorescue@0 661 disabled = function() return (not MailOpener.db.profile.notifications.processed.all); end,
Zerotorescue@0 662 },
Zerotorescue@0 663 processedOther = {
Zerotorescue@0 664 order = 77,
Zerotorescue@0 665 type = "toggle",
Zerotorescue@0 666 name = "Other mail (e.g. plain text)",
Zerotorescue@0 667 desc = "Announce when mail is processed because it's |cfffed000any other kind of mail|r (e.g. plain text).",
Zerotorescue@0 668 set = function(i, v) MailOpener.db.profile.notifications.processed.other = v; end,
Zerotorescue@0 669 get = function() return MailOpener.db.profile.notifications.processed.other; end,
Zerotorescue@0 670 disabled = function() return (not MailOpener.db.profile.notifications.processed.all); end,
Zerotorescue@0 671 },
Zerotorescue@0 672 },
Zerotorescue@0 673 }, -- end Mail Processed Notifications config inline group
Zerotorescue@0 674
Zerotorescue@0 675 -- Sound Notifications config inline group
Zerotorescue@0 676 sound = {
Zerotorescue@0 677 order = 50,
Zerotorescue@0 678 type = "group",
Zerotorescue@0 679 inline = true,
Zerotorescue@0 680 name = "Sound Notifications",
Zerotorescue@0 681 args = {
Zerotorescue@0 682 bagsFullSound = {
Zerotorescue@0 683 order = 100,
Zerotorescue@0 684 type = "toggle",
Zerotorescue@0 685 name = "Play a sound when your |cfffed000inventory is full|r",
Zerotorescue@0 686 desc = "Play a sound when your inventory is full. You can select what sound in the select box next to this.",
Zerotorescue@0 687 set = function(i, v) MailOpener.db.profile.notifications.bagsFullSound = v; end,
Zerotorescue@0 688 get = function() return MailOpener.db.profile.notifications.bagsFullSound; end,
Zerotorescue@0 689 width = "double",
Zerotorescue@0 690 },
Zerotorescue@0 691 bagsFullSoundFile = {
Zerotorescue@0 692 order = 101,
Zerotorescue@0 693 type = "select",
Zerotorescue@0 694 name = "Sound File",
Zerotorescue@0 695 desc = "Sound file to play when your bags are full.",
Zerotorescue@0 696 dialogControl = "LSM30_Sound",
Zerotorescue@0 697 set = function(i, v)
Zerotorescue@0 698 MailOpener.db.profile.notifications.bagsFullSoundFile = Media:Fetch("sound", v);
Zerotorescue@0 699 MailOpener.db.profile.notifications.bagsFullSoundFileName = v;
Zerotorescue@0 700
Zerotorescue@0 701 PlaySoundFile(MailOpener.db.profile.notifications.bagsFullSoundFile);
Zerotorescue@0 702
Zerotorescue@0 703 print("|cff15ff00Mail Opener|r: You may have to increase the mail opening interval if this sound effect gets spammy. The recommended value is 10 seconds.");
Zerotorescue@0 704 end,
Zerotorescue@0 705 get = function() return MailOpener.db.profile.notifications.bagsFullSoundFileName end,
Zerotorescue@0 706 values = function () return (Media:HashTable("sound") or nil); end,
Zerotorescue@0 707 disabled = function() return (not MailOpener.db.profile.notifications.bagsFullSound); end,
Zerotorescue@0 708 },
Zerotorescue@0 709 bagsFullSoundOnlyOnce = {
Zerotorescue@0 710 order = 102,
Zerotorescue@0 711 type = "toggle",
Zerotorescue@0 712 name = "Only once",
Zerotorescue@0 713 desc = "Only play this sound once each time new mail has been arrived.",
Zerotorescue@0 714 set = function(i, v) MailOpener.db.profile.notifications.bagsFullSoundOnlyOnce = v; end,
Zerotorescue@0 715 get = function() return MailOpener.db.profile.notifications.bagsFullSoundOnlyOnce; end,
Zerotorescue@0 716 disabled = function() return (not MailOpener.db.profile.notifications.bagsFullSound); end,
Zerotorescue@0 717 },
Zerotorescue@0 718 mailboxEmptySound = {
Zerotorescue@0 719 order = 110,
Zerotorescue@0 720 type = "toggle",
Zerotorescue@0 721 name = "Play a sound when |cfffed000no more mail can be opened|r",
Zerotorescue@0 722 desc = "Play a sound when no more mail can be opened. You can select what sound in the select box next to this.",
Zerotorescue@0 723 set = function(i, v) MailOpener.db.profile.notifications.mailboxEmptySound = v; end,
Zerotorescue@0 724 get = function() return MailOpener.db.profile.notifications.mailboxEmptySound; end,
Zerotorescue@0 725 width = "double",
Zerotorescue@0 726 },
Zerotorescue@0 727 mailboxEmptySoundFile = {
Zerotorescue@0 728 order = 111,
Zerotorescue@0 729 type = "select",
Zerotorescue@0 730 name = "Sound File",
Zerotorescue@0 731 desc = "Sound file to play when Mail Opener can't open any more mail.",
Zerotorescue@0 732 dialogControl = "LSM30_Sound",
Zerotorescue@0 733 set = function(i, v)
Zerotorescue@0 734 MailOpener.db.profile.notifications.mailboxEmptySoundFile = Media:Fetch("sound", v);
Zerotorescue@0 735 MailOpener.db.profile.notifications.mailboxEmptySoundFileName = v;
Zerotorescue@0 736
Zerotorescue@0 737 PlaySoundFile(MailOpener.db.profile.notifications.mailboxEmptySoundFile);
Zerotorescue@0 738
Zerotorescue@0 739 print("|cff15ff00Mail Opener|r: You may have to increase the mail opening interval if this sound effect gets spammy. The recommended value is 10 seconds.");
Zerotorescue@0 740 end,
Zerotorescue@0 741 get = function() return MailOpener.db.profile.notifications.mailboxEmptySoundFileName end,
Zerotorescue@0 742 values = function () return (Media:HashTable("sound") or nil); end,
Zerotorescue@0 743 disabled = function() return (not MailOpener.db.profile.notifications.mailboxEmptySound); end,
Zerotorescue@0 744 },
Zerotorescue@0 745 mailboxEmptySoundOnlyOnce = {
Zerotorescue@0 746 order = 112,
Zerotorescue@0 747 type = "toggle",
Zerotorescue@0 748 name = "Only once",
Zerotorescue@0 749 desc = "Only play this sound once each time new mail has been arrived.",
Zerotorescue@0 750 set = function(i, v) MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce = v; end,
Zerotorescue@0 751 get = function() return MailOpener.db.profile.notifications.mailboxEmptySoundOnlyOnce; end,
Zerotorescue@0 752 disabled = function() return (not MailOpener.db.profile.notifications.mailboxEmptySound); end,
Zerotorescue@0 753 },
Zerotorescue@0 754 },
Zerotorescue@0 755 }, -- end Sound Notifications config inline group
Zerotorescue@0 756 },
Zerotorescue@0 757 };
Zerotorescue@0 758
Zerotorescue@0 759 return notificationsConfigGroup;
Zerotorescue@0 760 end