956383a - Update all libraries
authorAleksi Blinnikka <aleksi.blinnikka@gmail.com>
Thu, 28 Dec 2017 21:48:57 +0000
committerAleksi Blinnikka <aleksi.blinnikka@gmail.com>
Thu, 28 Dec 2017 21:48:57 +0000
39 files changed:
libs/AceAddon-3.0/AceAddon-3.0.xml
libs/AceConfig-3.0/AceConfig-3.0.lua
libs/AceConfig-3.0/AceConfig-3.0.xml
libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml
libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml
libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml
libs/AceConsole-3.0/AceConsole-3.0.lua
libs/AceConsole-3.0/AceConsole-3.0.xml
libs/AceDB-3.0/AceDB-3.0.lua
libs/AceDB-3.0/AceDB-3.0.xml
libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
libs/AceDBOptions-3.0/AceDBOptions-3.0.xml
libs/AceGUI-3.0-SharedMediaWidgets/widget.xml
libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
libs/AceTimer-3.0/AceTimer-3.0.lua
libs/AceTimer-3.0/AceTimer-3.0.xml
libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
libs/LibSharedMedia-3.0/lib.xml
libs/LibStub/LibStub.lua
libs/LibStub/LibStub.toc

index e6ad639..dcf24c7 100644 (file)
@@ -1,4 +1,4 @@
 <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="AceAddon-3.0.lua"/>
-</Ui>
\ No newline at end of file
+</Ui>
index 3bedf8c..a99ddf7 100644 (file)
@@ -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 969 2010-10-07 02:11:48Z shefki $
+-- @release $Id: AceConfig-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
 
 --[[
 AceConfig-3.0
@@ -12,13 +12,14 @@ Very light wrapper library that combines all the AceConfig subcomponents into on
 
 ]]
 
-local MAJOR, MINOR = "AceConfig-3.0", 2
+local cfgreg = LibStub("AceConfigRegistry-3.0")
+local cfgcmd = LibStub("AceConfigCmd-3.0")
+
+local MAJOR, MINOR = "AceConfig-3.0", 3
 local AceConfig = LibStub:NewLibrary(MAJOR, MINOR)
 
 if not AceConfig then return end
 
-local cfgreg = LibStub("AceConfigRegistry-3.0")
-local cfgcmd = LibStub("AceConfigCmd-3.0")
 --TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true)
 --TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true)
 
index 87972ad..a3569b7 100644 (file)
@@ -5,4 +5,4 @@
        <Include file="AceConfigDialog-3.0\AceConfigDialog-3.0.xml"/>
        <!--<Include file="AceConfigDropdown-3.0\AceConfigDropdown-3.0.xml"/>-->
        <Script file="AceConfig-3.0.lua"/>
-</Ui>
\ No newline at end of file
+</Ui>
index 2023981..33f9fe1 100644 (file)
@@ -1,7 +1,7 @@
 --- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames.
 -- @class file
 -- @name AceConfigCmd-3.0
