WoWInterface SVN NightWatch

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 5 to Rev 6
    Reverse comparison

Rev 5 → Rev 6

NightWatch.lua
316,7 → 316,7
type = "input",
},
chatTest = {
name = function(info) return addon:chatTest(info) end,
name = function() return addon:chatTest() end,
order = 25,
type = "description",
},
333,7 → 333,7
type = "input",
},
whisperTest = {
name = function(info) return addon:whisperTest(info) end,
name = function() return addon:whisperTest() end,
order = 60,
type = "description",
},
343,36 → 343,44
-- type = "header",
-- },
setDefaultFmt = {
name = "Set Default",
name = "Set As Default",
desc = "Make these formats the default for new spells.",
order = 100, -- width = "half",
type = "execute",
func = function()
func = function()
if not db.selSpell then return end
db.customMsgFormat.chat = db.spells[db.selSpell].msgFormat.chat
db.customMsgFormat.chatTarget = db.spells[db.selSpell].msgFormat.chatTarget
end,
},
copyFmt = {
name = "Copy*",
name = "Copy",
desc = "Copy these formats.",
order = 110, width = "half",
type = "execute",
func = "copyFmt",
func = function() addon:copyFmt(db.selSpell) end,
},
pasteFmt = {
name = "Paste*",
name = "Paste",
desc = "Paste formats.",
order = 120, width = "half",
type = "execute",
func = "pastFmt",
func = function() addon:pasteFmt(db.selSpell) end,
},
copyFmtToAll = {
name = "Copy To All*",
desc = "Copies these formats to all spells.",
order = 130, -- width = "half",
setFmtToAll = {
name = "Set All",
desc = "Sets these formats for all spells",
order = 130, width = "half",
type = "execute",
func = "CopyFmtToAll",
func = function() addon:setFmtToAll(db.selSpell) end,
},
resetFmtToDefault = {
name = "Reset",
desc = "Resets these formats to program defaults.",
order = 140, width = "half",
type = "execute",
func = function() addon:resetFmtToDefault(db.selSpell) end,
},
formatHelp = {
name = "\n** Format Syntax **\n" ..
"%c = Caster\n" ..
741,18 → 749,29
return msg
end
 
function addon:copyFmt()
if not db.selSpell then return end
function addon:copyFmt(value)
if not value then return end
clipboard.fmt = addon:deepcopy(db.spells[value].msgFormat)
end
 
function addon:pasteFmt()
if not db.selSpell then return end
function addon:pasteFmt(value)
if not value then return end
db.spells[value].msgFormat = addon:deepcopy(clipboard.fmt)
end
 
function addon:copyFmtToAll()
if not db.selSpell then return end
function addon:setFmtToAll(value)
if not value then return end
addon:copyFmt(value)
for k,_ in pairs(db.spells) do
addon:pasteFmt(k)
end
end
 
function addon:resetFmtToDefault(value)
if not value then return end
db.spells[value].msgFormat = addon:defaultMsgFormat()
end
 
-- From Recount
function addon:deepcopy(object)
local lookup_table = {}
NightWatch.toc
2,7 → 2,7
## Title: NightWatch
## Notes: Sends chat alerts for certain spells. "/nw" for config.
## Author: Nightyniight @ Frostmourne - US
## Version: 0.7
## Version: 0.7.wowi:revision
## DefaultState: Enabled
## LoadOnDemand: 0
## SavedVariables: NightWatchDB