WoWInterface SVN NightWatch

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 28 to Rev 29
    Reverse comparison

Rev 28 → Rev 29

trunk/libs/AceAddon-3.0/AceAddon-3.0.lua
28,9 → 28,9
-- end
-- @class file
-- @name AceAddon-3.0.lua
-- @release $Id: AceAddon-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $
-- @release $Id: AceAddon-3.0.lua 980 2010-10-27 14:20:11Z nevcairiel $
 
local MAJOR, MINOR = "AceAddon-3.0", 5
local MAJOR, MINOR = "AceAddon-3.0", 10
local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceAddon then return end -- No Upgrade needed.
153,6 → 153,7
setmetatable( object, addonmeta )
self.addons[name] = object
object.modules = {}
object.orderedModules = {}
object.defaultModuleLibraries = {}
Embed( object ) -- embed NewModule, GetModule methods
self:EmbedLibraries(object, select(i,...))
285,6 → 286,7
 
safecall(self.OnModuleCreated, self, module) -- Was in Ace2 and I think it could be a cool thing to have handy.
self.modules[name] = module
tinsert(self.orderedModules, module)
 
return module
end
489,12 → 491,14
-- target (object) - target object to embed aceaddon in
--
-- this is a local function specifically since it's meant to be only called internally
function Embed(target)
function Embed(target, skipPMixins)
for k, v in pairs(mixins) do
target[k] = v
end
for k, v in pairs(pmixins) do
target[k] = target[k] or v
if not skipPMixins then
for k, v in pairs(pmixins) do
target[k] = target[k] or v
end
end
end
 
547,8 → 551,9
end
 
-- enable possible modules.
for name, module in pairs(addon.modules) do
self:EnableAddon(module)
local modules = addon.orderedModules
for i = 1, #modules do
self:EnableAddon(modules[i])
end
end
return self.statuses[addon.name] -- return true if we're disabled
580,8 → 585,9
if lib then safecall(lib.OnEmbedDisable, lib, addon) end
end
-- disable possible modules.
for name, module in pairs(addon.modules) do
self:DisableAddon(module)
local modules = addon.orderedModules
for i = 1, #modules do
self:DisableAddon(modules[i])
end
end
 
638,5 → 644,15
 
-- upgrade embeded
for name, addon in pairs(AceAddon.addons) do
Embed(addon)
Embed(addon, true)
end
 
