WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 133 to Rev 134
    Reverse comparison

Rev 133 → Rev 134

libs/AceLocale-3.0/AceLocale-3.0.lua
1,8 → 1,8
--- **AceLocale-3.0** manages localization in addons, allowing for multiple locale to be registered with fallback to the base locale for untranslated strings.
-- @class file
-- @name AceLocale-3.0
-- @release $Id: AceLocale-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $
local MAJOR,MINOR = "AceLocale-3.0", 2
-- @release $Id: AceLocale-3.0.lua 1005 2011-01-29 14:19:43Z mikk $
local MAJOR,MINOR = "AceLocale-3.0", 5
 
local AceLocale, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
79,7 → 79,7
-- @param application Unique name of addon / module
-- @param locale Name of the locale to register, e.g. "enUS", "deDE", etc.
-- @param isDefault If this is the default locale being registered (your addon is written in this language, generally enUS)
-- @param silent If true, the locale will not issue warnings for missing keys. Can only be set on the default locale.
-- @param silent If true, the locale will not issue warnings for missing keys. Must be set on the first locale registered. If set to "raw", nils will be returned for unknown keys (no metatable used).
-- @usage
-- -- enUS.lua
-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "enUS", true)
92,28 → 92,29
-- @return Locale Table to add localizations to, or nil if the current locale is not required.
function AceLocale:NewLocale(application, locale, isDefault, silent)
 
if silent and not isDefault then
error("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' can only be specified for the default locale", 2)
end
 
-- GAME_LOCALE allows translators to test translations of addons without having that wow client installed
-- Ammo: I still think this is a bad idea, for instance an addon that checks for some ingame string will fail, just because some other addon
-- gives the user the illusion that they can run in a different locale? Ditch this whole thing or allow a setting per 'application'. I'm of the
-- opinion to remove this.
local gameLocale = GAME_LOCALE or gameLocale
 
if locale ~= gameLocale and not isDefault then
return -- nop, we don't need these translations
local app = AceLocale.apps[application]
 
if silent and app then
geterrorhandler()("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' must be specified for the first locale registered")
end
 
local app = AceLocale.apps[application]
 
if not app then
app = setmetatable({}, silent and readmetasilent or readmeta)
if silent=="raw" then
app = {}
else
app = setmetatable({}, silent and readmetasilent or readmeta)
end
AceLocale.apps[application] = app
AceLocale.appnames[app] = application
end
 
 
if locale ~= gameLocale and not isDefault then
return -- nop, we don't need these translations
end
 
registering = app -- remember globally for writeproxy and writedefaultproxy
 
if isDefault then
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
libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
2,7 → 2,7
Keybinding Widget
Set Keybindings in the Config UI.
-------------------------------------------------------------------------------]]
local Type, Version = "Keybinding", 21
local Type, Version = "Keybinding", 22
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
108,6 → 108,7
self.waitingForKey = nil
self.msgframe:Hide()
self:SetDisabled(false)
self.button:EnableKeyboard(false)
end,
 
-- ["OnRelease"] = nil,
185,6 → 186,7
button:SetPoint("BOTTOMLEFT")
button:SetPoint("BOTTOMRIGHT")
button:SetHeight(24)
button:EnableKeyboard(false)
 
local text = button:GetFontString()
text:SetPoint("LEFT", 7, 0)
libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
Icon Widget
-------------------------------------------------------------------------------]]
local Type, Version = "Icon", 20
local Type, Version = "Icon", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
87,7 → 87,7
else
self.frame:Enable()
self.label:SetTextColor(1, 1, 1)
self.image:SetVertexColor(1, 1, 1)
self.image:SetVertexColor(1, 1, 1, 1)
end
end
}
libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
Frame Container
-------------------------------------------------------------------------------]]
local Type, Version = "Frame", 21
local Type, Version = "Frame", 22
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
112,6 → 112,7
 
["SetTitle"] = function(self, title)
self.titletext:SetText(title)
self.titlebg:SetWidth((self.titletext:GetWidth() or 0) + 10)
end,
 
