WoWInterface SVN Aloft

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/Ace3/Aloft/Libs
    from Rev 1659 to Rev 1719
    Reverse comparison

Rev 1659 → Rev 1719

AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
4,6 → 4,7
local select = select
 
-- WoW APIs
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
 
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
20,7 → 21,7
]]
do
local Type = "CheckBox"
local Version = 13
local Version = 16
 
local function OnAcquire(self)
self:SetValue(false)
58,6 → 59,13
local self = this.obj
if not self.disabled then
self:ToggleChecked()
 
if self.checked then
PlaySound("igMainMenuOptionCheckBoxOn")
else -- for both nil and false (tristate)
PlaySound("igMainMenuOptionCheckBoxOff")
end
 
self:Fire("OnValueChanged",self.checked)
self.text:SetPoint("LEFT",self.check,"RIGHT",0,0)
end
106,6 → 114,7
self.check:Hide()
end
end
SetDisabled(self, self.disabled)
end
 
local function SetTriState(self, enabled)
222,7 → 231,7
end
 
local function OnWidthSet(self, width)
if self.desc and self.desc:GetText() ~= "" then
if self.desc and self.desc:GetText() ~= "" and self.desc:GetText() ~= nil then
self.desc:SetWidth(width - 30)
self:SetHeight(28 + self.desc:GetHeight())
end
AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
11,7 → 11,7
--------------------------
do
local Type = "Icon"
local Version = 11
local Version = 12
 
local function OnAcquire(self)
self:SetHeight(110)
31,10 → 31,10
if text and text ~= "" then
self.label:Show()
self.label:SetText(text)
self.frame:SetHeight(self.image:GetHeight() + 25)
self:SetHeight(self.image:GetHeight() + 25)
else
self.label:Hide()
self.frame:SetHeight(self.image:GetHeight() + 10)
self:SetHeight(self.image:GetHeight() + 10)
end
end
 
60,9 → 60,9
self.image:SetHeight(height)
--self.frame:SetWidth(width + 30)
if self.label:IsShown() then
self.frame:SetHeight(height + 25)
self:SetHeight(height + 25)
else
self.frame:SetHeight(height + 10)
self:SetHeight(height + 10)
end
end
 
AceGUI-3.0/widgets/AceGUIWidget-Frame.lua
4,6 → 4,7
local pairs, assert, type = pairs, assert, type
 
-- WoW APIs
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
 
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
20,7 → 21,7
]]
do
local Type = "Frame"
local Version = 9
local Version = 11
 
local FrameBackdrop = {
bgFile="Interface\\DialogFrame\\UI-DialogBox-Background",
41,6 → 42,7
end
 
local function closeOnClick(this)
PlaySound("gsTitleOptionExit")
this.obj:Hide()
end
 
99,6 → 101,7
self.frame:SetParent(UIParent)
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
self:ApplyStatus()
self:Show()
end
 
local function OnRelease(self)
AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 877 2009-11-02 15:56:50Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 916 2010-03-15 12:24:36Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
7,6 → 7,7
local tsort = table.sort
 
-- WoW APIs
local PlaySound = PlaySound
local UIParent, CreateFrame = UIParent, CreateFrame
local _G = _G
 
355,7 → 356,7
 
do
local widgetType = "Dropdown"
local widgetVersion = 21
local widgetVersion = 22
 
--[[ Static data ]]--
 
378,6 → 379,7
 
local function Dropdown_TogglePullout(this)
local self = this.obj
PlaySound("igMainMenuOptionCheckBoxOn") -- missleading name, but the Blizzard code uses this sound
if self.open then
self.open = nil
self.pullout:Close()
AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
4,6 → 4,7
local tostring = tostring
 
-- WoW APIs
local PlaySound = PlaySound
local GetCursorInfo, ClearCursor, GetSpellName = GetCursorInfo, ClearCursor, GetSpellName
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G
13,7 → 14,7
-- GLOBALS: AceGUIEditBoxInsertLink, ChatFontNormal, OKAY
 
local Type = "EditBox"
local Version = 13
local Version = 14
 
if not AceGUIEditBoxInsertLink then
-- upgradeable hook
85,6 → 86,7
local value = this:GetText()
local cancel = self:Fire("OnEnterPressed",value)
if not cancel then
PlaySound("igMainMenuOptionCheckBoxOn")
HideButton(self)
end
end
AceGUI-3.0/widgets/AceGUIWidget-Window.lua
4,6 → 4,7
local pairs, assert, type = pairs, assert, type
 
-- WoW APIs
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
 
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
20,13 → 21,14
]]
do
local Type = "Window"
local Version = 2
local Version = 4
 
local function frameOnClose(this)
this.obj:Fire("OnClose")
end
 
local function closeOnClick(this)
PlaySound("gsTitleOptionExit")
this.obj:Hide()
end
 
90,6 → 92,7
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
self:ApplyStatus()
self:EnableResize(true)
self:Show()
end
 