-- 2010-10-27 nevcairiel - add new "orderedModules" table
if oldminor and oldminor < 10 then
for name, addon in pairs(AceAddon.addons) do
addon.orderedModules = {}
for module_name, module in pairs(addon.modules) do
tinsert(addon.orderedModules, module)
end
end
end
trunk/libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
8,8 → 8,8
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
-- @class file
-- @name AceConfigRegistry-3.0
-- @release $Id: AceConfigRegistry-3.0.lua 890 2009-12-06 12:50:05Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 11
-- @release $Id: AceConfigRegistry-3.0.lua 998 2010-12-01 18:39:53Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 13
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigRegistry then return end
134,7 → 134,9
},
range={
min=optnumber,
softMin=optnumber,
max=optnumber,
softMax=optnumber,
step=optnumber,
bigStep=optnumber,
isPercent=optbool,
149,6 → 151,7
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
itemControl=optstring,
},
multiselect={
values=ismethodtable,
trunk/libs/AceConfig-3.0/AceConfig-3.0.lua
3,7 → 3,7
-- as well as associate it with a slash command.
-- @class file
-- @name AceConfig-3.0
-- @release $Id: AceConfig-3.0.lua 877 2009-11-02 15:56:50Z nevcairiel $
-- @release $Id: AceConfig-3.0.lua 969 2010-10-07 02:11:48Z shefki $
 
--[[
AceConfig-3.0
19,8 → 19,8
 
local cfgreg = LibStub("AceConfigRegistry-3.0")
local cfgcmd = LibStub("AceConfigCmd-3.0")
local cfgdlg = LibStub("AceConfigDialog-3.0")
--TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0")
--TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true)
--TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true)
 
-- Lua APIs
local pcall, error, type, pairs = pcall, error, type, pairs
36,7 → 36,7
-- You can supply a slash command (or a table of slash commands) to register with AceConfigCmd directly.
-- @paramsig appName, options [, slashcmd]
-- @param appName The application name for the config table.
-- @param options The option table (or a function to generate one on demand)
-- @param options The option table (or a function to generate one on demand). http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/
-- @param slashcmd A slash command to register for the option table, or a table of slash commands.
-- @usage
-- local AceConfig = LibStub("AceConfig-3.0")
trunk/libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
1,10 → 1,10
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
-- @class file
-- @name AceConfigDialog-3.0
-- @release $Id: AceConfigDialog-3.0.lua 902 2009-12-12 14:56:14Z nevcairiel $
-- @release $Id: AceConfigDialog-3.0.lua 998 2010-12-01 18:39:53Z nevcairiel $
 
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 43
local MAJOR, MINOR = "AceConfigDialog-3.0", 54
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigDialog then return end
15,6 → 15,7
 
AceConfigDialog.frame.apps = AceConfigDialog.frame.apps or {}
AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {}
AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {}
 
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")
23,8 → 24,8
local tconcat, tinsert, tsort, tremove = table.concat, table.insert, table.sort, table.remove
local strmatch, format = string.match, string.format
local assert, loadstring, error = assert, loadstring, error
local pairs, next, select, type, unpack = pairs, next, select, type, unpack
local rawset, tostring = rawset, tostring
local pairs, next, select, type, unpack, wipe = pairs, next, select, type, unpack, wipe
local rawset, tostring, tonumber = rawset, tostring, tonumber
local math_min, math_max, math_floor = math.min, math.max, math.floor
 
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
76,7 → 77,7
end
 
local function safecall(func, ...)
return Dispatchers[select('#', ...)](func, ...)
return Dispatchers[select("#", ...)](func, ...)
end
 
local width_multiplier = 170
103,7 → 104,7
local new, del, copy
--newcount, delcount,createdcount,cached = 0,0,0
do
local pool = setmetatable({},{__mode='k'})
local pool = setmetatable({},{__mode="k"})
function new()
--newcount = newcount + 1
local t = next(pool)
124,9 → 125,7
end
function del(t)
--delcount = delcount + 1
for k in pairs(t) do
t[k] = nil
end
wipe(t)
pool[t] = true
end
-- function cached()
240,7 → 239,7
info.handler = handler
info.option = option
info.type = option.type
info.uiType = 'dialog'
info.uiType = "dialog"
info.uiName = MAJOR
 
local a, b, c ,d
321,8 → 320,8
end
local OrderA, OrderB = tempOrders[a] or 100, tempOrders[b] or 100
if OrderA == OrderB then
local NameA = (type(tempNames[a] == "string") and tempNames[a]) or ""
local NameB = (type(tempNames[b] == "string") and tempNames[b]) or ""
local NameA = (type(tempNames[a]) == "string") and tempNames[a] or ""
local NameB = (type(tempNames[b]) == "string") and tempNames[b] or ""
return NameA:upper() < NameB:upper()
end
if OrderA < 0 then
423,6 → 422,9
if user.grouplist then
del(user.grouplist)
end
if user.orderlist then
del(user.orderlist)
end
end
end
 
478,7 → 480,7
local treevalue
local treestatus
 
for n = 1, select('#',...) do
for n = 1, select("#",...) do
local key = select(n, ...)
 
if group.childGroups == "tab" or group.childGroups == "select" then
542,7 → 544,7
 
GameTooltip:SetText(name, 1, .82, 0, 1)
 
if opt.type == 'multiselect' then
if opt.type == "multiselect" then
GameTooltip:AddLine(user.text,0.5, 0.5, 0.8, 1)
end
if type(desc) == "string" then
561,10 → 563,10
 
local function GetFuncName(option)
local type = option.type
if type == 'execute' then
return 'func'
if type == "execute" then
return "func"
else
return 'set'
return "set"
end
end
local function confirmPopup(appName, rootframe, basepath, info, message, func, ...)
594,7 → 596,7
AceConfigDialog:Open(appName, rootframe, unpack(basepath or emptyTbl))
del(info)
end
for i = 1, select('#', ...) do
for i = 1, select("#", ...) do
t[i] = select(i, ...) or false
end
t.timeout = 0
653,7 → 655,7
info.handler = handler
info.option = option
info.type = option.type
info.uiType = 'dialog'
info.uiType = "dialog"
info.uiName = MAJOR
 
local name
764,13 → 766,13
end
end
 
local iscustom = user.rootframe:GetUserData('iscustom')
local iscustom = user.rootframe:GetUserData("iscustom")
local rootframe
 
if iscustom then
rootframe = user.rootframe
end
local basepath = user.rootframe:GetUserData('basepath')
local basepath = user.rootframe:GetUserData("basepath")
if type(func) == "string" then
if handler and handler[func] then
confirmPopup(user.appName, rootframe, basepath, info, confirmText, handler[func], handler, info, ...)
798,8 → 800,8
 
 
 
local iscustom = user.rootframe:GetUserData('iscustom')
local basepath = user.rootframe:GetUserData('basepath') or emptyTbl
local iscustom = user.rootframe:GetUserData("iscustom")
local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
--full refresh of the frame, some controls dont cause this on all events
if option.type == "color" then
if event == "OnValueConfirmed" then
834,23 → 836,27
end
 
local function ActivateSlider(widget, event, value)
local option = widget:GetUserData('option')
local min, max, step = option.min or 0, option.max or 100, option.step
if step then
value = math_floor((value - min) / step + 0.5) * step + min
else
value = math_max(math_min(value,max),min)
local option = widget:GetUserData("option")
local min, max, step = option.min or (not option.softMin and 0 or nil), option.max or (not option.softMax and 100 or nil), option.step
if min then
if step then
value = math_floor((value - min) / step + 0.5) * step + min
end
value = math_max(value, min)
end
if max then
value = math_min(value, max)
end
ActivateControl(widget,event,value)
end
 
--called from a checkbox that is part of an internally created multiselect group
--this type is safe to refresh on activation of one control
local function ActivateMultiControl(widget, event, ...)
ActivateControl(widget, event, widget:GetUserData('value'), ...)
ActivateControl(widget, event, widget:GetUserData("value"), ...)
local user = widget:GetUserDataTable()
local iscustom = user.rootframe:GetUserData('iscustom')
local basepath = user.rootframe:GetUserData('basepath') or emptyTbl
local iscustom = user.rootframe:GetUserData("iscustom")
local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
if iscustom then
AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
else
861,8 → 867,8
local function MultiControlOnClosed(widget, event, ...)
local user = widget:GetUserDataTable()
if user.valuechanged then
local iscustom = user.rootframe:GetUserData('iscustom')
local basepath = user.rootframe:GetUserData('basepath') or emptyTbl
local iscustom = user.rootframe:GetUserData("iscustom")
local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
if iscustom then
AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
else
872,7 → 878,7
end
 
local function FrameOnClose(widget, event)
local appName = widget:GetUserData('appName')
local appName = widget:GetUserData("appName")
AceConfigDialog.OpenFrames[appName] = nil
gui:Release(widget)
end
928,6 → 934,7
]]
local function BuildSelect(group, options, path, appName)
local groups = new()
local order = new()
local keySort = new()
local opts = new()
 