--- @release $Id: AceConfigCmd-3.0.lua 1045 2011-12-09 17:58:40Z nevcairiel $
+-- @release $Id: AceConfigCmd-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
 
 --[[
 AceConfigCmd-3.0
@@ -14,8 +14,9 @@ REQUIRES: AceConsole-3.0 for command registration (loaded on demand)
 
 -- TODO: plugin args
 
+local cfgreg = LibStub("AceConfigRegistry-3.0")
 
-local MAJOR, MINOR = "AceConfigCmd-3.0", 13
+local MAJOR, MINOR = "AceConfigCmd-3.0", 14
 local AceConfigCmd = LibStub:NewLibrary(MAJOR, MINOR)
 
 if not AceConfigCmd then return end
@@ -23,7 +24,6 @@ if not AceConfigCmd then return end
 AceConfigCmd.commands = AceConfigCmd.commands or {}
 local commands = AceConfigCmd.commands
 
-local cfgreg = LibStub("AceConfigRegistry-3.0")
 local AceConsole -- LoD
 local AceConsoleName = "AceConsole-3.0"
 
index 188d354..9e157b5 100644 (file)
@@ -1,4 +1,4 @@
 <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="AceConfigCmd-3.0.lua"/>
-</Ui>
\ No newline at end of file
+</Ui>
index 1c28821..f2d5266 100644 (file)
@@ -1,10 +1,13 @@
 --- 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 1089 2013-09-13 14:32:35Z nevcairiel $
+-- @release $Id: AceConfigDialog-3.0.lua 1163 2017-08-14 14:04:39Z nevcairiel $
 
 local LibStub = LibStub
-local MAJOR, MINOR = "AceConfigDialog-3.0", 58
+local gui = LibStub("AceGUI-3.0")
+local reg = LibStub("AceConfigRegistry-3.0")
+
+local MAJOR, MINOR = "AceConfigDialog-3.0", 64
 local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
 if not AceConfigDialog then return end
@@ -17,9 +20,6 @@ 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")
-
 -- Lua APIs
 local tconcat, tinsert, tsort, tremove, tsort = table.concat, table.insert, table.sort, table.remove, table.sort
 local strmatch, format = string.match, string.format
@@ -542,16 +542,16 @@ local function OptionOnMouseOver(widget, event)
        
        if descStyle and descStyle ~= "tooltip" then return end
        
-       GameTooltip:SetText(name, 1, .82, 0, 1)
+       GameTooltip:SetText(name, 1, .82, 0, true)
        
        if opt.type == "multiselect" then
-               GameTooltip:AddLine(user.text,0.5, 0.5, 0.8, 1)
+               GameTooltip:AddLine(user.text, 0.5, 0.5, 0.8, true)
        end     
        if type(desc) == "string" then
-               GameTooltip:AddLine(desc, 1, 1, 1, 1)
+               GameTooltip:AddLine(desc, 1, 1, 1, true)
        end
        if type(usage) == "string" then
-               GameTooltip:AddLine("Usage: "..usage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1)
+               GameTooltip:AddLine("Usage: "..usage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true)
        end
 
        GameTooltip:Show()
@@ -611,6 +611,31 @@ local function confirmPopup(appName, rootframe, basepath, info, message, func, .
        end
 end
 
+local function validationErrorPopup(message)
+       if not StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] then
+               StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] = {}
+       end
+       local t = StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"]
+       t.text = message
+       t.button1 = OKAY
+       t.preferredIndex = STATICPOPUP_NUMDIALOGS
+       local dialog, oldstrata
+       t.OnAccept = function()
+               if dialog and oldstrata then
+                       dialog:SetFrameStrata(oldstrata)
+               end
+       end
+       t.timeout = 0
+       t.whileDead = 1
+       t.hideOnEscape = 1
+
+       dialog = StaticPopup_Show("ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG")
+       if dialog then
+               oldstrata = dialog:GetFrameStrata()
+               dialog:SetFrameStrata("TOOLTIP")
+       end
+end
+
 local function ActivateControl(widget, event, ...)
        --This function will call the set / execute handler for the widget
        --widget:GetUserDataTable() contains the needed info
@@ -696,32 +721,26 @@ local function ActivateControl(widget, event, ...)
        end
        
        local rootframe = user.rootframe
-       if type(validated) == "string" then
-               --validate function returned a message to display
-               if rootframe.SetStatusText then
-                       rootframe:SetStatusText(validated)
-               else
-                       -- TODO: do something else.
-               end
-               PlaySound("igPlayerInviteDecline")
-               del(info)
-               return true
-       elseif not validated then
-               --validate returned false       
-               if rootframe.SetStatusText then
+       if not validated or type(validated) == "string" then
+               if not validated then
                        if usage then
-                               rootframe:SetStatusText(name..": "..usage)
+                               validated = name..": "..usage
                        else
                                if pattern then
-                                       rootframe:SetStatusText(name..": Expected "..pattern)
+                                       validated = name..": Expected "..pattern
                                else
-                                       rootframe:SetStatusText(name..": Invalid Value")
+                                       validated = name..": Invalid Value"
                                end
                        end
+               end
+
+               -- show validate message
+               if rootframe.SetStatusText then
+                       rootframe:SetStatusText(validated)
                else
-                       -- TODO: do something else
+                       validationErrorPopup(validated)
                end
-               PlaySound("igPlayerInviteDecline")
+               PlaySound(PlaySoundKitID and "igPlayerInviteDecline" or 882) -- SOUNDKIT.IG_PLAYER_INVITE_DECLINE || XXX _DECLINE is actually missing from the table
                del(info)
                return true
        else
@@ -1092,7 +1111,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
                                        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" or type(image) == "number" then
                                                control = gui:Create("Icon")
                                                if not width then
                                                        width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
@@ -1154,7 +1173,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
                                        local image = GetOptionsMemberValue("image", v, options, path, appName)
                                        local imageCoords = GetOptionsMemberValue("imageCoords", v, options, path, appName)
                                        
-                                       if type(image) == "string" then
+                                       if type(image) == "string" or type(image) == "number" then
                                                if type(imageCoords) == "table" then
                                                        control:SetImage(image, unpack(imageCoords))
                                                else
@@ -1354,7 +1373,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
                                        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" or type(image) == "number" then
                                                if not width then
                                                        width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
                                                end
@@ -1448,10 +1467,10 @@ local function TreeOnButtonEnter(widget, event, uniquevalue, button)
                GameTooltip:SetPoint("LEFT",button,"RIGHT")
        end
 
-       GameTooltip:SetText(name, 1, .82, 0, 1)
+       GameTooltip:SetText(name, 1, .82, 0, true)
        
        if type(desc) == "string" then
-               GameTooltip:AddLine(desc, 1, 1, 1, 1)
+               GameTooltip:AddLine(desc, 1, 1, 1, true)
        end
        
        GameTooltip:Show()
@@ -1817,6 +1836,14 @@ function AceConfigDialog:Open(appName, container, ...)
                tinsert(path, (select(n, ...)))
        end
        
+       local option = options
+       if type(container) == "table" and container.type == "BlizOptionsGroup" and #path > 0 then
+               for i = 1, #path do
+                       option = options.args[path[i]]
+               end
+               name = format("%s - %s", name, GetOptionsMemberValue("name", option, options, path, appName))
+       end
+       
        --if a container is given feed into that
        if container then
                f = container
index 86ce057..8e1e606 100644 (file)
@@ -1,4 +1,4 @@
 <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="AceConfigDialog-3.0.lua"/>
-</Ui>
\ No newline at end of file
+</Ui>
index d684d66..b84e770 100644 (file)
@@ -8,16 +8,16 @@
 -- :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 1105 2013-12-08 22:11:58Z nevcairiel $
-local MAJOR, MINOR = "AceConfigRegistry-3.0", 15
+-- @release $Id: AceConfigRegistry-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
+local CallbackHandler = LibStub("CallbackHandler-1.0")
+
+local MAJOR, MINOR = "AceConfigRegistry-3.0", 17
 local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
 
 if not AceConfigRegistry then return end
 
 AceConfigRegistry.tables = AceConfigRegistry.tables or {}
 
-local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
-
 if not AceConfigRegistry.callbacks then
        AceConfigRegistry.callbacks = CallbackHandler:New(AceConfigRegistry)
 end
@@ -57,6 +57,7 @@ local istable={["table"]=true,   _="table"}
 local ismethodtable={["table"]=true,["string"]=true,["function"]=true,   _="methodname, funcref or table"}
 local optstring={["nil"]=true,["string"]=true, _="string"}
 local optstringfunc={["nil"]=true,["string"]=true,["function"]=true, _="string or funcref"}
+local optstringnumberfunc={["nil"]=true,["string"]=true,["number"]=true,["function"]=true, _="string, number or funcref"}
 local optnumber={["nil"]=true,["number"]=true, _="number"}
 local optmethod={["nil"]=true,["string"]=true,["function"]=true, _="methodname or funcref"}
 local optmethodfalse={["nil"]=true,["string"]=true,["function"]=true,["boolean"]={[false]=true},  _="methodname, funcref or false"}
@@ -82,7 +83,7 @@ local basekeys={
                dialogHidden=optmethodbool,
                dropdownHidden=optmethodbool,
        cmdHidden=optmethodbool,
-       icon=optstringfunc,
+       icon=optstringnumberfunc,
        iconCoords=optmethodtable,
        handler=opttable,
        get=optmethodfalse,
@@ -95,7 +96,7 @@ local basekeys={
 local typedkeys={
        header={},
        description={
-               image=optstringfunc,
+               image=optstringnumberfunc,
                imageCoords=optmethodtable,
                imageHeight=optnumber,
                imageWidth=optnumber,
@@ -112,7 +113,7 @@ local typedkeys={
                childGroups=optstring,
        },
        execute={
-               image=optstringfunc,
+               image=optstringnumberfunc,
                imageCoords=optmethodtable,
                imageHeight=optnumber,
                imageWidth=optnumber,
@@ -127,7 +128,7 @@ local typedkeys={
        },
        toggle={
                tristate=optbool,
-               image=optstringfunc,
+               image=optstringnumberfunc,
                imageCoords=optmethodtable,
        },
        tristate={
index 101bfda..4ea69ca 100644 (file)
@@ -1,4 +1,4 @@
 <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="AceConfigRegistry-3.0.lua"/>
-</Ui>
\ No newline at end of file
+</Ui>
index c001123..0567a65 100644 (file)
@@ -9,7 +9,7 @@
 -- make into AceConsole.
 -- @class file
 -- @name AceConsole-3.0
--- @release $Id: AceConsole-3.0.lua 878 2009-11-02 18:51:58Z nevcairiel $
+-- @release $Id: AceConsole-3.0.lua 1143 2016-07-11 08:52:03Z nevcairiel $
 local MAJOR,MINOR = "AceConsole-3.0", 7
 
 local AceConsole, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
@@ -136,7 +136,7 @@ end
 
 --- Retreive one or more space-separated arguments from a string. 
 -- Treats quoted strings and itemlinks as non-spaced.
--- @param string The raw argument string
+-- @param str The raw argument string
 -- @param numargs How many arguments to get (default 1)
 -- @param startpos Where in the string to start scanning (default  1)
 -- @return Returns arg1, arg2, ..., nextposition\\
index be9f47c..4f4699a 100644 (file)
@@ -1,4 +1,4 @@
 <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="AceConsole-3.0.lua"/>
-</Ui>
\ No newline at end of file
+</Ui>
index 7db49ba..b42b442 100644 (file)
@@ -10,6 +10,7 @@
 -- * **race** Race-specific data. All of the players characters of the same race share this database.
 -- * **faction** Faction-specific data. All of the players characters of the same faction share this database.
 -- * **factionrealm** Faction and realm specific data. All of the players characters on the same realm and of the same faction share this database.
+-- * **locale** Locale specific data, based on the locale of the players game client.
 -- * **global** Global Data. All characters on the same account share this database.
 -- * **profile** Profile-specific data. All characters using the same profile share this database. The user can control which profile should be used.
 --
@@ -39,8 +40,8 @@
 -- end
 -- @class file
 -- @name AceDB-3.0.lua
--- @release $Id: AceDB-3.0.lua 1111 2014-07-19 20:01:42Z kaelten $
-local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 24
+-- @release $Id: AceDB-3.0.lua 1142 2016-07-11 08:36:19Z nevcairiel $
+local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 26
 local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
 
 if not AceDB then return end -- No upgrade needed
@@ -262,7 +263,8 @@ local factionKey = UnitFactionGroup("player")
 local factionrealmKey = factionKey .. " - " .. realmKey
 local localeKey = GetLocale():lower()
 
-local regionKey = GetCVar("portal") == "public-test" and "PTR" or GetCVar("portal")
+local regionTable = { "US", "KR", "EU", "TW", "CN" }
+local regionKey = regionTable[GetCurrentRegion()]
 local factionrealmregionKey = factionrealmKey .. " - " .. regionKey
 
 -- Actual database initialization function
@@ -302,7 +304,7 @@ local function initdb(sv, defaults, defaultProfile, olddb, parent)
                ["factionrealm"] = factionrealmKey,
                ["factionrealmregion"] = factionrealmregionKey,
                ["profile"] = profileKey,
-        ["locale"] = localeKey,
+               ["locale"] = localeKey,
                ["global"] = true,
                ["profiles"] = true,
        }
index 46b20ba..108fc70 100644 (file)
@@ -1,4 +1,4 @@
 <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="AceDB-3.0.lua"/>
-</Ui>
\ No newline at end of file
+</Ui>
index 616f35e..5028fef 100644 (file)
@@ -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 1066 2012-09-18 14:36:49Z nevcairiel $
-local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 14
+-- @release $Id: AceDBOptions-3.0.lua 1140 2016-07-03 07:53:29Z nevcairiel $
+local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 15
 local AceDBOptions, oldminor = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)
 
 if not AceDBOptions then return end -- No upgrade needed
@@ -53,19 +53,19 @@ if LOCALE == "deDE" then
        L["choose_sub"] = "Wählt ein bereits vorhandenes Profil aus."
        L["copy"] = "Kopieren von..."
        L["copy_desc"] = "Kopiere die Einstellungen von einem vorhandenen Profil in das aktive Profil."
-       -- L["current"] = "Current Profile:"
+       L["current"] = "Aktuelles Profil:"
        L["default"] = "Standard"
        L["delete"] = "Profil löschen"
        L["delete_confirm"] = "Willst du das ausgewählte Profil wirklich löschen?"
-       L["delete_desc"] = "Lösche vorhandene oder unbenutzte Profile aus der Datenbank um Platz zu sparen und um die SavedVariables Datei 'sauber' zu halten."
+       L["delete_desc"] = "Lösche vorhandene oder unbenutzte Profile aus der Datenbank, um Platz zu sparen und die SavedVariables-Datei 'sauber' zu halten."
        L["delete_sub"] = "Löscht ein Profil aus der Datenbank."
-       L["intro"] = "Hier kannst du das aktive Datenbankprofile ändern, damit du verschiedene Einstellungen für jeden Charakter erstellen kannst, wodurch eine sehr flexible Konfiguration möglich wird."
+       L["intro"] = "Hier kannst du das aktive Datenbankprofil ändern, damit du verschiedene Einstellungen für jeden Charakter erstellen kannst, wodurch eine sehr flexible Konfiguration möglich wird."
        L["new"] = "Neu"
        L["new_sub"] = "Ein neues Profil erstellen."
        L["profiles"] = "Profile"
        L["profiles_sub"] = "Profile verwalten"
        L["reset"] = "Profil zurücksetzen"
-       L["reset_desc"] = "Setzt das momentane Profil auf Standardwerte zurück, für den Fall das mit der Konfiguration etwas schief lief oder weil du einfach neu starten willst."
+       L["reset_desc"] = "Setzt das momentane Profil auf Standardwerte zurück, für den Fall, dass mit der Konfiguration etwas schief lief oder weil du einfach neu starten willst."
        L["reset_sub"] = "Das aktuelle Profil auf Standard zurücksetzen."
 elseif LOCALE == "frFR" then
        L["choose"] = "Profils existants"
@@ -73,7 +73,7 @@ elseif LOCALE == "frFR" then
        L["choose_sub"] = "Permet de choisir un des profils déjà disponibles."
        L["copy"] = "Copier à partir de"
        L["copy_desc"] = "Copie les paramètres d'un profil déjà existant dans le profil actuellement actif."
-       -- L["current"] = "Current Profile:"
+       L["current"] = "Profil actuel :"
        L["default"] = "Défaut"
        L["delete"] = "Supprimer un profil"
        L["delete_confirm"] = "Etes-vous sûr de vouloir supprimer le profil sélectionné ?"
@@ -88,32 +88,32 @@ elseif LOCALE == "frFR" then
        L["reset_desc"] = "Réinitialise le profil actuel au cas où votre configuration est corrompue ou si vous voulez tout simplement faire table rase."
        L["reset_sub"] = "Réinitialise le profil actuel avec les paramètres par défaut."
 elseif LOCALE == "koKR" then
-       L["choose"] = "프로필 선택"
-       L["choose_desc"] = "ì\83\88ë¡\9cì\9a´ ì\9d´ë¦\84ì\9d\84 ì\9e\85ë ¥í\95\98ê±°ë\82\98, ì\9d´ë¯¸ ì\9e\88ë\8a\94 í\94\84ë¡\9cí\95\84중 하나를 선택하여 새로운 프로필을 만들 수 있습니다."
-       L["choose_sub"] = "당신이 현재 이용할수 있는 프로필을 선택합니다."
-       L["copy"] = "복사"
-       L["copy_desc"] = "현재 사용중인 프로필에, 선택한 프로필의 설정을 복사합니다."
-       -- L["current"] = "Current Profile:"
+       L["choose"] = "저장 중인 프로필"
+       L["choose_desc"] = "ì\9e\85력창ì\97\90 ì\83\88ë¡\9cì\9a´ ì\9d´ë¦\84ì\9d\84 ì\9e\85ë ¥í\95\98ê±°ë\82\98 ì \80ì\9e¥ ì¤\91ì\9d¸ í\94\84ë¡\9cí\95\84 중 하나를 선택하여 새로운 프로필을 만들 수 있습니다."
+       L["choose_sub"] = "현재 이용할 수 있는 프로필 중 하나를 선택합니다."
+       L["copy"] = "복사해오기"
+       L["copy_desc"] = "현재 사용 중인 프로필에 선택한 프로필의 설정을 복사합니다."
+       L["current"] = "현재 프로필:"
        L["default"] = "기본값"
        L["delete"] = "프로필 삭제"
-       L["delete_confirm"] = "ì \95ë§\90ë¡\9c ì\84 í\83\9dí\95\9c í\94\84ë¡\9cí\95\84ì\9d\98 ì\82­ì \9c를 ì\9b\90í\95\98ì\8b­ë\8b\88ê¹\8c?"
-       L["delete_desc"] = "데이터베이스에 사용중이거나 저장된 프로파일 삭제로 SavedVariables 파일의 정리와 공간 절약이 됩니다."
+       L["delete_confirm"] = "ì \95ë§\90ë¡\9c ì\84 í\83\9dí\95\9c í\94\84ë¡\9cí\95\84ì\9d\84 ì\82­ì \9cí\95 ê¹\8cì\9a\94?"
+       L["delete_desc"] = "저장 공간 절약과 SavedVariables 파일의 정리를 위해 데이터베이스에서 사용하지 않는 프로필을 삭제하세요."
        L["delete_sub"] = "데이터베이스의 프로필을 삭제합니다."
-       L["intro"] = "모든 캐릭터의 다양한 설정과 사용중인 데이터베이스 프로필, 어느것이던지 매우 다루기 쉽게 바꿀수 있습니다."
+       L["intro"] = "활성 데이터베이스 프로필을 변경할 수 있고, 각 캐릭터 별로 다른 설정을 할 수 있습니다."
        L["new"] = "새로운 프로필"
        L["new_sub"] = "새로운 프로필을 만듭니다."
        L["profiles"] = "프로필"
-       L["profiles_sub"] = "프로필 설정"
+       L["profiles_sub"] = "프로필 관리"
        L["reset"] = "프로필 초기화"
-       L["reset_desc"] = "단순히 다시 새롭게 구성을 원하는 경우, 현재 프로필을 기본값으로 초기화 합니다."
-       L["reset_sub"] = "현재의 프로필을 기본값으로 초기화 합니다"
+       L["reset_desc"] = "설정이 깨졌거나 처음부터 다시 설정을 원하는 경우, 현재 프로필을 기본값으로 초기화하세요."
+       L["reset_sub"] = "현재 프로필을 기본값으로 초기화합니다"
 elseif LOCALE == "esES" or LOCALE == "esMX" then
        L["choose"] = "Perfiles existentes"
        L["choose_desc"] = "Puedes crear un nuevo perfil introduciendo un nombre en el recuadro o puedes seleccionar un perfil de los ya existentes."
        L["choose_sub"] = "Selecciona uno de los perfiles disponibles."
        L["copy"] = "Copiar de"
        L["copy_desc"] = "Copia los ajustes de un perfil existente al perfil actual."
-       -- L["current"] = "Current Profile:"
+       L["current"] = "Perfil actual:"
        L["default"] = "Por defecto"
        L["delete"] = "Borrar un Perfil"
        L["delete_confirm"] = "¿Estas seguro que quieres borrar el perfil seleccionado?"
@@ -129,31 +129,31 @@ elseif LOCALE == "esES" or LOCALE == "esMX" then
        L["reset_sub"] = "Reinicar el perfil actual al de por defecto"
 elseif LOCALE == "zhTW" then
        L["choose"] = "現有的設定檔"
-       L["choose_desc"] = "你可以通過在文本框內輸入一個名字創立一個新的設定檔,也可以選擇一個已經存在的設定檔。"
-       L["choose_sub"] = "å¾\9eç\95¶å\89\8då\8f¯ç\94¨ç\9a\84設å®\9aæª\94è£\8f面選擇一個。"
+       L["choose_desc"] = "您可以在文字方塊內輸入名字以建立新的設定檔,或是選擇一個現有的設定檔使用。"
+       L["choose_sub"] = "å¾\9eç\95¶å\89\8då\8f¯ç\94¨ç\9a\84設å®\9aæª\94裡面選擇一個。"
        L["copy"] = "複製自"
-       L["copy_desc"] = "從當前某個已保存的設定檔複製到當前正使用的設定檔。"
-       -- L["current"] = "Current Profile:"
+       L["copy_desc"] = "從一個現有的設定檔,將設定複製到現在使用中的設定檔。"
+       L["current"] = "目前設定檔:"
        L["default"] = "預設"
        L["delete"] = "刪除一個設定檔"
-       L["delete_confirm"] = "確定要刪除所選擇的設定檔嗎?"
-       L["delete_desc"] = "å¾\9eè³\87æ\96\99庫è£\8få\88ªé\99¤ä¸\8då\86\8d使ç\94¨ç\9a\84設å®\9aæª\94ï¼\8c以ç¯\80ç\9c\81空é\96\93ï¼\8c並ä¸\94æ¸\85ç\90\86SavedVariablesæª\94。"
-       L["delete_sub"] = "å¾\9eè³\87æ\96\99庫è£\8f刪除一個設定檔。"
-       L["intro"] = "你可以選擇一個活動的資料設定檔,這樣你的每個角色就可以擁有不同的設定值,可以給你的插件設定帶來極大的靈活性。"
+       L["delete_confirm"] = "確定要刪除所選擇的設定檔嗎?"
+       L["delete_desc"] = "å¾\9eè³\87æ\96\99庫裡å\88ªé\99¤ä¸\8då\86\8d使ç\94¨ç\9a\84設å®\9aæª\94ï¼\8c以ç¯\80ç\9c\81空é\96\93ï¼\8c並ä¸\94æ¸\85ç\90\86 SavedVariables æª\94æ¡\88。"
+       L["delete_sub"] = "å¾\9eè³\87æ\96\99庫裡刪除一個設定檔。"
+       L["intro"] = "您可以從資料庫中選擇一個設定檔來使用,如此就可以讓每個角色使用不同的設定。"
        L["new"] = "新建"
        L["new_sub"] = "新建一個空的設定檔。"
        L["profiles"] = "設定檔"
        L["profiles_sub"] = "管理設定檔"
        L["reset"] = "重置設定檔"
-       L["reset_desc"] = "å°\87ç\95¶å\89\8dç\9a\84設å®\9aæª\94æ\81¢å¾©å\88°å®\83ç\9a\84é \90設å\80¼ï¼\8cç\94¨æ\96¼ä½ ç\9a\84設å®\9aæª\94æ\90\8då£\9eï¼\8cæ\88\96è\80\85ä½ å\8fªæ\98¯æ\83³重來的情況。"
-       L["reset_sub"] = "å°\87ç\95¶å\89\8dç\9a\84設å®\9aæª\94æ\81¢å¾©為預設值"
+       L["reset_desc"] = "å°\87ç\8f¾ç\94¨ç\9a\84設å®\9aæª\94é\87\8dç½®ç\82ºé \90設å\80¼ï¼\9bç\94¨æ\96¼è¨­å®\9aæª\94æ\90\8då£\9eï¼\8cæ\88\96è\80\85å\96®ç´\94æ\83³è¦\81重來的情況。"
+       L["reset_sub"] = "å°\87ç\9b®å\89\8dç\9a\84設å®\9aæª\94é\87\8dç½®為預設值"
 elseif LOCALE == "zhCN" then
        L["choose"] = "现有的配置文件"
        L["choose_desc"] = "你可以通过在文本框内输入一个名字创立一个新的配置文件,也可以选择一个已经存在的配置文件。"
        L["choose_sub"] = "从当前可用的配置文件里面选择一个。"
        L["copy"] = "复制自"
        L["copy_desc"] = "从当前某个已保存的配置文件复制到当前正使用的配置文件。"
-       -- L["current"] = "Current Profile:"
+       L["current"] = "当前配置文件:"
        L["default"] = "默认"
        L["delete"] = "删除一个配置文件"
        L["delete_confirm"] = "你确定要删除所选择的配置文件么?"
@@ -173,7 +173,7 @@ elseif LOCALE == "ruRU" then
        L["choose_sub"] = "Выбор одиного из уже доступных профилей"
        L["copy"] = "Скопировать из"
        L["copy_desc"] = "Скопировать настройки из выбранного профиля в активный."
-       -- L["current"] = "Current Profile:"
+       L["current"] = "Текущий профиль:"
        L["default"] = "По умолчанию"
        L["delete"] = "Удалить профиль"
        L["delete_confirm"] = "Вы уверены, что вы хотите удалить выбранный профиль?"
@@ -185,17 +185,17 @@ elseif LOCALE == "ruRU" then
        L["profiles"] = "Профили"
        L["profiles_sub"] = "Управление профилями"
        L["reset"] = "Сброс профиля"
-       L["reset_desc"] = "Ð\95Ñ\81ли Ð²Ð°Ñ\88а ÐºÐ¾Ð½Ñ\84игÑ\83Ñ\80аÑ\86ии Ð¸Ñ\81поÑ\80Ñ\87ена Ð¸Ð»Ð¸ ÐµÑ\81ли Ð²Ñ\8b Ñ\85оÑ\82иÑ\82е Ð½Ð°Ñ\81Ñ\82Ñ\80оиÑ\82Ñ\8c Ð²Ñ\81Ñ\91 Ð·Ð°Ð½Ð¾Ð²Ð¾ - Ñ\81бÑ\80оÑ\81Ñ\8cÑ\82е Ñ\82екÑ\83Ñ\89ий Ð¿Ñ\80оÑ\84илÑ\8c Ð½Ð° Ñ\81Ñ\82андаÑ\80Ñ\82нÑ\8bе Ð·Ð½Ð°Ñ\87ениÑ\8f."
+       L["reset_desc"] = "СбÑ\80оÑ\81иÑ\82Ñ\8c Ñ\82екÑ\83Ñ\89ий Ð¿Ñ\80оÑ\84илÑ\8c Ðº Ñ\81Ñ\82андаÑ\80Ñ\82нÑ\8bм Ð½Ð°Ñ\81Ñ\82Ñ\80ойкам, ÐµÑ\81ли Ð²Ð°Ñ\88а ÐºÐ¾Ð½Ñ\84игÑ\83Ñ\80аÑ\86иÑ\8f Ð¸Ñ\81поÑ\80Ñ\87ена Ð¸Ð»Ð¸ Ð²Ñ\8b Ñ\85оÑ\82иÑ\82е Ð½Ð°Ñ\81Ñ\82Ñ\80оиÑ\82Ñ\8c Ð²Ñ\81Ñ\91 Ð·Ð°Ð½Ð¾Ð²Ð¾."
        L["reset_sub"] = "Сброс текущего профиля на стандартный"
 elseif LOCALE == "itIT" then
-       L["choose"] = "Profili esistenti"
-       L["choose_desc"] = "Puoi creare un nuovo profilo digitando il nome della casella di testo, oppure scegliendone uno tra i profili gia' esistenti."
-       L["choose_sub"] = "Seleziona uno dei profili disponibili."
+       L["choose"] = "Profili Esistenti"
+       L["choose_desc"] = "Puoi creare un nuovo profilo digitando il nome della casella di testo, oppure scegliendone uno tra i profili già esistenti."
+       L["choose_sub"] = "Seleziona uno dei profili attualmente disponibili."
        L["copy"] = "Copia Da"
        L["copy_desc"] = "Copia le impostazioni da un profilo esistente, nel profilo attivo in questo momento."
        L["current"] = "Profilo Attivo:"
        L["default"] = "Standard"
-       L["delete"] = "Cancella un profilo"
+       L["delete"] = "Cancella un Profilo"
        L["delete_confirm"] = "Sei sicuro di voler cancellare il profilo selezionato?"
        L["delete_desc"] = "Cancella i profili non utilizzati dal database per risparmiare spazio e mantenere puliti i file di configurazione SavedVariables."
        L["delete_sub"] = "Cancella un profilo dal Database."
@@ -205,8 +205,28 @@ elseif LOCALE == "itIT" then
        L["profiles"] = "Profili"
        L["profiles_sub"] = "Gestisci Profili"
        L["reset"] = "Reimposta Profilo"
-       L["reset_desc"] = "Riporta il tuo profilo attivo alle sue impostazioni di default, nel caso in cui la tua configurazione si sia corrotta, o semplicemente tu voglia re-inizializzarla."
-       L["reset_sub"] = "Reimposta il profilo ai suoi valori di default."
+       L["reset_desc"] = "Riporta il tuo profilo attivo alle sue impostazioni predefinite, nel caso in cui la tua configurazione si sia corrotta, o semplicemente tu voglia re-inizializzarla."
+       L["reset_sub"] = "Reimposta il profilo ai suoi valori predefiniti."
+elseif LOCALE == "ptBR" then
+       L["choose"] = "Perfis Existentes"
+       L["choose_desc"] = "Você pode tanto criar um perfil novo tanto digitando um nome na caixa de texto, quanto escolher um dos perfis já existentes."
+       L["choose_sub"] = "Selecione um de seus perfis atualmente disponíveis."
+       L["copy"] = "Copiar De"
+       L["copy_desc"] = "Copia as definições de um perfil existente no perfil atualmente ativo."
+       L["current"] = "Perfil Autal:"
+       L["default"] = "Padrão"
+       L["delete"] = "Remover um Perfil"
+       L["delete_confirm"] = "Tem certeza que deseja remover o perfil selecionado?"
+       L["delete_desc"] = "Remove perfis existentes e inutilizados do banco de dados para economizar espaço, e limpar o arquivo SavedVariables."
+       L["delete_sub"] = "Remove um perfil do banco de dados."
+       L["intro"] = "Você pode alterar o perfil do banco de dados ativo, para que possa ter definições diferentes para cada personagem."
+       L["new"] = "Novo"
+       L["new_sub"] = "Cria um novo perfil vazio."
+       L["profiles"] = "Perfis"
+       L["profiles_sub"] = "Gerenciar Perfis"
+       L["reset"] = "Resetar Perfil"
+       L["reset_desc"] = "Reseta o perfil atual para os valores padrões, no caso de sua configuração estar quebrada, ou simplesmente se deseja começar novamente."
+       L["reset_sub"] = "Resetar o perfil atual ao padrão"
 end
 
 local defaultProfiles
index 2668fb0..51305f9 100644 (file)
@@ -1,4 +1,4 @@
 <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="AceDBOptions-3.0.lua"/>
-</Ui>
\ No newline at end of file
+</Ui>
index 15cd102..43c46a1 100644 (file)
@@ -6,4 +6,4 @@
        <Script file="StatusbarWidget.lua" />
        <Script file="BorderWidget.lua" />
        <Script file="BackgroundWidget.lua" />
-</Ui>
\ No newline at end of file
+</Ui>
index 0dae68c..020eaf6 100644 (file)
@@ -1,7 +1,7 @@
 --[[-----------------------------------------------------------------------------
 Frame Container
 -------------------------------------------------------------------------------]]
-local Type, Version = "Frame", 24
+local Type, Version = "Frame", 26
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -21,10 +21,14 @@ local CreateFrame, UIParent = CreateFrame, UIParent
 Scripts
 -------------------------------------------------------------------------------]]
 local function Button_OnClick(frame)
-       PlaySound("gsTitleOptionExit")
+       PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
        frame.obj:Hide()
 end
 
+local function Frame_OnShow(frame)
+       frame.obj:Fire("OnShow")
+end
+
 local function Frame_OnClose(frame)
        frame.obj:Fire("OnClose")
 end
@@ -186,6 +190,7 @@ local function Constructor()
        frame:SetBackdropColor(0, 0, 0, 1)
        frame:SetMinResize(400, 200)
        frame:SetToplevel(true)
+       frame:SetScript("OnShow", Frame_OnShow)
        frame:SetScript("OnHide", Frame_OnClose)
        frame:SetScript("OnMouseDown", Frame_OnMouseDown)
 
index a56e7cd..9afb54b 100644 (file)
@@ -2,7 +2,7 @@
 ScrollFrame Container
 Plain container that scrolls its content and doesn't grow in height.
 -------------------------------------------------------------------------------]]
-local Type, Version = "ScrollFrame", 23
+local Type, Version = "ScrollFrame", 24
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -176,7 +176,7 @@ local function Constructor()
 
        local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
        scrollbg:SetAllPoints(scrollbar)
-       scrollbg:SetTexture(0, 0, 0, 0.4)
+       scrollbg:SetColorTexture(0, 0, 0, 0.4)
 
        --Container Support
        local content = CreateFrame("Frame", nil, scrollframe)
index 00be129..d00470e 100644 (file)
@@ -2,7 +2,7 @@
 TabGroup Container
 Container that uses tabs on top to switch between groups.
 -------------------------------------------------------------------------------]]