["SetStatusText"] = function(self, text)
283,6 → 284,7
localstatus = {},
titletext = titletext,
statustext = statustext,
titlebg = titlebg,
content = content,
frame = frame,
type = Type
libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,9 → 1,9
--[[ $Id: AceGUIWidget-DropDown.lua 916 2010-03-15 12:24:36Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 997 2010-12-01 18:36:28Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
local min, max, floor = math.min, math.max, math.floor
local select, pairs, ipairs = select, pairs, ipairs
local select, pairs, ipairs, type = select, pairs, ipairs, type
local tsort = table.sort
 
-- WoW APIs
356,7 → 356,7
 
do
local widgetType = "Dropdown"
local widgetVersion = 22
local widgetVersion = 24
 
--[[ Static data ]]--
 
560,8 → 560,12
end
end
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("Dropdown-Item-Toggle")
local function AddListItem(self, value, text, itemType)
if not itemType then itemType = "Dropdown-Item-Toggle" end
local exists = AceGUI:GetWidgetVersion(itemType)
if not exists then error(("The given item type, %q, does not exist within AceGUI-3.0"):format(tostring(itemType)), 2) end
 
local item = AceGUI:Create(itemType)
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
580,21 → 584,27
 
-- exported
local sortlist = {}
local function SetList(self, list)
local function SetList(self, list, order, itemType)
self.list = list
self.pullout:Clear()
self.hasClose = nil
if not list then return end
 
for v in pairs(list) do
sortlist[#sortlist + 1] = v
if type(order) ~= "table" then
for v in pairs(list) do
sortlist[#sortlist + 1] = v
end
tsort(sortlist)
 
for i, key in ipairs(sortlist) do
AddListItem(self, key, list[key], itemType)
sortlist[i] = nil
end
else
for i, key in ipairs(order) do
AddListItem(self, key, list[key], itemType)
end
end
tsort(sortlist)
 
for i, value in pairs(sortlist) do
AddListItem(self, value, list[value])
sortlist[i] = nil
end
if self.multiselect then
ShowMultiText(self)
AddCloseButton(self)
602,10 → 612,10
end
 
-- exported
local function AddItem(self, value, text)
local function AddItem(self, value, text, itemType)
if self.list then
self.list[value] = text
AddListItem(self, value, text)
AddListItem(self, value, text, itemType)
end
end
 
libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "EditBox", 22
local Type, Version = "EditBox", 24
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
10,7 → 10,7
 
-- WoW APIs
local PlaySound = PlaySound
local GetCursorInfo, ClearCursor, GetSpellName = GetCursorInfo, ClearCursor, GetSpellName
local GetCursorInfo, ClearCursor, GetSpellInfo = GetCursorInfo, ClearCursor, GetSpellInfo
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G
 
59,6 → 59,11
frame.obj:Fire("OnLeave")
end
 
local function Frame_OnShowFocus(frame)
frame.obj.editbox:SetFocus()
frame:SetScript("OnShow", nil)
end
 
local function EditBox_OnEscapePressed(frame)
AceGUI:ClearFocus()
end
81,10 → 86,7
self:Fire("OnEnterPressed", info)
ClearCursor()
elseif type == "spell" then
local name, rank = GetSpellName(id, info)
if rank and rank:match("%d") then
name = name.."("..rank..")"
end
local name = GetSpellInfo(id, info)
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
103,6 → 105,10
end
end
 
local function EditBox_OnFocusGained(frame)
AceGUI:SetFocus(frame.obj)
end
 
local function Button_OnClick(frame)
local editbox = frame.obj.editbox
editbox:ClearFocus()
123,7 → 129,9
self:SetMaxLetters(0)
end,
 
-- ["OnRelease"] = nil,
["OnRelease"] = function(self)
self:ClearFocus()
end,
 
["SetDisabled"] = function(self, disabled)
self.disabled = disabled
175,6 → 183,18
 
["SetMaxLetters"] = function (self, num)
self.editbox:SetMaxLetters(num or 0)
end,
 
["ClearFocus"] = function(self)
self.editbox:ClearFocus()
self.frame:SetScript("OnShow", nil)
end,
 
["SetFocus"] = function(self)
self.editbox:SetFocus()
if not self.frame:IsShown() then
self.frame:SetScript("OnShow", Frame_OnShowFocus)
end
end
}
 
196,6 → 216,7
editbox:SetScript("OnTextChanged", EditBox_OnTextChanged)
editbox:SetScript("OnReceiveDrag", EditBox_OnReceiveDrag)
editbox:SetScript("OnMouseDown", EditBox_OnReceiveDrag)
editbox:SetScript("OnEditFocusGained", EditBox_OnFocusGained)
editbox:SetTextInsets(0, 0, 3, 3)
editbox:SetMaxLetters(256)
editbox:SetPoint("BOTTOMLEFT", 6, 0)
libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
2,7 → 2,7
DropdownGroup Container
Container controlled by a dropdown on the top.
-------------------------------------------------------------------------------]]
local Type, Version = "DropdownGroup", 20
local Type, Version = "DropdownGroup", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
50,8 → 50,8
end
end,
 
["SetGroupList"] = function(self,list)
self.dropdown:SetList(list)
["SetGroupList"] = function(self,list,order)
self.dropdown:SetList(list,order)
end,
 
["SetStatusTable"] = function(self, status)
libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2,7 → 2,7
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 30
local Type, Version = "TreeGroup", 33
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
350,7 → 350,7
if not status.treewidth then
status.treewidth = DEFAULT_TREE_WIDTH
end
if not status.treesizable then
if status.treesizable == nil then
status.treesizable = DEFAULT_TREE_SIZABLE
end
self:SetTreeWidth(status.treewidth,status.treesizable)
413,6 → 413,7
local numlines = #lines
 
local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
if maxlines <= 0 then return end
 
local first, last
 
429,6 → 430,8
--check if we are scrolled down too far
if numlines - status.scrollvalue < maxlines then
status.scrollvalue = numlines - maxlines
end
if self.scrollbar:GetValue() ~= status.scrollvalue then
self.scrollbar:SetValue(status.scrollvalue)
end
self.noupdate = nil
446,13 → 449,13
button:SetParent(treeframe)
button:SetFrameLevel(treeframe:GetFrameLevel()+1)
button:ClearAllPoints()
if i == 1 then
if buttonnum == 1 then
if self.showscroll then
button:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",-22,-10)
button:SetPoint("TOPLEFT", self.treeframe, "TOPLEFT", 0, -10)
button:SetPoint("TOPRIGHT", -22, -10)
button:SetPoint("TOPLEFT", 0, -10)
else
button:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",0,-10)
button:SetPoint("TOPLEFT", self.treeframe, "TOPLEFT", 0, -10)
button:SetPoint("TOPRIGHT", 0, -10)
button:SetPoint("TOPLEFT", 0, -10)
end
else
button:SetPoint("TOPRIGHT", buttons[buttonnum-1], "BOTTOMRIGHT",0,0)
565,6 → 568,11
end
end,
 
["GetTreeWidth"] = function(self)
local status = self.status or self.localstatus
return status.treewidth or DEFAULT_TREE_WIDTH
end,
 
["LayoutFinished"] = function(self, width, height)
if self.noAutoHeight then return end
self:SetHeight((height or 0) + 20)
libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
2,7 → 2,7
Button Widget
Graphical Button.
-------------------------------------------------------------------------------]]
local Type, Version = "Button", 20
local Type, Version = "Button", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
17,9 → 17,9
Scripts
-------------------------------------------------------------------------------]]
local function Button_OnClick(frame, ...)
AceGUI:ClearFocus()
PlaySound("igMainMenuOption")
frame.obj:Fire("OnClick", ...)
AceGUI:ClearFocus()
end
 