942,15 → 949,16
local hidden = CheckOptionHidden(v, options, path, appName)
if not inline and not hidden then
groups[k] = GetOptionsMemberValue("name", v, options, path, appName)
tinsert(order, k)
end
path[#path] = nil
end
end
 
del(opts)
del(keySort)
del(opts)
 
return groups
return groups, order
end
 
local function BuildSubGroups(group, tree, options, path, appName)
971,6 → 979,7
entry.value = k
entry.text = GetOptionsMemberValue("name", v, options, path, appName)
entry.icon = GetOptionsMemberValue("icon", v, options, path, appName)
entry.iconCoords = GetOptionsMemberValue("iconCoords", v, options, path, appName)
entry.disabled = CheckOptionDisabled(v, options, path, appName)
if not tree.children then tree.children = new() end
tinsert(tree.children,entry)
1082,7 → 1091,7
local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
 
if type(image) == 'string' then
if type(image) == "string" then
control = gui:Create("Icon")
if not width then
width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
1090,7 → 1099,7
if not height then
height = GetOptionsMemberValue("imageHeight",v, options, path, appName)
end
if type(imageCoords) == 'table' then
if type(imageCoords) == "table" then
control:SetImage(image, unpack(imageCoords))
else
control:SetImage(image)
1117,12 → 1126,8
control = gui:Create(v.multiline and "MultiLineEditBox" or "EditBox")
end
 
if v.multiline then
local lines = 4
if type(v.multiline) == "number" then
lines = v.multiline
end
control:SetHeight(60 + (14*lines))
if v.multiline and control.SetNumLines then
control:SetNumLines(tonumber(v.multiline) or 4)
end
control:SetLabel(name)
control:SetCallback("OnEnterPressed",ActivateControl)
1148,8 → 1153,8
local image = GetOptionsMemberValue("image", v, options, path, appName)
local imageCoords = GetOptionsMemberValue("imageCoords", v, options, path, appName)
 
if type(image) == 'string' then
if type(imageCoords) == 'table' then
if type(image) == "string" then
if type(imageCoords) == "table" then
control:SetImage(image, unpack(imageCoords))
else
control:SetImage(image)
1158,7 → 1163,7
elseif v.type == "range" then
control = gui:Create("Slider")
control:SetLabel(name)
control:SetSliderValues(v.min or 0,v.max or 100, v.bigStep or v.step or 0)
control:SetSliderValues(v.softMin or v.min or 0, v.softMax or v.max or 100, v.bigStep or v.step or 0)
control:SetIsPercent(v.isPercent)
local value = GetOptionsMemberValue("get",v, options, path, appName)
if type(value) ~= "number" then
1170,20 → 1175,60
 
elseif v.type == "select" then
local values = GetOptionsMemberValue("values", v, options, path, appName)
local controlType = v.dialogControl or v.control or "Dropdown"
control = gui:Create(controlType)
if not control then
geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType)))
control = gui:Create("Dropdown")
if v.style == "radio" then
local disabled = CheckOptionDisabled(v, options, path, appName)
local width = GetOptionsMemberValue("width",v,options,path,appName)
control = gui:Create("InlineGroup")
control:SetLayout("Flow")
control:SetTitle(name)
control.width = "fill"
 