-local Type, Version = "TabGroup", 35
+local Type, Version = "TabGroup", 36
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -63,7 +63,7 @@ Scripts
 -------------------------------------------------------------------------------]]
 local function Tab_OnClick(frame)
        if not (frame.selected or frame.disabled) then
-               PlaySound("igCharacterInfoTab")
+               PlaySound(PlaySoundKitID and "igCharacterInfoTab" or 841) -- SOUNDKIT.IG_CHARACTER_INFO_TAB
                frame.obj:SelectTab(frame.value)
        end
 end
index 6fbe066..617d5dc 100644 (file)
@@ -2,7 +2,7 @@
 TreeGroup Container
 Container that uses a tree control to switch between groups.
 -------------------------------------------------------------------------------]]
-local Type, Version = "TreeGroup", 36
+local Type, Version = "TreeGroup", 40
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -212,7 +212,7 @@ local function Button_OnEnter(frame)
        if self.enabletooltips then
                GameTooltip:SetOwner(frame, "ANCHOR_NONE")
                GameTooltip:SetPoint("LEFT",frame,"RIGHT")
-               GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, 1)
+               GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, true)
 
                GameTooltip:Show()
        end
@@ -295,6 +295,7 @@ local methods = {
        ["OnAcquire"] = function(self)
                self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE)
                self:EnableButtonTooltips(true)
