WoWInterface SVN RecipeRadar

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 16 to Rev 15
    Reverse comparison

Rev 16 → Rev 15

trunk/RecipeRadar/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2,14 → 2,14
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 34
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
 
-- Lua APIs
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
local math_min, math_max, floor = math.min, math.max, floor
local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
local select, tremove, unpack = select, table.remove, unpack
 
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
385,7 → 385,7
end
end,
 
["RefreshTree"] = function(self,scrollToSelection)
["RefreshTree"] = function(self)
local buttons = self.buttons
local lines = self.lines
 
407,8 → 407,6
local tree = self.tree
 
local treeframe = self.treeframe
 
status.scrollToSelection = status.scrollToSelection or scrollToSelection -- needs to be cached in case the control hasn't been drawn yet (code bails out below)
 
self:BuildLevel(tree, 1)
 
418,9 → 416,6
if maxlines <= 0 then return end
 
local first, last
 
scrollToSelection = status.scrollToSelection
status.scrollToSelection = nil
 
if numlines <= maxlines then
--the whole tree fits in the frame
436,33 → 431,11
if numlines - status.scrollvalue < maxlines then
status.scrollvalue = numlines - maxlines
end
self.noupdate = nil
first, last = status.scrollvalue+1, status.scrollvalue + maxlines
--show selection?
if scrollToSelection and status.selected then
local show
for i,line in ipairs(lines) do -- find the line number
if line.uniquevalue==status.selected then
show=i
end
end
if not show then
-- selection was deleted or something?
elseif show>=first and show<=last then
-- all good
else
-- scrolling needed!
if show<first then
status.scrollvalue = show-1
else
status.scrollvalue = show-maxlines
end
first, last = status.scrollvalue+1, status.scrollvalue + maxlines
end
end
if self.scrollbar:GetValue() ~= status.scrollvalue then
self.scrollbar:SetValue(status.scrollvalue)
end
self.noupdate = nil
first, last = status.scrollvalue+1, status.scrollvalue + maxlines
end
 
local buttonnum = 1
494,7 → 467,6
button:Show()
buttonnum = buttonnum + 1
end
 
end,
 
["SetSelected"] = function(self, value)
509,12 → 481,11
self.filter = false
local status = self.status or self.localstatus
local groups = status.groups
local path = {...}
for i = 1, #path do
groups[tconcat(path, "\001", 1, i)] = true
for i = 1, select('#', ...) do
groups[BuildUniqueValue(select(i, ...))] = true
end
status.selected = uniquevalue
self:RefreshTree(true)
self:RefreshTree()
self:Fire("OnGroupSelected", uniquevalue)
end,
 
trunk/RecipeRadar/libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
61,7 → 61,6
 
local function OnEditFocusLost(self) -- EditBox
self:HighlightText(0, 0)
self.obj:Fire("OnEditFocusLost")
end
 
local function OnEnter(self) -- EditBox / ScrollFrame
133,9 → 132,8
frame:SetScript("OnShow", nil)
end
 
local function OnEditFocusGained(frame)
local function OnFocusGained(frame)
AceGUI:SetFocus(frame.obj)
frame.obj:Fire("OnEditFocusGained")
end
 