local function OnRelease(self)
AceGUI-3.0/widgets/AceGUIWidget-Button.lua
2,6 → 2,7
 
-- WoW APIs
local _G = _G
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
 
--------------------------
9,7 → 10,7
--------------------------
do
local Type = "Button"
local Version = 12
local Version = 13
 
local function OnAcquire(self)
-- restore default values
24,6 → 25,7
end
 
local function Button_OnClick(this, ...)
PlaySound("igMainMenuOption")
this.obj:Fire("OnClick", ...)
AceGUI:ClearFocus()
end
AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown-Items.lua 877 2009-11-02 15:56:50Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown-Items.lua 916 2010-03-15 12:24:36Z nevcairiel $ ]]--
 
local AceGUI = LibStub("AceGUI-3.0")
 
6,6 → 6,7
local select, assert = select, assert
 
-- WoW APIs
local PlaySound = PlaySound
local CreateFrame = CreateFrame
 
local function fixlevels(parent,...)
316,7 → 317,7
-- Does not close the pullout on click.
do
local widgetType = "Dropdown-Item-Toggle"
local widgetVersion = 2
local widgetVersion = 3
 
local function UpdateToggle(self)
if self.value then
335,6 → 336,11
local self = this.obj
if self.disabled then return end
self.value = not self.value
if self.value then
PlaySound("igMainMenuOptionCheckBoxOn")
else
PlaySound("igMainMenuOptionCheckBoxOff")
end
UpdateToggle(self)
self:Fire("OnValueChanged", self.value)
end
AceGUI-3.0/widgets/AceGUIWidget-Label.lua
15,13 → 15,14
--------------------------
do
local Type = "Label"
local Version = 11
local Version = 12
 
local function OnAcquire(self)
self:SetHeight(18)
self:SetWidth(200)
self:SetText("")
self:SetImage(nil)
self:SetImageSize(16, 16)
self:SetColor()
self:SetFontObject()
end
96,6 → 97,8
local n = select('#', ...)
if n == 4 or n == 8 then
image:SetTexCoord(...)
else
image:SetTexCoord(0, 1, 0, 1)
end
else
self.imageshown = nil
AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
5,6 → 5,7
local tonumber = tonumber
 
-- WoW APIs
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
 
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
16,7 → 17,7
--------------------------
do
local Type = "Slider"
local Version = 9
local Version = 10
 
local function OnAcquire(self)
self:SetWidth(200)
160,6 → 161,7
end
 
if value then
PlaySound("igMainMenuOptionCheckBoxOn")
self:Fire("OnMouseUp",value)
end
end
AceGUI-3.0/widgets/AceGUIWidget-TabGroup.lua
4,6 → 4,7
local pairs, ipairs, assert, type = pairs, ipairs, assert, type
 
-- WoW APIs
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G
 
41,7 → 42,7
 
do
local Type = "TabGroup"
local Version = 24
local Version = 25
 
local PaneBackdrop = {
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
91,6 → 92,7
 
local function Tab_OnClick(self)
if not (self.selected or self.disabled) then
PlaySound("igCharacterInfoTab")
self.obj:SelectTab(self.value)
end
end
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 914 2010-03-08 12:09:22Z nevcairiel $
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 20
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
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 913 2010-02-13 12:16:13Z nevcairiel $
 
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 43
local MAJOR, MINOR = "AceConfigDialog-3.0", 45
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigDialog then return end
838,9 → 838,8
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)
end
value = math_max(math_min(value,max),min)
ActivateControl(widget,event,value)
end
 
971,6 → 970,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)
AceSerializer-3.0/AceSerializer-3.0.lua
10,8 → 10,8
-- make into AceSerializer.
-- @class file
-- @name AceSerializer-3.0
-- @release $Id: AceSerializer-3.0.lua 877 2009-11-02 15:56:50Z nevcairiel $
local MAJOR,MINOR = "AceSerializer-3.0", 2
-- @release $Id: AceSerializer-3.0.lua 910 2010-02-11 21:54:24Z mikk $
local MAJOR,MINOR = "AceSerializer-3.0", 3
local AceSerializer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceSerializer then return end
34,7 → 34,9
local function SerializeStringHelper(ch) -- Used by SerializeValue for strings
-- We use \126 ("~") as an escape character for all nonprints plus a few more
local n = strbyte(ch)
if n<=32 then -- nonprint + space
if n==30 then -- v3 / ticket 115: catch a nonprint that ends up being "~^" when encoded... DOH
return "\126\122"
elseif n<=32 then -- nonprint + space
return "\126"..strchar(n+64)
elseif n==94 then -- value separator
return "\126\125"
126,8 → 128,10
 
-- Deserialization functions
local function DeserializeStringHelper(escape)
if escape<"~\123" then
if escape<"~\122" then
return strchar(strbyte(escape,2,2)-64)
elseif escape=="~\122" then -- v3 / ticket 115: special case encode since 30+64=94 ("^") - OOPS.
return "\030"
elseif escape=="~\123" then
return "\127"
elseif escape=="~\124" then