+               self.frame:SetScript("OnUpdate", FirstFrameUpdate)
        end,
 
        ["OnRelease"] = function(self)
@@ -335,6 +336,8 @@ local methods = {
                button.toggle.button = button
                button.toggle:SetScript("OnClick",Expand_OnClick)
 
+               button.text:SetHeight(14) -- Prevents text wrapping
+
                return button
        end,
 
@@ -667,7 +670,7 @@ local function Constructor()
 
        local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
        scrollbg:SetAllPoints(scrollbar)
-       scrollbg:SetTexture(0,0,0,0.4)
+       scrollbg:SetColorTexture(0,0,0,0.4)
 
        local border = CreateFrame("Frame",nil,frame)
        border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
index bb0a2a2..6c36aca 100644 (file)
@@ -21,14 +21,18 @@ local CreateFrame, UIParent = CreateFrame, UIParent
 ]]
 do
        local Type = "Window"
-       local Version = 4
+       local Version = 6
+
+       local function frameOnShow(this)
+               this.obj:Fire("OnShow")
+       end
 
        local function frameOnClose(this)
                this.obj:Fire("OnClose")
        end
        
        local function closeOnClick(this)
-               PlaySound("gsTitleOptionExit")
+               PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
                this.obj:Hide()
        end
        
@@ -180,6 +184,7 @@ do
                frame:SetFrameStrata("FULLSCREEN_DIALOG")
                frame:SetScript("OnMouseDown", frameOnMouseDown)
                