control:PauseLayout()
local optionValue = GetOptionsMemberValue("get",v, options, path, appName, value)
for value, text in pairs(values) do
local radio = gui:Create("CheckBox")
radio:SetLabel(text)
radio:SetUserData("value", value)
radio:SetUserData("text", text)
radio:SetDisabled(disabled)
radio:SetType("radio")
radio:SetValue(optionValue == value)
radio:SetCallback("OnValueChanged", ActivateMultiControl)
InjectInfo(radio, options, v, path, rootframe, appName)
control:AddChild(radio)
if width == "double" then
radio:SetWidth(width_multiplier * 2)
elseif width == "half" then
radio:SetWidth(width_multiplier / 2)
elseif width == "full" then
radio.width = "fill"
else
radio:SetWidth(width_multiplier)
end
end
control:ResumeLayout()
control:DoLayout()
else
local controlType = v.dialogControl or v.control or "Dropdown"
control = gui:Create(controlType)
if not control then
geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType)))
control = gui:Create("Dropdown")
end
local itemType = v.itemControl
if itemType and not gui:GetWidgetVersion(itemType) then
geterrorhandler()(("Invalid Custom Item Type - %s"):format(tostring(itemType)))
itemType = nil
end
control:SetLabel(name)
control:SetList(values, nil, itemType)
local value = GetOptionsMemberValue("get",v, options, path, appName)
if not values[value] then
value = nil
end
control:SetValue(value)
control:SetCallback("OnValueChanged", ActivateControl)
end
control:SetLabel(name)
control:SetList(values)
local value = GetOptionsMemberValue("get",v, options, path, appName)
if not values[value] then
value = nil
end
control:SetValue(value)
control:SetCallback("OnValueChanged",ActivateControl)
 