--[[-----------------------------------------------------------------------------
227,17 → 225,7
if not self.frame:IsShown() then
self.frame:SetScript("OnShow", OnShowFocus)
end
end,
 
["GetCursorPosition"] = function(self)
return self.editBox:GetCursorPosition()
end,
 
["SetCursorPosition"] = function(self, ...)
return self.editBox:SetCursorPosition(...)
end,
 
 
end
}
 
--[[-----------------------------------------------------------------------------
317,7 → 305,7
editBox:SetScript("OnReceiveDrag", OnReceiveDrag)
editBox:SetScript("OnTextChanged", OnTextChanged)
editBox:SetScript("OnTextSet", OnTextSet)
editBox:SetScript("OnEditFocusGained", OnEditFocusGained)
editBox:SetScript("OnEditFocusGained", OnFocusGained)
 
 
scrollFrame:SetScrollChild(editBox)
trunk/RecipeRadar/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", 34
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
 
47,7 → 47,7
frame:_SetText(text)
local width = frame.obj.frame.width or frame.obj.frame:GetWidth() or 0
if wow_406 then
PanelTemplates_TabResize(frame, 0, nil, nil, width, frame:GetFontString():GetStringWidth())
PanelTemplates_TabResize(frame, 0, nil, nil, width)
else
PanelTemplates_TabResize(frame, 0, nil, width)
end
268,7 → 268,7
 
for i = starttab, endtab do
if wow_406 then
PanelTemplates_TabResize(tabs[i], padding + 4, nil, nil, width, tabs[i]:GetFontString():GetStringWidth())
PanelTemplates_TabResize(tabs[i], padding + 4, nil, nil, width)
else
PanelTemplates_TabResize(tabs[i], padding + 4, nil, width)
end
trunk/RecipeRadar/libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
Frame Container
-------------------------------------------------------------------------------]]
local Type, Version = "Frame", 23
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
 
127,13 → 127,6
self.frame:Show()
end,
 
["EnableResize"] = function(self, state)
local func = state and "Show" or "Hide"
self.sizer_se[func](self.sizer_se)
self.sizer_s[func](self.sizer_s)
self.sizer_e[func](self.sizer_e)
end,
 
-- called to set an external table to store status in
["SetStatusTable"] = function(self, status)
assert(type(status) == "table")
292,9 → 285,6
titletext = titletext,
statustext = statustext,
titlebg = titlebg,
sizer_se = sizer_se,
sizer_s = sizer_s,
sizer_e = sizer_e,
content = content,
frame = frame,
type = Type
trunk/RecipeRadar/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 1029 2011-06-10 23:10:58Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 997 2010-12-01 18:36:28Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
356,7 → 356,7
 
do
local widgetType = "Dropdown"
local widgetVersion = 25
local widgetVersion = 24
 
--[[ Static data ]]--
 
460,7 → 460,6
 
self:SetHeight(44)
self:SetWidth(200)
self:SetLabel()
end
 
-- exported, AceGUI callback
472,6 → 471,7
self.pullout = nil
 
self:SetText("")
self:SetLabel("")
self:SetDisabled(false)
self:SetMultiselect(false)
 
516,14 → 516,12
self.label:SetText(text)
self.label:Show()
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-18)
self:SetHeight(44)
self.alignoffset = 30
self.frame:SetHeight(44)
else
self.label:SetText("")
self.label:Hide()
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,0)
self:SetHeight(26)
self.alignoffset = 12
self.frame:SetHeight(26)
end
end
 
667,8 → 665,10
self.SetItemValue = SetItemValue
self.SetItemDisabled = SetItemDisabled
 
self.alignoffset = 30
self.alignoffset = 31
 
frame:SetHeight(44)
frame:SetWidth(200)
frame:SetScript("OnHide",Dropdown_OnHide)
 
dropdown:ClearAllPoints()
trunk/RecipeRadar/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 1035 2011-07-09 03:20:13Z kaelten $
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 22
-- @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
260,9 → 260,6
local _, raceKey = UnitRace("player")
local factionKey = UnitFactionGroup("player")
local factionrealmKey = factionKey .. " - " .. realmKey
local factionrealmregionKey = factionrealmKey .. " - " .. string.sub(GetCVar("realmList"), 1, 2):upper()
local localeKey = GetLocale():lower()
 
-- Actual database initialization function
local function initdb(sv, defaults, defaultProfile, olddb, parent)
-- Generate the database keys for each section
298,9 → 295,7
["race"] = raceKey,
["faction"] = factionKey,
["factionrealm"] = factionrealmKey,
["factionrealmregion"] = factionrealmregionKey,
["profile"] = profileKey,
["locale"] = localeKey,
["global"] = true,
["profiles"] = true,
}
357,7 → 352,7
for db in pairs(AceDB.db_registry) do
db.callbacks:Fire("OnDatabaseShutdown", db)
db:RegisterDefaults(nil)
 
 
-- cleanup sections that are empty without defaults
local sv = rawget(db, "sv")
for section in pairs(db.keys) do
trunk/RecipeRadar/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 1035 2011-07-09 03:20:13Z kaelten $
local MAJOR,MINOR = "AceLocale-3.0", 6
-- @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)
 
10,7 → 10,7
 
-- Lua APIs
local assert, tostring, error = assert, tostring, error
local getmetatable, setmetatable, rawset, rawget = getmetatable, setmetatable, rawset, rawget
local setmetatable, rawset, rawget = setmetatable, rawset, rawget
 
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
56,10 → 56,10
__index = assertfalse
})
 
-- This metatable proxy is used when registering the default locale.
-- This metatable proxy is used when registering the default locale.
-- It refuses to overwrite existing values
-- Reason 1: Allows loading locales in any order
-- Reason 2: If 2 modules have the same string, but only the first one to be
-- Reason 2: If 2 modules have the same string, but only the first one to be
-- loaded has a translation for the current locale, the translation
-- doesn't get overwritten.
--
91,16 → 91,16
-- L["string1"] = "Zeichenkette1"
-- @return Locale Table to add localizations to, or nil if the current locale is not required.
function AceLocale:NewLocale(application, locale, isDefault, silent)
 
 
-- GAME_LOCALE allows translators to test translations of addons without having that wow client installed
local gameLocale = GAME_LOCALE or gameLocale
 
local app = AceLocale.apps[application]
 
if silent and app and getmetatable(app) ~= readmetasilent then
 
if silent and app then
geterrorhandler()("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' must be specified for the first locale registered")
end
 
 
if not app then
if silent=="raw" then
app = {}
110,13 → 110,13
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
return writedefaultproxy
end