+               frame:SetScript("OnShow",frameOnShow)
                frame:SetScript("OnHide",frameOnClose)
                frame:SetMinResize(240,240)
                frame:SetToplevel(true)
index 028e524..55b7bc8 100644 (file)
@@ -2,7 +2,7 @@
 Button Widget
 Graphical Button.
 -------------------------------------------------------------------------------]]
-local Type, Version = "Button", 23
+local Type, Version = "Button", 24
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -13,18 +13,12 @@ local pairs = pairs
 local _G = _G
 local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
 
-local wowMoP
-do
-       local _, _, _, interface = GetBuildInfo()
-       wowMoP = (interface >= 50000)
-end
-
 --[[-----------------------------------------------------------------------------
 Scripts
 -------------------------------------------------------------------------------]]
 local function Button_OnClick(frame, ...)
        AceGUI:ClearFocus()
-       PlaySound("igMainMenuOption")
+       PlaySound(PlaySoundKitID and "igMainMenuOption" or 852) -- SOUNDKIT.IG_MAINMENU_OPTION
        frame.obj:Fire("OnClick", ...)
 end
 
@@ -80,7 +74,7 @@ Constructor
 -------------------------------------------------------------------------------]]
 local function Constructor()
        local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type)
-       local frame = CreateFrame("Button", name, UIParent, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
+       local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate")
        frame:Hide()
 
        frame:EnableMouse(true)
index 8847ebc..b8426e3 100644 (file)
@@ -1,7 +1,7 @@
 --[[-----------------------------------------------------------------------------
 Checkbox Widget
 -------------------------------------------------------------------------------]]
-local Type, Version = "CheckBox", 22
+local Type, Version = "CheckBox", 23
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -60,9 +60,9 @@ local function CheckBox_OnMouseUp(frame)
                self:ToggleChecked()
 
                if self.checked then
-                       PlaySound("igMainMenuOptionCheckBoxOn")
+                       PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
                else -- for both nil and false (tristate)
-                       PlaySound("igMainMenuOptionCheckBoxOff")
+                       PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOff" or 857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
                end
 
                self:Fire("OnValueChanged", self.checked)
index f242437..05e2b57 100644 (file)
@@ -1,7 +1,7 @@
 --[[-----------------------------------------------------------------------------
 ColorPicker Widget
 -------------------------------------------------------------------------------]]
-local Type, Version = "ColorPicker", 21
+local Type, Version = "ColorPicker", 23
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -51,6 +51,7 @@ local function ColorSwatch_OnClick(frame)
        local self = frame.obj
        if not self.disabled then
                ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
+               ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10)
                ColorPickerFrame:SetClampedToScreen(true)
 
                ColorPickerFrame.func = function()
@@ -145,7 +146,7 @@ local function Constructor()
        local texture = frame:CreateTexture(nil, "BACKGROUND")
        texture:SetWidth(16)
        texture:SetHeight(16)