elseif v.type == "multiselect" then
local values = GetOptionsMemberValue("values", v, options, path, appName)
1241,8 → 1286,8
local text = values[value]
local check = gui:Create("CheckBox")
check:SetLabel(text)
check:SetUserData('value', value)
check:SetUserData('text', text)
check:SetUserData("value", value)
check:SetUserData("text", text)
check:SetDisabled(disabled)
check:SetTriState(v.tristate)
check:SetValue(GetOptionsMemberValue("get",v, options, path, appName, value))
1302,14 → 1347,14
local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
 
if type(image) == 'string' then
if type(image) == "string" then
if not width then
width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
end
if not height then
height = GetOptionsMemberValue("imageHeight",v, options, path, appName)
end
if type(imageCoords) == 'table' then
if type(imageCoords) == "table" then
control:SetImage(image, unpack(imageCoords))
else
control:SetImage(image)
1360,7 → 1405,7
end
 
local function BuildPath(path, ...)
for i = 1, select('#',...) do
for i = 1, select("#",...) do
tinsert(path, (select(i,...)))
end
end
1488,17 → 1533,13
local grouptype, parenttype = options.childGroups, "none"
 
 
--temp path table to pass to callbacks as we traverse the tree
local temppath = new()
for i = 1, #path do
local v = path[i]
temppath[i] = v
group = GetSubOption(group, v)
inline = inline or pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
parenttype = grouptype
grouptype = group.childGroups
end
del(temppath)
 
if not parenttype then
parenttype = "tree"
1591,16 → 1632,12
status.groups = {}
end
select:SetStatusTable(status.groups)
local grouplist = BuildSelect(group, options, path, appName)
select:SetGroupList(grouplist)
local grouplist, orderlist = BuildSelect(group, options, path, appName)
select:SetGroupList(grouplist, orderlist)
select:SetUserData("grouplist", grouplist)
local firstgroup
for k, v in pairs(grouplist) do
if not firstgroup or k < firstgroup then
firstgroup = k
end
end
 
select:SetUserData("orderlist", orderlist)
 