local function Control_OnEnter(frame)
libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown-Items.lua 916 2010-03-15 12:24:36Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown-Items.lua 996 2010-12-01 18:34:17Z nevcairiel $ ]]--
 
local AceGUI = LibStub("AceGUI-3.0")
 
215,6 → 215,12
return self
end
 
-- Register a dummy LibStub library to retrieve the ItemBase, so other addons can use it.
local IBLib = LibStub:NewLibrary("AceGUI-3.0-DropDown-ItemBase", ItemBase.version)
if IBLib then
IBLib.GetItemBase = function() return ItemBase end
end
 
--[[
Template for items:
 
libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
1,4 → 1,4
local Type, Version = "MultiLineEditBox", 23
local Type, Version = "MultiLineEditBox", 25
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
6,7 → 6,7
local pairs = pairs
 
-- WoW APIs
local GetCursorInfo, GetSpellName, ClearCursor = GetCursorInfo, GetSpellName, ClearCursor
local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, ClearCursor
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G
 
88,10 → 88,7
local function OnReceiveDrag(self) -- EditBox / ScrollFrame
local type, id, info = GetCursorInfo()
if type == "spell" then
info, id = GetSpellName(id, info)
if id and id:match("%d") then
info = info .. "(" .. id .. ")"
end
info = GetSpellInfo(id, info)
elseif type ~= "item" then
return
end
130,6 → 127,15
editBox:SetHitRectInsets(0, 0, offset, editBox:GetHeight() - offset - self:GetHeight())
end
 
local function OnShowFocus(frame)
frame.obj.editBox:SetFocus()
frame:SetScript("OnShow", nil)
end
 
local function OnFocusGained(frame)
AceGUI:SetFocus(frame.obj)
end
 
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
144,7 → 150,9
self:SetMaxLetters(0)
end,
 
-- ["OnRelease"] = nil,
["OnRelease"] = function(self)
self:ClearFocus()
end,
 
["SetDisabled"] = function(self, disabled)
local editBox = self.editBox
205,6 → 213,18
self.button:Show()
end
Layout(self)
end,
 
["ClearFocus"] = function(self)
self.editBox:ClearFocus()
self.frame:SetScript("OnShow", nil)
end,
 
["SetFocus"] = function(self)
self.editBox:SetFocus()
if not self.frame:IsShown() then
self.frame:SetScript("OnShow", OnShowFocus)
end
end
}
 
285,6 → 305,8
editBox:SetScript("OnReceiveDrag", OnReceiveDrag)
editBox:SetScript("OnTextChanged", OnTextChanged)
editBox:SetScript("OnTextSet", OnTextSet)
editBox:SetScript("OnEditFocusGained", OnFocusGained)
 
 
scrollFrame:SetScrollChild(editBox)
 
libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
2,7 → 2,7
TabGroup Container
Container that uses tabs on top to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TabGroup", 30
local Type, Version = "TabGroup", 32
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
23,6 → 23,13
local rowwidths = {}
local rowends = {}
 
-- Determine if we're on WoW 4.0.6 or not.
local wow_406
do
local _,wow_build = GetBuildInfo()
wow_406 = tonumber(wow_build) >= 13596
end
 
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
39,7 → 46,11
local function Tab_SetText(frame, text)
frame:_SetText(text)
local width = frame.obj.frame.width or frame.obj.frame:GetWidth() or 0
PanelTemplates_TabResize(frame, 0, nil, width)
if wow_406 then
PanelTemplates_TabResize(frame, 0, nil, nil, width)
else
PanelTemplates_TabResize(frame, 0, nil, width)
end
end
 
local function Tab_SetSelected(frame, selected)
248,13 → 259,19
 
-- equal padding for each tab to fill the available width,
-- if the used space is above 75% already
-- the 18 pixel is the typical width of a scrollbar, so we can have a tab group inside a scrolling frame,
-- and not have the tabs jump around funny when switching between tabs that need scrolling and those that don't
local padding = 0
if not (numrows == 1 and rowwidths[1] < width*0.75) then
if not (numrows == 1 and rowwidths[1] < width*0.75 - 18) then
padding = (width - rowwidths[row]) / (endtab - starttab+1)
end
 
for i = starttab, endtab do
PanelTemplates_TabResize(tabs[i], padding + 4, nil, width)
if wow_406 then
PanelTemplates_TabResize(tabs[i], padding + 4, nil, nil, width)
else
PanelTemplates_TabResize(tabs[i], padding + 4, nil, width)
end
end
starttab = endtab + 1
end
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
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 967 2010-09-25 08:20:55Z nevcairiel $
-- @release $Id: AceConfigDialog-3.0.lua 998 2010-12-01 18:39:53Z nevcairiel $
 
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 50
local MAJOR, MINOR = "AceConfigDialog-3.0", 54
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigDialog then return end
125,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()
424,6 → 422,9
if user.grouplist then
del(user.grouplist)
end
if user.orderlist then
del(user.orderlist)
end
end
end
 
933,6 → 934,7
]]
local function BuildSelect(group, options, path, appName)
local groups = new()
local order = new()
local keySort = new()
local opts = new()
 
947,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)
1172,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)
1589,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
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 921 2010-05-09 15:49:14Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 12
-- @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
151,6 → 151,7
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
itemControl=optstring,
},
multiselect={
values=ismethodtable,