-       texture:SetTexture(1, 1, 1)
+       texture:SetColorTexture(1, 1, 1)
        texture:SetPoint("CENTER", colorSwatch)
        texture:Show()
 
index 1f28cb5..cb9c14c 100644 (file)
@@ -1,4 +1,4 @@
---[[ $Id: AceGUIWidget-DropDown-Items.lua 996 2010-12-01 18:34:17Z nevcairiel $ ]]--
+--[[ $Id: AceGUIWidget-DropDown-Items.lua 1161 2017-08-12 14:30:16Z funkydude $ ]]--
 
 local AceGUI = LibStub("AceGUI-3.0")
 
@@ -323,7 +323,7 @@ end
 -- Does not close the pullout on click.
 do
        local widgetType = "Dropdown-Item-Toggle"
-       local widgetVersion = 3
+       local widgetVersion = 4
        
        local function UpdateToggle(self)
                if self.value then
@@ -343,9 +343,9 @@ do
                if self.disabled then return end
                self.value = not self.value
                if self.value then
-                       PlaySound("igMainMenuOptionCheckBoxOn")
+                       PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
                else
-                       PlaySound("igMainMenuOptionCheckBoxOff")
+                       PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOff" or 857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
                end
                UpdateToggle(self)
                self:Fire("OnValueChanged", self.value)
@@ -440,7 +440,7 @@ end
 -- A single line to separate items
 do
        local widgetType = "Dropdown-Item-Separator"
-       local widgetVersion = 1
+       local widgetVersion = 2
        
        -- exported, override
        local function SetDisabled(self, disabled)
@@ -455,7 +455,7 @@ do
                
                local line = self.frame:CreateTexture(nil, "OVERLAY")
                line:SetHeight(1)
-               line:SetTexture(.5, .5, .5)
+               line:SetColorTexture(.5, .5, .5)
                line:SetPoint("LEFT", self.frame, "LEFT", 10, 0)
                line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0)
                
index 951cad7..37a365b 100644 (file)
@@ -1,4 +1,4 @@
---[[ $Id: AceGUIWidget-DropDown.lua 1101 2013-10-25 12:46:47Z nevcairiel $ ]]--
+--[[ $Id: AceGUIWidget-DropDown.lua 1161 2017-08-12 14:30:16Z funkydude $ ]]--
 local AceGUI = LibStub("AceGUI-3.0")
 
 -- Lua APIs
@@ -356,7 +356,7 @@ end
 
 do
        local widgetType = "Dropdown"
-       local widgetVersion = 29
+       local widgetVersion = 31
        
        --[[ Static data ]]--
        
@@ -381,7 +381,7 @@ do
        
        local function Dropdown_TogglePullout(this)
                local self = this.obj
-               PlaySound("igMainMenuOptionCheckBoxOn") -- missleading name, but the Blizzard code uses this sound
+               PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
                if self.open then
                        self.open = nil
                        self.pullout:Close()
@@ -494,9 +494,11 @@ do
                if disabled then
                        self.text:SetTextColor(0.5,0.5,0.5)
                        self.button:Disable()
+                       self.button_cover:Disable()
                        self.label:SetTextColor(0.5,0.5,0.5)
                else
                        self.button:Enable()
+                       self.button_cover:Enable()
                        self.label:SetTextColor(1,.82,0)
                        self.text:SetTextColor(1,1,1)
                end
@@ -704,6 +706,7 @@ do
                button:SetScript("OnClick",Dropdown_TogglePullout)
                
                local button_cover = CreateFrame("BUTTON",nil,self.frame)
+               self.button_cover = button_cover
                button_cover.obj = self
                button_cover:SetPoint("TOPLEFT",self.frame,"BOTTOMLEFT",0,25)
                button_cover:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT")
index c67902c..6594684 100644 (file)
@@ -1,7 +1,7 @@
 --[[-----------------------------------------------------------------------------
 EditBox Widget
 -------------------------------------------------------------------------------]]
-local Type, Version = "EditBox", 25
+local Type, Version = "EditBox", 27
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -73,7 +73,7 @@ local function EditBox_OnEnterPressed(frame)
        local value = frame:GetText()
        local cancel = self:Fire("OnEnterPressed", value)
        if not cancel then
-               PlaySound("igMainMenuOptionCheckBoxOn")
+               PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
                HideButton(self)
        end
 end
@@ -200,6 +200,10 @@ local methods = {
                if not self.frame:IsShown() then
                        self.frame:SetScript("OnShow", Frame_OnShowFocus)
                end
+       end,
+
+       ["HighlightText"] = function(self, from, to)
+               self.editbox:HighlightText(from, to)
        end
 }
 
index 8d01b54..561da73 100644 (file)
@@ -9,7 +9,7 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 local select, pairs, print = select, pairs, print
 
 -- WoW APIs
-local CreateFrame, UIParent, GetBuildInfo = CreateFrame, UIParent, GetBuildInfo
+local CreateFrame, UIParent = CreateFrame, UIParent
 
 --[[-----------------------------------------------------------------------------
 Scripts
@@ -131,12 +131,8 @@ local function Constructor()
        for method, func in pairs(methods) do
                widget[method] = func
        end
-       -- SetText is deprecated, but keep it around for a while. (say, to WoW 4.0)
-       if (select(4, GetBuildInfo()) < 40000) then
-               widget.SetText = widget.SetLabel
-       else
-               widget.SetText = function(self, ...) print("AceGUI-3.0-Icon: SetText is deprecated! Use SetLabel instead!"); self:SetLabel(...) end
-       end
+
+       widget.SetText = function(self, ...) print("AceGUI-3.0-Icon: SetText is deprecated! Use SetLabel instead!"); self:SetLabel(...) end
 
        return AceGUI:RegisterAsWidget(widget)
 end
index 9e06049..036efee 100644 (file)
@@ -1,7 +1,7 @@
 --[[-----------------------------------------------------------------------------
 InteractiveLabel Widget
 -------------------------------------------------------------------------------]]
-local Type, Version = "InteractiveLabel", 20
+local Type, Version = "InteractiveLabel", 21
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
index 7dccc64..ec4cead 100644 (file)
@@ -2,7 +2,7 @@
 Keybinding Widget
 Set Keybindings in the Config UI.
 -------------------------------------------------------------------------------]]
-local Type, Version = "Keybinding", 24
+local Type, Version = "Keybinding", 25
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -17,12 +17,6 @@ local CreateFrame, UIParent = CreateFrame, UIParent
 -- List them here for Mikk's FindGlobals script
 -- GLOBALS: NOT_BOUND
 
-local wowMoP
-do
-       local _, _, _, interface = GetBuildInfo()
-       wowMoP = (interface >= 50000)
-end
-
 --[[-----------------------------------------------------------------------------
 Scripts
 -------------------------------------------------------------------------------]]
@@ -40,11 +34,13 @@ local function Keybinding_OnClick(frame, button)
                local self = frame.obj
                if self.waitingForKey then
                        frame:EnableKeyboard(false)
+                       frame:EnableMouseWheel(false)
                        self.msgframe:Hide()
                        frame:UnlockHighlight()
                        self.waitingForKey = nil
                else
                        frame:EnableKeyboard(true)
+                       frame:EnableMouseWheel(true)
                        self.msgframe:Show()
                        frame:LockHighlight()
                        self.waitingForKey = true
@@ -79,6 +75,7 @@ local function Keybinding_OnKeyDown(frame, key)
                end
 
                frame:EnableKeyboard(false)
+               frame:EnableMouseWheel(false)
                self.msgframe:Hide()
                frame:UnlockHighlight()
                self.waitingForKey = nil
@@ -103,6 +100,16 @@ local function Keybinding_OnMouseDown(frame, button)
        Keybinding_OnKeyDown(frame, button)
 end
 
+local function Keybinding_OnMouseWheel(frame, direction)
+       local button
+       if direction >= 0 then
+               button = "MOUSEWHEELUP"
+       else
+               button = "MOUSEWHEELDOWN"
+       end
+       Keybinding_OnKeyDown(frame, button)
+end
+
 --[[-----------------------------------------------------------------------------
 Methods
 -------------------------------------------------------------------------------]]