local firstgroup = orderlist[1]
if firstgroup then
select:SetGroup((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or firstgroup)
end
1667,9 → 1704,12
 
if this.closeAll then
for k, v in pairs(AceConfigDialog.OpenFrames) do
v:Hide()
if not this.closeAllOverride[k] then
v:Hide()
end
end
this.closeAll = nil
wipe(this.closeAllOverride)
end
 
for appName in pairs(this.apps) do
1681,7 → 1721,7
for key, widget in pairs(AceConfigDialog.BlizOptions[appName]) do
local user = widget:GetUserDataTable()
if widget:IsVisible() then
AceConfigDialog:Open(widget:GetUserData('appName'), widget, unpack(user.basepath or emptyTbl))
AceConfigDialog:Open(widget:GetUserData("appName"), widget, unpack(user.basepath or emptyTbl))
end
end
end
1766,7 → 1806,7
tinsert(path, container)
container = nil
end
for n = 1, select('#',...) do
for n = 1, select("#",...) do
tinsert(path, (select(n, ...)))
end
 
1774,10 → 1814,10
if container then
f = container
f:ReleaseChildren()
f:SetUserData('appName', appName)
f:SetUserData('iscustom', true)
f:SetUserData("appName", appName)
f:SetUserData("iscustom", true)
if #path > 0 then
f:SetUserData('basepath', copy(path))
f:SetUserData("basepath", copy(path))
end
local status = AceConfigDialog:GetStatusTable(appName)
if not status.width then
1801,9 → 1841,9
end
f:ReleaseChildren()
f:SetCallback("OnClose", FrameOnClose)
f:SetUserData('appName', appName)
f:SetUserData("appName", appName)
if #path > 0 then
f:SetUserData('basepath', copy(path))
f:SetUserData("basepath", copy(path))
end
f:SetTitle(name or "")
local status = AceConfigDialog:GetStatusTable(appName)
1815,6 → 1855,11
f:Show()
end
del(path)
 
if AceConfigDialog.frame.closeAll then
-- close all is set, but thats not good, since we're just opening here, so force it
AceConfigDialog.frame.closeAllOverride[appName] = true
end
end
 
-- convert pre-39 BlizOptions structure to the new format
1822,7 → 1867,7
local old = AceConfigDialog.BlizOptions
local new = {}
for key, widget in pairs(old) do
local appName = widget:GetUserData('appName')
local appName = widget:GetUserData("appName")
if not new[appName] then new[appName] = {} end
new[appName][key] = widget
end
1832,12 → 1877,12
end
 
local function FeedToBlizPanel(widget, event)
local path = widget:GetUserData('path')
AceConfigDialog:Open(widget:GetUserData('appName'), widget, unpack(path or emptyTbl))
local path = widget:GetUserData("path")
AceConfigDialog:Open(widget:GetUserData("appName"), widget, unpack(path or emptyTbl))
end
 
local function ClearBlizPanel(widget, event)
local appName = widget:GetUserData('appName')
local appName = widget:GetUserData("appName")
AceConfigDialog.frame.closing[appName] = true
AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
end
1863,8 → 1908,8
local BlizOptions = AceConfigDialog.BlizOptions
 
local key = appName
for n = 1, select('#', ...) do
key = key..'\001'..select(n, ...)
for n = 1, select("#", ...) do
key = key.."\001"..select(n, ...)
end
 
if not BlizOptions[appName] then
1877,13 → 1922,13
group:SetName(name or appName, parent)
 
group:SetTitle(name or appName)
group:SetUserData('appName', appName)
if select('#', ...) > 0 then
group:SetUserData("appName", appName)
if select("#", ...) > 0 then
local path = {}
for n = 1, select('#',...) do
for n = 1, select("#",...) do
tinsert(path, (select(n, ...)))
end
group:SetUserData('path', path)
group:SetUserData("path", path)
end
group:SetCallback("OnShow", FeedToBlizPanel)
group:SetCallback("OnHide", ClearBlizPanel)
trunk/libs/AceDB-3.0/AceDB-3.0.lua
39,8 → 39,8
-- end
-- @class file
-- @name AceDB-3.0.lua
-- @release $Id: AceDB-3.0.lua 877 2009-11-02 15:56:50Z nevcairiel $
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 19
-- @release $Id: AceDB-3.0.lua 940 2010-06-19 08:01:47Z nevcairiel $
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 21
local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
 
if not AceDB then return end -- No upgrade needed
346,13 → 346,29
 
-- handle PLAYER_LOGOUT
-- strip all defaults from all databases
-- and cleans up empty sections
local function logoutHandler(frame, event)
if event == "PLAYER_LOGOUT" then
for db in pairs(AceDB.db_registry) do
db.callbacks:Fire("OnDatabaseShutdown", db)
for section, key in pairs(db.keys) do
if db.defaults and db.defaults[section] and rawget(db, section) then
removeDefaults(db[section], db.defaults[section])
db:RegisterDefaults(nil)
 
-- cleanup sections that are empty without defaults
local sv = rawget(db, "sv")
for section in pairs(db.keys) do
if rawget(sv, section) then
-- global is special, all other sections have sub-entrys
-- also don't delete empty profiles on main dbs, only on namespaces
if section ~= "global" and (section ~= "profiles" or rawget(db, "parent")) then
for key in pairs(sv[section]) do
if not next(sv[section][key]) then
sv[section][key] = nil
end
end
end
if not next(sv[section]) then
sv[section] = nil
end
end
end
end
491,11 → 507,11
error("Cannot delete the active profile in an AceDBObject.", 2)
end
 
if not rawget(self.sv.profiles, name) and not silent then
if not rawget(self.profiles, name) and not silent then
error("Cannot delete profile '" .. name .. "'. It does not exist.", 2)
end
 
self.sv.profiles[name] = nil
self.profiles[name] = nil
 
-- populate to child namespaces
if self.children then
521,7 → 537,7
error("Cannot have the same source and destination profiles.", 2)
end
 
if not rawget(self.sv.profiles, name) and not silent then
if not rawget(self.profiles, name) and not silent then
error("Cannot copy profile '" .. name .. "'. It does not exist.", 2)
end
 
529,7 → 545,7
DBObjectLib.ResetProfile(self, nil, true)
 
local profile = self.profile
local source = self.sv.profiles[name]
local source = self.profiles[name]
 
copyTable(source, profile)
 
trunk/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
1,5 → 1,5
--[[ $Id: CallbackHandler-1.0.lua 895 2009-12-06 16:28:55Z nevcairiel $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 5
--[[ $Id: CallbackHandler-1.0.lua 965 2010-08-09 00:47:52Z mikk $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 6
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
 
if not CallbackHandler then return end -- No upgrade needed
147,9 → 147,9
regfunc = function(...) self[method](self,...) end
end
else
-- function ref with self=object or self="addonId"
if type(self)~="table" and type(self)~="string" then
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string expected.", 2)
-- function ref with self=object or self="addonId" or self=thread
if type(self)~="table" and type(self)~="string" and type(self)~="thread" then
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
end
 
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
trunk/libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
1,8 → 1,8
--- AceDBOptions-3.0 provides a universal AceConfig options screen for managing AceDB-3.0 profiles.
-- @class file
-- @name AceDBOptions-3.0
-- @release $Id: AceDBOptions-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $
local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 11
-- @release $Id: AceDBOptions-3.0.lua 938 2010-06-13 07:21:38Z nevcairiel $
local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 12
local AceDBOptions, oldminor = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)
 
if not AceDBOptions then return end -- No upgrade needed
30,7 → 30,7
reset_desc = "Reset the current profile back to its default values, in case your configuration is broken, or you simply want to start over.",
reset = "Reset Profile",
reset_sub = "Reset the current profile to the default",
choose_desc = "You can either create a new profile by entering a name in the editbox, or choose one of the already exisiting profiles.",
choose_desc = "You can either create a new profile by entering a name in the editbox, or choose one of the already existing profiles.",
new = "New",
new_sub = "Create a new empty profile.",
choose = "Existing Profiles",
trunk/libs/AceEvent-3.0/AceEvent-3.0.lua
9,7 → 9,7
-- make into AceEvent.
-- @class file
-- @name AceEvent-3.0
-- @release $Id: AceEvent-3.0.lua 877 2009-11-02 15:56:50Z nevcairiel $
-- @release $Id: AceEvent-3.0.lua 975 2010-10-23 11:26:18Z nevcairiel $
local MAJOR, MINOR = "AceEvent-3.0", 3
local AceEvent = LibStub:NewLibrary(MAJOR, MINOR)
 
55,7 → 55,7
}
 
--- Register for a Blizzard Event.
-- The callback will always be called with the event as the first argument, and if supplied, the `arg` as second argument.
-- The callback will be called with the optional `arg` as the first argument (if supplied), and the event name as the second (or first, if no arg was supplied)
-- Any arguments to the event will be passed on after that.
-- @name AceEvent:RegisterEvent
-- @class function
71,7 → 71,7
-- @param event The event to unregister
 
--- Register for a custom AceEvent-internal message.
-- The callback will always be called with the event as the first argument, and if supplied, the `arg` as second argument.
-- The callback will be called with the optional `arg` as the first argument (if supplied), and the event name as the second (or first, if no arg was supplied)
-- Any arguments to the event will be passed on after that.
-- @name AceEvent:RegisterMessage
-- @class function
trunk/libs/AceGUI-3.0/AceGUI-3.0.xml
1,26 → 1,28
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="AceGUI-3.0.lua"/>
<!-- Container -->
<Script file="widgets\AceGUIContainer-BlizOptionsGroup.lua"/>
<Script file="widgets\AceGUIContainer-DropDownGroup.lua"/>
<Script file="widgets\AceGUIContainer-Frame.lua"/>
<Script file="widgets\AceGUIContainer-InlineGroup.lua"/>
<Script file="widgets\AceGUIContainer-ScrollFrame.lua"/>
<Script file="widgets\AceGUIContainer-SimpleGroup.lua"/>
<Script file="widgets\AceGUIContainer-TabGroup.lua"/>
<Script file="widgets\AceGUIContainer-TreeGroup.lua"/>
<Script file="widgets\AceGUIContainer-Window.lua"/>
<!-- Widgets -->
<Script file="widgets\AceGUIWidget-Button.lua"/>
<Script file="widgets\AceGUIWidget-CheckBox.lua"/>
<Script file="widgets\AceGUIWidget-ColorPicker.lua"/>
<Script file="widgets\AceGUIWidget-DropDownGroup.lua"/>
<Script file="widgets\AceGUIWidget-DropDown.lua"/>
<Script file="widgets\AceGUIWidget-DropDown-Items.lua"/>
<Script file="widgets\AceGUIWidget-EditBox.lua"/>
<Script file="widgets\AceGUIWidget-Frame.lua"/>
<Script file="widgets\AceGUIWidget-Window.lua"/>
<Script file="widgets\AceGUIWidget-Heading.lua"/>
<Script file="widgets\AceGUIWidget-InlineGroup.lua"/>
<Script file="widgets\AceGUIWidget-Keybinding.lua"/>
<Script file="widgets\AceGUIWidget-ScrollFrame.lua"/>
<Script file="widgets\AceGUIWidget-SimpleGroup.lua"/>
<Script file="widgets\AceGUIWidget-Slider.lua"/>
<Script file="widgets\AceGUIWidget-TabGroup.lua"/>
<Script file="widgets\AceGUIWidget-TreeGroup.lua"/>
<Script file="widgets\AceGUIWidget-Heading.lua"/>
<Script file="widgets\AceGUIWidget-Icon.lua"/>
<Script file="widgets\AceGUIWidget-InteractiveLabel.lua"/>
<Script file="widgets\AceGUIWidget-Keybinding.lua"/>
<Script file="widgets\AceGUIWidget-Label.lua"/>
<Script file="widgets\AceGUIWidget-MultiLineEditBox.lua"/>
<Script file="widgets\AceGUIWidget-BlizOptionsGroup.lua"/>
<Script file="widgets\AceGUIWidget-InteractiveLabel.lua"/>
<Script file="widgets\AceGUIWidget-Icon.lua"/>
</Ui>
\ No newline at end of file +