@@ -115,6 +122,7 @@ local methods = {
                self.msgframe:Hide()
                self:SetDisabled(false)
                self.button:EnableKeyboard(false)
+               self.button:EnableMouseWheel(false)
        end,
 
        -- ["OnRelease"] = nil,
@@ -180,15 +188,17 @@ local function Constructor()
        local name = "AceGUI30KeybindingButton" .. AceGUI:GetNextWidgetNum(Type)
 
        local frame = CreateFrame("Frame", nil, UIParent)
-       local button = CreateFrame("Button", name, frame, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
+       local button = CreateFrame("Button", name, frame, "UIPanelButtonTemplate")
 
        button:EnableMouse(true)
+       button:EnableMouseWheel(false)
        button:RegisterForClicks("AnyDown")
        button:SetScript("OnEnter", Control_OnEnter)
        button:SetScript("OnLeave", Control_OnLeave)
        button:SetScript("OnClick", Keybinding_OnClick)
        button:SetScript("OnKeyDown", Keybinding_OnKeyDown)
        button:SetScript("OnMouseDown", Keybinding_OnMouseDown)
+       button:SetScript("OnMouseWheel", Keybinding_OnMouseWheel)
        button:SetPoint("BOTTOMLEFT")
        button:SetPoint("BOTTOMRIGHT")
        button:SetHeight(24)
index 23897d5..75817a0 100644 (file)
@@ -2,7 +2,7 @@
 Label Widget
 Displays text and optionally an icon.
 -------------------------------------------------------------------------------]]
-local Type, Version = "Label", 23
+local Type, Version = "Label", 24
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -78,6 +78,8 @@ local methods = {
                self:SetImageSize(16, 16)
                self:SetColor()
                self:SetFontObject()
+               self:SetJustifyH("LEFT")
+               self:SetJustifyV("TOP")
 
                -- reset the flag
                self.resizing = nil
@@ -134,6 +136,14 @@ local methods = {
                self.image:SetHeight(height)
                UpdateImageAnchor(self)
        end,
+
+       ["SetJustifyH"] = function(self, justifyH)
+               self.label:SetJustifyH(justifyH)
+       end,
+
+       ["SetJustifyV"] = function(self, justifyV)
+               self.label:SetJustifyV(justifyV)
+       end,
 }
 
 --[[-----------------------------------------------------------------------------
@@ -144,9 +154,6 @@ local function Constructor()
        frame:Hide()
 
        local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall")
-       label:SetJustifyH("LEFT")
-       label:SetJustifyV("TOP")
-
        local image = frame:CreateTexture(nil, "BACKGROUND")
 
        -- create widget
index a27a2fc..9af4b87 100644 (file)
@@ -1,4 +1,4 @@
-local Type, Version = "MultiLineEditBox", 27
+local Type, Version = "MultiLineEditBox", 28
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -14,12 +14,6 @@ local _G = _G
 -- List them here for Mikk's FindGlobals script
 -- GLOBALS: ACCEPT, ChatFontNormal
 
-local wowMoP
-do
-       local _, _, _, interface = GetBuildInfo()
-       wowMoP = (interface >= 50000)
-end
-
 --[[-----------------------------------------------------------------------------
 Support functions
 -------------------------------------------------------------------------------]]
@@ -251,7 +245,11 @@ local methods = {
                        self.frame:SetScript("OnShow", OnShowFocus)
                end
        end,
-       
+
+       ["HighlightText"] = function(self, from, to)
+               self.editBox:HighlightText(from, to)
+       end,
+
        ["GetCursorPosition"] = function(self)
                return self.editBox:GetCursorPosition()
        end,
@@ -285,7 +283,7 @@ local function Constructor()
        label:SetText(ACCEPT)
        label:SetHeight(10)
 
-       local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
+       local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, "UIPanelButtonTemplate")
        button:SetPoint("BOTTOMLEFT", 0, 4)
        button:SetHeight(22)
        button:SetWidth(label:GetStringWidth() + 24)
index 583f29d..5946d8d 100644 (file)
@@ -2,7 +2,7 @@
 Slider Widget
 Graphical Slider, like, for Range values.
 -------------------------------------------------------------------------------]]
-local Type, Version = "Slider", 21
+local Type, Version = "Slider", 22
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -108,7 +108,7 @@ local function EditBox_OnEnterPressed(frame)
        end
        
        if value then
-               PlaySound("igMainMenuOptionCheckBoxOn")
+               PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
                self.slider:SetValue(value)
                self:Fire("OnMouseUp", value)
        end
index 93fcf18..8ba6b3c 100644 (file)
@@ -2,8 +2,8 @@
 -- AceTimer supports one-shot timers and repeating timers. All timers are stored in an efficient
 -- data structure that allows easy dispatching and fast rescheduling. Timers can be registered
 -- or canceled at any time, even from within a running timer, without conflict or large overhead.\\
--- AceTimer is currently limited to firing timers at a frequency of 0.01s. This constant may change
--- in the future, but for now it's required as animations with lower frequencies are buggy.
+-- AceTimer is currently limited to firing timers at a frequency of 0.01s as this is what the WoW timer API
+-- restricts us to.
 --
 -- All `:Schedule` functions will return a handle to the current timer, which you will need to store if you
 -- need to cancel the timer you just registered.
 -- make into AceTimer.
 -- @class file
 -- @name AceTimer-3.0
--- @release $Id: AceTimer-3.0.lua 1079 2013-02-17 19:56:06Z funkydude $
+-- @release $Id: AceTimer-3.0.lua 1119 2014-10-14 17:23:29Z nevcairiel $
 
-local MAJOR, MINOR = "AceTimer-3.0", 16 -- Bump minor on changes
+local MAJOR, MINOR = "AceTimer-3.0", 17 -- Bump minor on changes
 local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
 if not AceTimer then return end -- No upgrade needed
-
-AceTimer.frame = AceTimer.frame or CreateFrame("Frame", "AceTimer30Frame") -- Animation parent
-AceTimer.inactiveTimers = AceTimer.inactiveTimers or {}                    -- Timer recycling storage
-AceTimer.activeTimers = AceTimer.activeTimers or {}                        -- Active timer list
+AceTimer.activeTimers = AceTimer.activeTimers or {} -- Active timer list
+local activeTimers = AceTimer.activeTimers -- Upvalue our private data
 
 -- Lua APIs
-local type, unpack, next, error, pairs, tostring, select = type, unpack, next, error, pairs, tostring, select
-
--- Upvalue our private data
-local inactiveTimers = AceTimer.inactiveTimers
-local activeTimers = AceTimer.activeTimers
-
-local function OnFinished(self)
-       local id = self.id
-       if type(self.func) == "string" then
-               -- We manually set the unpack count to prevent issues with an arg set that contains nil and ends with nil
-               -- e.g. local t = {1, 2, nil, 3, nil} print(#t) will result in 2, instead of 5. This fixes said issue.
-               self.object[self.func](self.object, unpack(self.args, 1, self.argsCount))
-       else
-               self.func(unpack(self.args, 1, self.argsCount))
-       end
-
-       -- If the id is different it means that the timer was already cancelled
-       -- and has been used to create a new timer during the OnFinished callback.
-       if not self.looping and id == self.id then
-               activeTimers[self.id] = nil
-               self.args = nil
-               inactiveTimers[self] = true
-       end
-end
+local type, unpack, next, error, select = type, unpack, next, error, select
+-- WoW APIs
+local GetTime, C_TimerAfter = GetTime, C_Timer.After
 
 local function new(self, loop, func, delay, ...)
-       local timer = next(inactiveTimers)
-       if timer then
-               inactiveTimers[timer] = nil
-       else
-               local anim = AceTimer.frame:CreateAnimationGroup()
-               timer = anim:CreateAnimation()
-               timer:SetScript("OnFinished", OnFinished)
-       end
-
-       -- Very low delays cause the animations to fail randomly.
-       -- A limited resolution of 0.01 seems reasonable.
        if delay < 0.01 then
-               delay = 0.01
+               delay = 0.01 -- Restrict to the lowest time that the C_Timer API allows us
        end
 
+       local timer = {...}
        timer.object = self
        timer.func = func
        timer.looping = loop
-       timer.args = {...}
        timer.argsCount = select("#", ...)
+       timer.delay = delay
+       timer.ends = GetTime() + delay
 
-       local anim = timer:GetParent()
-       if loop then
-               anim:SetLooping("REPEAT")
-       else
-               anim:SetLooping("NONE")
-       end
-       timer:SetDuration(delay)
+       activeTimers[timer] = timer
 
-       local id = tostring(timer.args)
-       timer.id = id
-       activeTimers[id] = timer
+       -- Create new timer closure to wrap the "timer" object
+       timer.callback = function() 
+               if not timer.cancelled then
+                       if type(timer.func) == "string" then
+                               -- We manually set the unpack count to prevent issues with an arg set that contains nil and ends with nil
+                               -- e.g. local t = {1, 2, nil, 3, nil} print(#t) will result in 2, instead of 5. This fixes said issue.
+                               timer.object[timer.func](timer.object, unpack(timer, 1, timer.argsCount))
+                       else
+                               timer.func(unpack(timer, 1, timer.argsCount))
+                       end
 
-       anim:Play()
-       return id
+                       if timer.looping and not timer.cancelled then
+                               -- Compensate delay to get a perfect average delay, even if individual times don't match up perfectly
+                               -- due to fps differences
+                               local time = GetTime()
+                               local delay = timer.delay - (time - timer.ends)
+                               -- Ensure the delay doesn't go below the threshold
+                               if delay < 0.01 then delay = 0.01 end
+                               C_TimerAfter(delay, timer.callback)
+                               timer.ends = time + delay
+                       else
+                               activeTimers[timer.handle or timer] = nil
+                       end
+               end
+       end
+
+       C_TimerAfter(delay, timer.callback)
+       return timer
 end
 
 --- Schedule a new one-shot timer.
@@ -160,15 +144,14 @@ end
 -- @param id The id of the timer, as returned by `:ScheduleTimer` or `:ScheduleRepeatingTimer`
 function AceTimer:CancelTimer(id)
        local timer = activeTimers[id]
-       if not timer then return false end
-
-       local anim = timer:GetParent()
-       anim:Stop()
 
-       activeTimers[id] = nil
-       timer.args = nil
-       inactiveTimers[timer] = true
-       return true
+       if not timer then
+               return false
+       else
+               timer.cancelled = true
+               activeTimers[id] = nil
+               return true
+       end
 end
 
 --- Cancels all timers registered to the current addon object ('self')
@@ -186,15 +169,18 @@ end
 -- @return The time left on the timer.
 function AceTimer:TimeLeft(id)
        local timer = activeTimers[id]
-       if not timer then return 0 end
-       return timer:GetDuration() - timer:GetElapsed()
+       if not timer then
+               return 0
+       else
+               return timer.ends - GetTime()
+       end
 end
 
 
 -- ---------------------------------------------------------------------
 -- Upgrading
 
--- Upgrade from old hash-bucket based timers to animation timers
+-- Upgrade from old hash-bucket based timers to C_Timer.After timers.
 if oldminor and oldminor < 10 then
        -- disable old timer logic
        AceTimer.frame:SetScript("OnUpdate", nil)
@@ -204,42 +190,58 @@ if oldminor and oldminor < 10 then
        for object,timers in pairs(AceTimer.selfs) do
                for handle,timer in pairs(timers) do
                        if type(timer) == "table" and timer.callback then
-                               local id
+                               local newTimer
                                if timer.delay then
-                                       id = AceTimer.ScheduleRepeatingTimer(timer.object, timer.callback, timer.delay, timer.arg)
+                                       newTimer = AceTimer.ScheduleRepeatingTimer(timer.object, timer.callback, timer.delay, timer.arg)
                                else
-                                       id = AceTimer.ScheduleTimer(timer.object, timer.callback, timer.when - GetTime(), timer.arg)
+                                       newTimer = AceTimer.ScheduleTimer(timer.object, timer.callback, timer.when - GetTime(), timer.arg)
                                end
-                               -- change id to the old handle
-                               local t = activeTimers[id]
-                               activeTimers[id] = nil
-                               activeTimers[handle] = t
-                               t.id = handle
+                               -- Use the old handle for old timers
+                               activeTimers[newTimer] = nil
+                               activeTimers[handle] = newTimer
+                               newTimer.handle = handle
                        end
                end
        end
        AceTimer.selfs = nil
        AceTimer.hash = nil
        AceTimer.debug = nil
-elseif oldminor and oldminor < 13 then
-       for handle, id in pairs(AceTimer.hashCompatTable) do
-               local t = activeTimers[id]
-               if t then
-                       activeTimers[id] = nil
-                       activeTimers[handle] = t
-                       t.id = handle
+elseif oldminor and oldminor < 17 then
+       -- Upgrade from old animation based timers to C_Timer.After timers.
+       AceTimer.inactiveTimers = nil
+       AceTimer.frame = nil
+       local oldTimers = AceTimer.activeTimers
+       -- Clear old timer table and update upvalue
+       AceTimer.activeTimers = {}
+       activeTimers = AceTimer.activeTimers
+       for handle, timer in pairs(oldTimers) do
+               local newTimer
+               -- Stop the old timer animation
+               local duration, elapsed = timer:GetDuration(), timer:GetElapsed()
+               timer:GetParent():Stop()
+               if timer.looping then
+                       newTimer = AceTimer.ScheduleRepeatingTimer(timer.object, timer.func, duration, unpack(timer.args, 1, timer.argsCount))
+               else
+                       newTimer = AceTimer.ScheduleTimer(timer.object, timer.func, duration - elapsed, unpack(timer.args, 1, timer.argsCount))
                end
+               -- Use the old handle for old timers
+               activeTimers[newTimer] = nil
+               activeTimers[handle] = newTimer
+               newTimer.handle = handle
        end
-       AceTimer.hashCompatTable = nil
-end
-
--- upgrade existing timers to the latest OnFinished
-for timer in pairs(inactiveTimers) do
-       timer:SetScript("OnFinished", OnFinished)
-end
 
-for _,timer in pairs(activeTimers) do
-       timer:SetScript("OnFinished", OnFinished)
+       -- Migrate transitional handles
+       if oldminor < 13 and AceTimer.hashCompatTable then
+               for handle, id in pairs(AceTimer.hashCompatTable) do
+                       local t = activeTimers[id]
+                       if t then
+                               activeTimers[id] = nil
+                               activeTimers[handle] = t
+                               t.handle = handle
+                       end
+               end
+               AceTimer.hashCompatTable = nil
+       end
 end
 
 -- ---------------------------------------------------------------------
index 38e9021..d5aee81 100644 (file)
@@ -1,4 +1,4 @@
 <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="AceTimer-3.0.lua"/>
-</Ui>
\ No newline at end of file
+</Ui>
index 675d7b0..2a64013 100644 (file)
@@ -1,4 +1,4 @@
---[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]]
+--[[ $Id: CallbackHandler-1.0.lua 18 2014-10-16 02:52:20Z mikk $ ]]
 local MAJOR, MINOR = "CallbackHandler-1.0", 6
 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
 
index 34aa874..7f2fd53 100644 (file)
@@ -1,4 +1,4 @@
 <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="LibSharedMedia-3.0.lua" />
-</Ui>
\ No newline at end of file
+</Ui>
index 0a41ac0..7e9b5cd 100644 (file)
@@ -1,13 +1,22 @@
--- LibStub is a simple versioning stub meant for use in Libraries.  http://www.wowace.com/wiki/LibStub for more info
--- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
+-- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $
+-- LibStub is a simple versioning stub meant for use in Libraries.  http://www.wowace.com/addons/libstub/ for more info
+-- LibStub is hereby placed in the Public Domain
+-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
 local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2  -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
 local LibStub = _G[LIBSTUB_MAJOR]
 
+-- Check to see is this version of the stub is obsolete
 if not LibStub or LibStub.minor < LIBSTUB_MINOR then
        LibStub = LibStub or {libs = {}, minors = {} }
        _G[LIBSTUB_MAJOR] = LibStub
        LibStub.minor = LIBSTUB_MINOR
        
+       -- LibStub:NewLibrary(major, minor)
+       -- major (string) - the major version of the library
+       -- minor (string or number ) - the minor version of the library
+       -- 
+       -- returns nil if a newer or same version of the lib is already present
+       -- returns empty library object or old library object if upgrade is needed
        function LibStub:NewLibrary(major, minor)
                assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
                minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
@@ -18,6 +27,12 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then
                return self.libs[major], oldminor
        end
        
+       -- LibStub:GetLibrary(major, [silent])
+       -- major (string) - the major version of the library
+       -- silent (boolean) - if true, library is optional, silently return nil if its not found
+       --
+       -- throws an error if the library can not be found (except silent is set)
+       -- returns the library object if found
        function LibStub:GetLibrary(major, silent)
                if not self.libs[major] and not silent then
                        error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
@@ -25,6 +40,12 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then
                return self.libs[major], self.minors[major]
        end
        
-       function LibStub:IterateLibraries() return pairs(self.libs) end
+       -- LibStub:IterateLibraries()
+       -- 
+       -- Returns an iterator for the currently registered libraries
+       function LibStub:IterateLibraries() 
+               return pairs(self.libs) 
+       end
+       
        setmetatable(LibStub, { __call = LibStub.GetLibrary })
 end
index 17cf732..23e7bae 100644 (file)
@@ -1,11 +1,11 @@
-## Interface: 20400
+## Interface: 70000
 ## Title: Lib: LibStub
 ## Notes: Universal Library Stub
 ## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
-## X-Website: http://jira.wowace.com/browse/LS
+## X-Website: http://www.wowace.com/addons/libstub/
 ## X-Category: Library
-## X-License: Public Domain    
-## X-Curse-Packaged-Version: 1.0
+## X-License: Public Domain
+## X-Curse-Packaged-Version: 1.0.2-70000
 ## X-Curse-Project-Name: LibStub
 ## X-Curse-Project-ID: libstub
 ## X-Curse-Repository-ID: wow/libstub/mainline