· 7 years ago · Oct 31, 2018, 11:36 AM
1diff --git Ace3.lua Ace3.lua
2index 2fa8c09..3461a23 100644
3--- Ace3.lua
4+++ Ace3.lua
5@@ -60,14 +60,14 @@ function Ace3:Open()
6 self:Print("No Configs are Registered")
7 return
8 end
9-
10+
11 if not frame then
12 frame = gui:Create("Frame")
13 frame:ReleaseChildren()
14 frame:SetTitle("Ace3 Options")
15 frame:SetLayout("FILL")
16 frame:SetCallback("OnClose", frameOnClose)
17-
18+
19 select = gui:Create("DropdownGroup")
20 select:SetGroupList(configs)
21 select:SetCallback("OnGroupSelected", ConfigSelected)
22diff --git AceAddon-3.0/AceAddon-3.0.lua AceAddon-3.0/AceAddon-3.0.lua
23index 6acb262..6009790 100644
24--- AceAddon-3.0/AceAddon-3.0.lua
25+++ AceAddon-3.0/AceAddon-3.0.lua
26@@ -6,24 +6,24 @@
27 -- * **OnEnable** which gets called during the PLAYER_LOGIN event, when most of the data provided by the game is already present.
28 -- * **OnDisable**, which is only called when your addon is manually being disabled.
29 -- @usage
30--- -- A small (but complete) addon, that doesn't do anything,
31+-- -- A small (but complete) addon, that doesn't do anything,
32 -- -- but shows usage of the callbacks.
33 -- local MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
34---
35+--
36 -- function MyAddon:OnInitialize()
37--- -- do init tasks here, like loading the Saved Variables,
38+-- -- do init tasks here, like loading the Saved Variables,
39 -- -- or setting up slash commands.
40 -- end
41---
42+--
43 -- function MyAddon:OnEnable()
44 -- -- Do more initialization here, that really enables the use of your addon.
45--- -- Register Events, Hook functions, Create Frames, Get information from
46+-- -- Register Events, Hook functions, Create Frames, Get information from
47 -- -- the game that wasn't available in OnInitialize
48 -- end
49 --
50 -- function MyAddon:OnDisable()
51 -- -- Unhook, Unregister Events, Hide frames that you created.
52--- -- You would probably only use an OnDisable if you want to
53+-- -- You would probably only use an OnDisable if you want to
54 -- -- build a "standby" mode, or be able to toggle modules on/off.
55 -- end
56 -- @class file
57@@ -75,7 +75,7 @@ end
58 local Enable, Disable, EnableModule, DisableModule, Embed, NewModule, GetModule, GetName, SetDefaultModuleState, SetDefaultModuleLibraries, SetEnabledState, SetDefaultModulePrototype
59
60 -- used in the addon metatable
61-local function addontostring( self ) return self.name end
62+local function addontostring( self ) return self.name end
63
64 -- Check if the addon is queued for initialization
65 local function queuedForInitialization(addon)
66@@ -88,14 +88,14 @@ local function queuedForInitialization(addon)
67 end
68
69 --- Create a new AceAddon-3.0 addon.
70--- Any libraries you specified will be embeded, and the addon will be scheduled for
71+-- Any libraries you specified will be embeded, and the addon will be scheduled for
72 -- its OnInitialize and OnEnable callbacks.
73 -- The final addon object, with all libraries embeded, will be returned.
74 -- @paramsig [object ,]name[, lib, ...]
75 -- @param object Table to use as a base for the addon (optional)
76 -- @param name Name of the addon object to create
77 -- @param lib List of libraries to embed into the addon
78--- @usage
79+-- @usage
80 -- -- Create a simple addon object
81 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceEvent-3.0")
82 --
83@@ -115,10 +115,10 @@ function AceAddon:NewAddon(objectorname, ...)
84 if type(name)~="string" then
85 error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2)
86 end
87- if self.addons[name] then
88+ if self.addons[name] then
89 error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - Addon '%s' already exists."):format(name), 2)
90 end
91-
92+
93 object = object or {}
94 object.name = name
95
96@@ -128,7 +128,7 @@ function AceAddon:NewAddon(objectorname, ...)
97 for k, v in pairs(oldmeta) do addonmeta[k] = v end
98 end
99 addonmeta.__tostring = addontostring
100-
101+
102 setmetatable( object, addonmeta )
103 self.addons[name] = object
104 object.modules = {}
105@@ -136,7 +136,7 @@ function AceAddon:NewAddon(objectorname, ...)
106 object.defaultModuleLibraries = {}
107 Embed( object ) -- embed NewModule, GetModule methods
108 self:EmbedLibraries(object, select(i,...))
109-
110+
111 -- add to queue of addons to be initialized upon ADDON_LOADED
112 tinsert(self.initializequeue, object)
113 return object
114@@ -147,7 +147,7 @@ end
115 -- Throws an error if the addon object cannot be found (except if silent is set).
116 -- @param name unique name of the addon object
117 -- @param silent if true, the addon is optional, silently return nil if its not found
118--- @usage
119+-- @usage
120 -- -- Get the Addon
121 -- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
122 function AceAddon:GetAddon(name, silent)
123@@ -202,7 +202,7 @@ end
124 -- @paramsig name[, silent]
125 -- @param name unique name of the module
126 -- @param silent if true, the module is optional, silently return nil if its not found (optional)
127--- @usage
128+-- @usage
129 -- -- Get the Addon
130 -- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
131 -- -- Get the Module
132@@ -225,23 +225,23 @@ local function IsModuleTrue(self) return true end
133 -- @param name unique name of the module
134 -- @param prototype object to derive this module from, methods and values from this table will be mixed into the module (optional)
135 -- @param lib List of libraries to embed into the addon
136--- @usage
137+-- @usage
138 -- -- Create a module with some embeded libraries
139 -- MyModule = MyAddon:NewModule("MyModule", "AceEvent-3.0", "AceHook-3.0")
140---
141+--
142 -- -- Create a module with a prototype
143 -- local prototype = { OnEnable = function(self) print("OnEnable called!") end }
144 -- MyModule = MyAddon:NewModule("MyModule", prototype, "AceEvent-3.0", "AceHook-3.0")
145 function NewModule(self, name, prototype, ...)
146 if type(name) ~= "string" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) end
147 if type(prototype) ~= "string" and type(prototype) ~= "table" and type(prototype) ~= "nil" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'prototype' - table (prototype), string (lib) or nil expected got '%s'."):format(type(prototype)), 2) end
148-
149+
150 if self.modules[name] then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - Module '%s' already exists."):format(name), 2) end
151-
152+
153 -- modules are basically addons. We treat them as such. They will be added to the initializequeue properly as well.
154 -- NewModule can only be called after the parent addon is present thus the modules will be initialized after their parent is.
155 local module = AceAddon:NewAddon(fmt("%s_%s", self.name or tostring(self), name))
156-
157+
158 module.IsModule = IsModuleTrue
159 module:SetEnabledState(self.defaultModuleState)
160 module.moduleName = name
161@@ -256,24 +256,24 @@ function NewModule(self, name, prototype, ...)
162 if not prototype or type(prototype) == "string" then
163 prototype = self.defaultModulePrototype or nil
164 end
165-
166+
167 if type(prototype) == "table" then
168 local mt = getmetatable(module)
169 mt.__index = prototype
170 setmetatable(module, mt) -- More of a Base class type feel.
171 end
172-
173+
174 safecall(self.OnModuleCreated, self, module) -- Was in Ace2 and I think it could be a cool thing to have handy.
175 self.modules[name] = module
176 tinsert(self.orderedModules, module)
177-
178+
179 return module
180 end
181
182 --- Returns the real name of the addon or module, without any prefix.
183 -- @name //addon//:GetName
184--- @paramsig
185--- @usage
186+-- @paramsig
187+-- @usage
188 -- print(MyAddon:GetName())
189 -- -- prints "MyAddon"
190 function GetName(self)
191@@ -285,8 +285,8 @@ end
192 -- and enabling all modules of the addon (unless explicitly disabled).\\
193 -- :Enable() also sets the internal `enableState` variable to true
194 -- @name //addon//:Enable
195--- @paramsig
196--- @usage
197+-- @paramsig
198+-- @usage
199 -- -- Enable MyModule
200 -- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
201 -- MyModule = MyAddon:GetModule("MyModule")
202@@ -306,8 +306,8 @@ end
203 -- and disabling all modules of the addon.\\
204 -- :Disable() also sets the internal `enableState` variable to false
205 -- @name //addon//:Disable
206--- @paramsig
207--- @usage
208+-- @paramsig
209+-- @usage
210 -- -- Disable MyAddon
211 -- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
212 -- MyAddon:Disable()
213@@ -320,7 +320,7 @@ end
214 -- Short-hand function that retrieves the module via `:GetModule` and calls `:Enable` on the module object.
215 -- @name //addon//:EnableModule
216 -- @paramsig name
217--- @usage
218+-- @usage
219 -- -- Enable MyModule using :GetModule
220 -- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
221 -- MyModule = MyAddon:GetModule("MyModule")
222@@ -338,7 +338,7 @@ end
223 -- Short-hand function that retrieves the module via `:GetModule` and calls `:Disable` on the module object.
224 -- @name //addon//:DisableModule
225 -- @paramsig name
226--- @usage
227+-- @usage
228 -- -- Disable MyModule using :GetModule
229 -- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
230 -- MyModule = MyAddon:GetModule("MyModule")
231@@ -357,7 +357,7 @@ end
232 -- @name //addon//:SetDefaultModuleLibraries
233 -- @paramsig lib[, lib, ...]
234 -- @param lib List of libraries to embed into the addon
235--- @usage
236+-- @usage
237 -- -- Create the addon object
238 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
239 -- -- Configure default libraries for modules (all modules need AceEvent-3.0)
240@@ -376,7 +376,7 @@ end
241 -- @name //addon//:SetDefaultModuleState
242 -- @paramsig state
243 -- @param state Default state for new modules, true for enabled, false for disabled
244--- @usage
245+-- @usage
246 -- -- Create the addon object
247 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
248 -- -- Set the default state to "disabled"
249@@ -396,7 +396,7 @@ end
250 -- @name //addon//:SetDefaultModulePrototype
251 -- @paramsig prototype
252 -- @param prototype Default prototype for the new modules (table)
253--- @usage
254+-- @usage
255 -- -- Define a prototype
256 -- local prototype = { OnEnable = function(self) print("OnEnable called!") end }
257 -- -- Set the default prototype
258@@ -428,8 +428,8 @@ end
259
260 --- Return an iterator of all modules associated to the addon.
261 -- @name //addon//:IterateModules
262--- @paramsig
263--- @usage
264+-- @paramsig
265+-- @usage
266 -- -- Enable all modules
267 -- for name, module in MyAddon:IterateModules() do
268 -- module:Enable()
269@@ -438,13 +438,13 @@ local function IterateModules(self) return pairs(self.modules) end
270
271 -- Returns an iterator of all embeds in the addon
272 -- @name //addon//:IterateEmbeds
273--- @paramsig
274+-- @paramsig
275 local function IterateEmbeds(self) return pairs(AceAddon.embeds[self]) end
276
277 --- Query the enabledState of an addon.
278 -- @name //addon//:IsEnabled
279--- @paramsig
280--- @usage
281+-- @paramsig
282+-- @usage
283 -- if MyAddon:IsEnabled() then
284 -- MyAddon:Disable()
285 -- end
286@@ -489,20 +489,20 @@ end
287
288 -- - Initialize the addon after creation.
289 -- This function is only used internally during the ADDON_LOADED event
290--- It will call the **OnInitialize** function on the addon object (if present),
291+-- It will call the **OnInitialize** function on the addon object (if present),
292 -- and the **OnEmbedInitialize** function on all embeded libraries.
293---
294+--
295 -- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
296 -- @param addon addon object to intialize
297 function AceAddon:InitializeAddon(addon)
298 safecall(addon.OnInitialize, addon)
299-
300+
301 local embeds = self.embeds[addon]
302 for i = 1, #embeds do
303 local lib = LibStub:GetLibrary(embeds[i], true)
304 if lib then safecall(lib.OnEmbedInitialize, lib, addon) end
305 end
306-
307+
308 -- we don't call InitializeAddon on modules specifically, this is handled
309 -- from the event handler and only done _once_
310 end
311@@ -510,7 +510,7 @@ end
312 -- - Enable the addon after creation.
313 -- Note: This function is only used internally during the PLAYER_LOGIN event, or during ADDON_LOADED,
314 -- if IsLoggedIn() already returns true at that point, e.g. for LoD Addons.
315--- It will call the **OnEnable** function on the addon object (if present),
316+-- It will call the **OnEnable** function on the addon object (if present),
317 -- and the **OnEmbedEnable** function on all embeded libraries.\\
318 -- This function does not toggle the enable state of the addon itself, and will return early if the addon is disabled.
319 --
320@@ -520,12 +520,12 @@ end
321 function AceAddon:EnableAddon(addon)
322 if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end
323 if self.statuses[addon.name] or not addon.enabledState then return false end
324-
325+
326 -- set the statuses first, before calling the OnEnable. this allows for Disabling of the addon in OnEnable.
327 self.statuses[addon.name] = true
328-
329+
330 safecall(addon.OnEnable, addon)
331-
332+
333 -- make sure we're still enabled before continueing
334 if self.statuses[addon.name] then
335 local embeds = self.embeds[addon]
336@@ -533,7 +533,7 @@ function AceAddon:EnableAddon(addon)
337 local lib = LibStub:GetLibrary(embeds[i], true)
338 if lib then safecall(lib.OnEmbedEnable, lib, addon) end
339 end
340-
341+
342 -- enable possible modules.
343 local modules = addon.orderedModules
344 for i = 1, #modules do
345@@ -545,24 +545,24 @@ end
346
347 -- - Disable the addon
348 -- Note: This function is only used internally.
349--- It will call the **OnDisable** function on the addon object (if present),
350+-- It will call the **OnDisable** function on the addon object (if present),
351 -- and the **OnEmbedDisable** function on all embeded libraries.\\
352 -- This function does not toggle the enable state of the addon itself, and will return early if the addon is still enabled.
353 --
354--- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
355+-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
356 -- Use :Disable on the addon itself instead.
357 -- @param addon addon object to enable
358 function AceAddon:DisableAddon(addon)
359 if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end
360 if not self.statuses[addon.name] then return false end
361-
362+
363 -- set statuses first before calling OnDisable, this allows for aborting the disable in OnDisable.
364 self.statuses[addon.name] = false
365-
366+
367 safecall( addon.OnDisable, addon )
368-
369+
370 -- make sure we're still disabling...
371- if not self.statuses[addon.name] then
372+ if not self.statuses[addon.name] then
373 local embeds = self.embeds[addon]
374 for i = 1, #embeds do
375 local lib = LibStub:GetLibrary(embeds[i], true)
376@@ -574,12 +574,12 @@ function AceAddon:DisableAddon(addon)
377 self:DisableAddon(modules[i])
378 end
379 end
380-
381+
382 return not self.statuses[addon.name] -- return true if we're disabled
383 end
384
385 --- Get an iterator over all registered addons.
386--- @usage
387+-- @usage
388 -- -- Print a list of all installed AceAddon's
389 -- for name, addon in AceAddon:IterateAddons() do
390 -- print("Addon: " .. name)
391@@ -587,7 +587,7 @@ end
392 function AceAddon:IterateAddons() return pairs(self.addons) end
393
394 --- Get an iterator over the internal status registry.
395--- @usage
396+-- @usage
397 -- -- Print a list of all enabled addons
398 -- for name, status in AceAddon:IterateAddonStatus() do
399 -- if status then
400@@ -613,7 +613,7 @@ local function onEvent(this, event, arg1)
401 AceAddon:InitializeAddon(addon)
402 tinsert(AceAddon.enablequeue, addon)
403 end
404-
405+
406 if IsLoggedIn() then
407 while(#AceAddon.enablequeue > 0) do
408 local addon = tremove(AceAddon.enablequeue, 1)
409diff --git AceBucket-3.0/AceBucket-3.0.lua AceBucket-3.0/AceBucket-3.0.lua
410index 2a682f8..cd8cdd2 100644
411--- AceBucket-3.0/AceBucket-3.0.lua
412+++ AceBucket-3.0/AceBucket-3.0.lua
413@@ -1,28 +1,28 @@
414 --- A bucket to catch events in. **AceBucket-3.0** provides throttling of events that fire in bursts and
415 -- your addon only needs to know about the full burst.
416---
417+--
418 -- This Bucket implementation works as follows:\\
419 -- Initially, no schedule is running, and its waiting for the first event to happen.\\
420 -- The first event will start the bucket, and get the scheduler running, which will collect all
421--- events in the given interval. When that interval is reached, the bucket is pushed to the
422--- callback and a new schedule is started. When a bucket is empty after its interval, the scheduler is
423+-- events in the given interval. When that interval is reached, the bucket is pushed to the
424+-- callback and a new schedule is started. When a bucket is empty after its interval, the scheduler is
425 -- stopped, and the bucket is only listening for the next event to happen, basically back in its initial state.
426---
427--- In addition, the buckets collect information about the "arg1" argument of the events that fire, and pass those as a
428+--
429+-- In addition, the buckets collect information about the "arg1" argument of the events that fire, and pass those as a
430 -- table to your callback. This functionality was mostly designed for the UNIT_* events.\\
431 -- The table will have the different values of "arg1" as keys, and the number of occurances as their value, e.g.\\
432 -- { ["player"] = 2, ["target"] = 1, ["party1"] = 1 }
433 --
434--- **AceBucket-3.0** can be embeded into your addon, either explicitly by calling AceBucket:Embed(MyAddon) or by
435+-- **AceBucket-3.0** can be embeded into your addon, either explicitly by calling AceBucket:Embed(MyAddon) or by
436 -- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
437 -- and can be accessed directly, without having to explicitly call AceBucket itself.\\
438 -- It is recommended to embed AceBucket, otherwise you'll have to specify a custom `self` on all calls you
439 -- make into AceBucket.
440 -- @usage
441 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("BucketExample", "AceBucket-3.0")
442---
443+--
444 -- function MyAddon:OnEnable()
445--- -- Register a bucket that listens to all the HP related events,
446+-- -- Register a bucket that listens to all the HP related events,
447 -- -- and fires once per second
448 -- self:RegisterBucketEvent({"UNIT_HEALTH", "UNIT_MAXHEALTH"}, 1, "UpdateHealth")
449 -- end
450@@ -79,7 +79,7 @@ end
451 -- send the bucket to the callback function and schedule the next FireBucket in interval seconds
452 local function FireBucket(bucket)
453 local received = bucket.received
454-
455+
456 -- we dont want to fire empty buckets
457 if next(received) ~= nil then
458 local callback = bucket.callback
459@@ -88,11 +88,11 @@ local function FireBucket(bucket)
460 else
461 safecall(callback, received)
462 end
463-
464+
465 for k in pairs(received) do
466 received[k] = nil
467 end
468-
469+
470 -- if the bucket was not empty, schedule another FireBucket in interval seconds
471 bucket.timer = AceTimer.ScheduleTimer(bucket, FireBucket, bucket.interval, bucket)
472 else -- if it was empty, clear the timer and wait for the next event
473@@ -101,16 +101,16 @@ local function FireBucket(bucket)
474 end
475
476 -- BucketHandler ( event, arg1 )
477---
478+--
479 -- callback func for AceEvent
480 -- stores arg1 in the received table, and schedules the bucket if necessary
481 local function BucketHandler(self, event, arg1)
482 if arg1 == nil then
483 arg1 = "nil"
484 end
485-
486+
487 self.received[arg1] = (self.received[arg1] or 0) + 1
488-
489+
490 -- if we are not scheduled yet, start a timer on the interval for our bucket to be cleared
491 if not self.timer then
492 self.timer = AceTimer.ScheduleTimer(self, FireBucket, self.interval, self)
493@@ -125,14 +125,14 @@ end
494 -- isMessage(boolean) - register AceEvent Messages instead of game events
495 local function RegisterBucket(self, event, interval, callback, isMessage)
496 -- try to fetch the librarys
497- if not AceEvent or not AceTimer then
498+ if not AceEvent or not AceTimer then
499 AceEvent = LibStub:GetLibrary("AceEvent-3.0", true)
500 AceTimer = LibStub:GetLibrary("AceTimer-3.0", true)
501 if not AceEvent or not AceTimer then
502 error(MAJOR .. " requires AceEvent-3.0 and AceTimer-3.0", 3)
503 end
504 end
505-
506+
507 if type(event) ~= "string" and type(event) ~= "table" then error("Usage: RegisterBucket(event, interval, callback): 'event' - string or table expected.", 3) end
508 if not callback then
509 if type(event) == "string" then
510@@ -144,7 +144,7 @@ local function RegisterBucket(self, event, interval, callback, isMessage)
511 if not tonumber(interval) then error("Usage: RegisterBucket(event, interval, callback): 'interval' - number expected.", 3) end
512 if type(callback) ~= "string" and type(callback) ~= "function" then error("Usage: RegisterBucket(event, interval, callback): 'callback' - string or function or nil expected.", 3) end
513 if type(callback) == "string" and type(self[callback]) ~= "function" then error("Usage: RegisterBucket(event, interval, callback): 'callback' - method not found on target object.", 3) end
514-
515+
516 local bucket = next(bucketCache)
517 if bucket then
518 bucketCache[bucket] = nil
519@@ -152,9 +152,9 @@ local function RegisterBucket(self, event, interval, callback, isMessage)
520 bucket = { handler = BucketHandler, received = {} }
521 end
522 bucket.object, bucket.callback, bucket.interval = self, callback, tonumber(interval)
523-
524+
525 local regFunc = isMessage and AceEvent.RegisterMessage or AceEvent.RegisterEvent
526-
527+
528 if type(event) == "table" then
529 for _,e in pairs(event) do
530 regFunc(bucket, e, "handler")
531@@ -162,10 +162,10 @@ local function RegisterBucket(self, event, interval, callback, isMessage)
532 else
533 regFunc(bucket, event, "handler")
534 end
535-
536+
537 local handle = tostring(bucket)
538 AceBucket.buckets[handle] = bucket
539-
540+
541 return handle
542 end
543
544@@ -177,7 +177,7 @@ end
545 -- @usage
546 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceBucket-3.0")
547 -- MyAddon:RegisterBucketEvent("BAG_UPDATE", 0.2, "UpdateBags")
548---
549+--
550 -- function MyAddon:UpdateBags()
551 -- -- do stuff
552 -- end
553@@ -193,7 +193,7 @@ end
554 -- @usage
555 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceBucket-3.0")
556 -- MyAddon:RegisterBucketEvent("SomeAddon_InformationMessage", 0.2, "ProcessData")
557---
558+--
559 -- function MyAddon:ProcessData()
560 -- -- do stuff
561 -- end
562@@ -208,17 +208,17 @@ function AceBucket:UnregisterBucket(handle)
563 if bucket then
564 AceEvent.UnregisterAllEvents(bucket)
565 AceEvent.UnregisterAllMessages(bucket)
566-
567+
568 -- clear any remaining data in the bucket
569 for k in pairs(bucket.received) do
570 bucket.received[k] = nil
571 end
572-
573+
574 if bucket.timer then
575 AceTimer.CancelTimer(bucket, bucket.timer)
576 bucket.timer = nil
577 end
578-
579+
580 AceBucket.buckets[handle] = nil
581 -- store our bucket in the cache
582 bucketCache[bucket] = true
583@@ -240,10 +240,10 @@ end
584 -- embedding and embed handling
585 local mixins = {
586 "RegisterBucketEvent",
587- "RegisterBucketMessage",
588+ "RegisterBucketMessage",
589 "UnregisterBucket",
590 "UnregisterAllBuckets",
591-}
592+}
593
594 -- Embeds AceBucket into the target object making the functions from the mixins list available on target:..
595 -- @param target target object to embed AceBucket in
596diff --git AceComm-3.0/AceComm-3.0.lua AceComm-3.0/AceComm-3.0.lua
597index 5b96b9d..b49372e 100644
598--- AceComm-3.0/AceComm-3.0.lua
599+++ AceComm-3.0/AceComm-3.0.lua
600@@ -2,7 +2,7 @@
601 -- It'll automatically split the messages into multiple parts and rebuild them on the receiving end.\\
602 -- **ChatThrottleLib** is of course being used to avoid being disconnected by the server.
603 --
604--- **AceComm-3.0** can be embeded into your addon, either explicitly by calling AceComm:Embed(MyAddon) or by
605+-- **AceComm-3.0** can be embeded into your addon, either explicitly by calling AceComm:Embed(MyAddon) or by
606 -- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
607 -- and can be accessed directly, without having to explicitly call AceComm itself.\\
608 -- It is recommended to embed AceComm, otherwise you'll have to specify a custom `self` on all calls you
609@@ -52,7 +52,7 @@ AceComm.multipart_origprefixes = nil
610 AceComm.multipart_reassemblers = nil
611
612 -- the multipart message spool: indexed by a combination of sender+distribution+
613-AceComm.multipart_spool = AceComm.multipart_spool or {}
614+AceComm.multipart_spool = AceComm.multipart_spool or {}
615
616 --- Register for Addon Traffic on a specified prefix
617 -- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent), max 16 characters
618@@ -90,7 +90,7 @@ function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callb
619 type(text)=="string" and
620 type(distribution)=="string" and
621 (target==nil or type(target)=="string" or type(target)=="number") and
622- (prio=="BULK" or prio=="NORMAL" or prio=="ALERT")
623+ (prio=="BULK" or prio=="NORMAL" or prio=="ALERT")
624 ) then
625 error('Usage: SendCommMessage(addon, "prefix", "text", "distribution"[, "target"[, "prio"[, callbackFn, callbackarg]]])', 2)
626 end
627@@ -105,7 +105,7 @@ function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callb
628 return callbackFn(callbackArg, sent, textlen)
629 end
630 end
631-
632+
633 local forceMultipart
634 if match(text, "^[\001-\009]") then -- 4.1+: see if the first character is a control character
635 -- we need to escape the first character with a \004
636@@ -150,17 +150,17 @@ do
637 local compost = setmetatable({}, {__mode = "k"})
638 local function new()
639 local t = next(compost)
640- if t then
641+ if t then
642 compost[t]=nil
643 for i=#t,3,-1 do -- faster than pairs loop. don't even nil out 1/2 since they'll be overwritten
644 t[i]=nil
645 end
646 return t
647 end
648-
649+
650 return {}
651 end
652-
653+
654 local function lostdatawarning(prefix,sender,where)
655 DEFAULT_CHAT_FRAME:AddMessage(MAJOR..": Warning: lost network data regarding '"..tostring(prefix).."' from '"..tostring(sender).."' (in "..where..")")
656 end
657@@ -168,14 +168,14 @@ do
658 function AceComm:OnReceiveMultipartFirst(prefix, message, distribution, sender)
659 local key = prefix.."\t"..distribution.."\t"..sender -- a unique stream is defined by the prefix + distribution + sender
660 local spool = AceComm.multipart_spool
661-
662+
663 --[[
664- if spool[key] then
665+ if spool[key] then
666 lostdatawarning(prefix,sender,"First")
667 -- continue and overwrite
668 end
669 --]]
670-
671+
672 spool[key] = message -- plain string for now
673 end
674
675@@ -183,7 +183,7 @@ do
676 local key = prefix.."\t"..distribution.."\t"..sender -- a unique stream is defined by the prefix + distribution + sender
677 local spool = AceComm.multipart_spool
678 local olddata = spool[key]
679-
680+
681 if not olddata then
682 --lostdatawarning(prefix,sender,"Next")
683 return
684@@ -204,14 +204,14 @@ do
685 local key = prefix.."\t"..distribution.."\t"..sender -- a unique stream is defined by the prefix + distribution + sender
686 local spool = AceComm.multipart_spool
687 local olddata = spool[key]
688-
689+
690 if not olddata then
691 --lostdatawarning(prefix,sender,"End")
692 return
693 end
694
695 spool[key] = nil
696-
697+
698 if type(olddata) == "table" then
699 -- if we've received a "next", the spooled data will be a table for rapid & garbage-free tconcat
700 tinsert(olddata, message)
701diff --git AceComm-3.0/ChatThrottleLib.lua AceComm-3.0/ChatThrottleLib.lua
702index 01088f6..ad21af4 100644
703--- AceComm-3.0/ChatThrottleLib.lua
704+++ AceComm-3.0/ChatThrottleLib.lua
705@@ -3,7 +3,7 @@
706 --
707 -- Manages AddOn chat output to keep player from getting kicked off.
708 --
709--- ChatThrottleLib:SendChatMessage/:SendAddonMessage functions that accept
710+-- ChatThrottleLib:SendChatMessage/:SendAddonMessage functions that accept
711 -- a Priority ("BULK", "NORMAL", "ALERT") as well as prefix for SendChatMessage.
712 --
713 -- Priorities get an equal share of available bandwidth when fully loaded.
714@@ -118,7 +118,7 @@ end
715
716
717 -----------------------------------------------------------------------
718--- Recycling bin for pipes
719+-- Recycling bin for pipes
720 -- A pipe is a plain integer-indexed queue of messages
721 -- Pipes normally live in Rings of pipes (3 rings total, one per priority)
722
723@@ -169,7 +169,7 @@ end
724 -- Initialize queues, set up frame for OnUpdate, etc
725
726
727-function ChatThrottleLib:Init()
728+function ChatThrottleLib:Init()
729
730 -- Set up queues
731 if not self.Prio then
732@@ -356,8 +356,8 @@ function ChatThrottleLib.OnUpdate(this,delay)
733 -- See how many of our priorities have queued messages (we only have 3, don't worry about the loop)
734 local n = 0
735 for prioname,Prio in pairs(self.Prio) do
736- if Prio.Ring.pos or Prio.avail < 0 then
737- n = n + 1
738+ if Prio.Ring.pos or Prio.avail < 0 then
739+ n = n + 1
740 end
741 end
742
743diff --git AceConfig-3.0/AceConfig-3.0.lua AceConfig-3.0/AceConfig-3.0.lua
744index b7e35ee..2233c4c 100644
745--- AceConfig-3.0/AceConfig-3.0.lua
746+++ AceConfig-3.0/AceConfig-3.0.lua
747@@ -45,7 +45,7 @@ local pcall, error, type, pairs = pcall, error, type, pairs
748 function AceConfig:RegisterOptionsTable(appName, options, slashcmd)
749 local ok,msg = pcall(cfgreg.RegisterOptionsTable, self, appName, options)
750 if not ok then error(msg, 2) end
751-
752+
753 if slashcmd then
754 if type(slashcmd) == "table" then
755 for _,cmd in pairs(slashcmd) do
756diff --git AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
757index b989387..18cf619 100644
758--- AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
759+++ AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
760@@ -63,7 +63,7 @@ local funcmsg = "expected function or member name"
761
762 -- pickfirstset() - picks the first non-nil value and returns it
763
764-local function pickfirstset(...)
765+local function pickfirstset(...)
766 for i=1,select("#",...) do
767 if select(i,...)~=nil then
768 return select(i,...)
769@@ -120,7 +120,7 @@ local function callfunction(info, tab, methodtype, ...)
770 info.arg = tab.arg
771 info.option = tab
772 info.type = tab.type
773-
774+
775 if type(method)=="function" then
776 return method(info, ...)
777 else
778@@ -131,7 +131,7 @@ end
779 -- do_final() - do the final step (set/execute) along with validation and confirmation
780
781 local function do_final(info, inputpos, tab, methodtype, ...)
782- if info.validate then
783+ if info.validate then
784 local res = callmethod(info,inputpos,tab,"validate",...)
785 if type(res)=="string" then
786 usererr(info, inputpos, "'"..strsub(info.input, inputpos).."' - "..res)
787@@ -139,7 +139,7 @@ local function do_final(info, inputpos, tab, methodtype, ...)
788 end
789 end
790 -- console ignores .confirm
791-
792+
793 callmethod(info,inputpos,tab,methodtype, ...)
794 end
795
796@@ -152,8 +152,8 @@ local function getparam(info, inputpos, tab, depth, paramname, types, errormsg)
797 if val~=nil then
798 if val==false then
799 val=nil
800- elseif not types[type(val)] then
801- err(info, inputpos, "'" .. paramname.. "' - "..errormsg)
802+ elseif not types[type(val)] then
803+ err(info, inputpos, "'" .. paramname.. "' - "..errormsg)
804 end
805 info[paramname] = val
806 info[paramname.."_at"] = depth
807@@ -166,13 +166,13 @@ end
808 local dummytable={}
809
810 local function iterateargs(tab)
811- if not tab.plugins then
812- return pairs(tab.args)
813+ if not tab.plugins then
814+ return pairs(tab.args)
815 end
816-
817+
818 local argtabkey,argtab=next(tab.plugins)
819 local v
820-
821+
822 return function(_, k)
823 while argtab do
824 k,v = next(argtab, k)
825@@ -206,18 +206,18 @@ local function showhelp(info, inputpos, tab, depth, noHead)
826 if not noHead then
827 print("|cff33ff99"..info.appName.."|r: Arguments to |cffffff78/"..info[0].."|r "..strsub(info.input,1,inputpos-1)..":")
828 end
829-
830+
831 local sortTbl = {} -- [1..n]=name
832 local refTbl = {} -- [name]=tableref
833-
834+
835 for k,v in iterateargs(tab) do
836 if not refTbl[k] then -- a plugin overriding something in .args
837 tinsert(sortTbl, k)
838 refTbl[k] = v
839 end
840 end
841-
842- tsort(sortTbl, function(one, two)
843+
844+ tsort(sortTbl, function(one, two)
845 local o1 = refTbl[one].order or 100
846 local o2 = refTbl[two].order or 100
847 if type(o1) == "function" or type(o1) == "string" then
848@@ -240,7 +240,7 @@ local function showhelp(info, inputpos, tab, depth, noHead)
849 if o1==o2 then return tostring(one)<tostring(two) end -- compare names
850 return o1<o2
851 end)
852-
853+
854 for i = 1, #sortTbl do
855 local k = sortTbl[i]
856 local v = refTbl[k]
857@@ -327,7 +327,7 @@ local function keybindingValidateFunc(text)
858 return s
859 end
860
861--- handle() - selfrecursing function that processes input->optiontable
862+-- handle() - selfrecursing function that processes input->optiontable
863 -- - depth - starts at 0
864 -- - retfalse - return false rather than produce error if a match is not found (used by inlined groups)
865
866@@ -346,16 +346,16 @@ local function handle(info, inputpos, tab, depth, retfalse)
867 local oldfunc,oldfunc_at = getparam(info,inputpos,tab,depth,"func",functypes,funcmsg)
868 local oldvalidate,oldvalidate_at = getparam(info,inputpos,tab,depth,"validate",functypes,funcmsg)
869 --local oldconfirm,oldconfirm_at = getparam(info,inputpos,tab,depth,"confirm",functypes,funcmsg)
870-
871+
872 -------------------------------------------------------------------
873 -- Act according to .type of this table
874-
875+
876 if tab.type=="group" then
877 ------------ group --------------------------------------------
878-
879+
880 if type(tab.args)~="table" then err(info, inputpos) end
881 if tab.plugins and type(tab.plugins)~="table" then err(info,inputpos) end
882-
883+
884 -- grab next arg from input
885 local _,nextpos,arg = (info.input):find(" *([^ ]+) *", inputpos)
886 if not arg then
887@@ -363,11 +363,11 @@ local function handle(info, inputpos, tab, depth, retfalse)
888 return
889 end
890 nextpos=nextpos+1
891-
892+
893 -- loop .args and try to find a key with a matching name
894 for k,v in iterateargs(tab) do
895 if not(type(k)=="string" and type(v)=="table" and type(v.type)=="string") then err(info,inputpos, "options table child '"..tostring(k).."' is malformed") end
896-
897+
898 -- is this child an inline group? if so, traverse into it
899 if v.type=="group" and pickfirstset(v.cmdInline, v.inline, false) then
900 info[depth+1] = k
901@@ -383,8 +383,8 @@ local function handle(info, inputpos, tab, depth, retfalse)
902 return handle(info,nextpos,v,depth+1)
903 end
904 end
905-
906- -- no match
907+
908+ -- no match
909 if retfalse then
910 -- restore old infotable members and return false to indicate failure
911 info.handler,info.handler_at = oldhandler,oldhandler_at
912@@ -395,23 +395,23 @@ local function handle(info, inputpos, tab, depth, retfalse)
913 --info.confirm,info.confirm_at = oldconfirm,oldconfirm_at
914 return false
915 end
916-
917+
918 -- couldn't find the command, display error
919 usererr(info, inputpos, "'"..arg.."' - " .. L["unknown argument"])
920 return
921 end
922-
923+
924 local str = strsub(info.input,inputpos);
925-
926+
927 if tab.type=="execute" then
928 ------------ execute --------------------------------------------
929 do_final(info, inputpos, tab, "func")
930-
931
932-
933+
934+
935 elseif tab.type=="input" then
936 ------------ input --------------------------------------------
937-
938+
939 local res = true
940 if tab.pattern then
941 if not(type(tab.pattern)=="string") then err(info, inputpos, "'pattern' - expected a string") end
942@@ -420,11 +420,11 @@ local function handle(info, inputpos, tab, depth, retfalse)
943 return
944 end
945 end
946-
947+
948 do_final(info, inputpos, tab, "set", str)
949-
950
951-
952+
953+
954 elseif tab.type=="toggle" then
955 ------------ toggle --------------------------------------------
956 local b
957@@ -444,7 +444,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
958 else
959 b = not b
960 end
961-
962+
963 elseif str==L["on"] then
964 b = true
965 elseif str==L["off"] then
966@@ -459,9 +459,9 @@ local function handle(info, inputpos, tab, depth, retfalse)
967 end
968 return
969 end
970-
971+
972 do_final(info, inputpos, tab, "set", b)
973-
974+
975
976 elseif tab.type=="range" then
977 ------------ range --------------------------------------------
978@@ -481,21 +481,21 @@ local function handle(info, inputpos, tab, depth, retfalse)
979 usererr(info, inputpos, val.." - "..format(L["must be equal to or lower than %s"], tostring(info.max)) )
980 return
981 end
982-
983+
984 do_final(info, inputpos, tab, "set", val)
985
986-
987+
988 elseif tab.type=="select" then
989 ------------ select ------------------------------------
990 local str = strtrim(strlower(str))
991-
992+
993 local values = tab.values
994 if type(values) == "function" or type(values) == "string" then
995 info.values = values
996 values = callmethod(info, inputpos, tab, "values")
997 info.values = nil
998 end
999-
1000+
1001 if str == "" then
1002 local b = callmethod(info, inputpos, tab, "get")
1003 local fmt = "|cffffff78- [%s]|r %s"
1004@@ -512,7 +512,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
1005 end
1006
1007 local ok
1008- for k,v in pairs(values) do
1009+ for k,v in pairs(values) do
1010 if strlower(k)==str then
1011 str = k -- overwrite with key (in case of case mismatches)
1012 ok = true
1013@@ -523,20 +523,20 @@ local function handle(info, inputpos, tab, depth, retfalse)
1014 usererr(info, inputpos, "'"..str.."' - "..L["unknown selection"])
1015 return
1016 end
1017-
1018+
1019 do_final(info, inputpos, tab, "set", str)
1020-
1021+
1022 elseif tab.type=="multiselect" then
1023 ------------ multiselect -------------------------------------------
1024 local str = strtrim(strlower(str))
1025-
1026+
1027 local values = tab.values
1028 if type(values) == "function" or type(values) == "string" then
1029 info.values = values
1030 values = callmethod(info, inputpos, tab, "values")
1031 info.values = nil
1032 end
1033-
1034+
1035 if str == "" then
1036 local fmt = "|cffffff78- [%s]|r %s"
1037 local fmt_sel = "|cffffff78- [%s]|r %s |cffff0000*|r"
1038@@ -550,7 +550,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
1039 end
1040 return
1041 end
1042-
1043+
1044 --build a table of the selections, checking that they exist
1045 --parse for =on =off =default in the process
1046 --table will be key = true for options that should toggle, key = [on|off|default] for options to be set
1047@@ -559,25 +559,25 @@ local function handle(info, inputpos, tab, depth, retfalse)
1048 --parse option=on etc
1049 local opt, val = v:match('(.+)=(.+)')
1050 --get option if toggling
1051- if not opt then
1052- opt = v
1053+ if not opt then
1054+ opt = v
1055 end
1056-
1057+
1058 --check that the opt is valid
1059 local ok
1060- for k,v in pairs(values) do
1061+ for k,v in pairs(values) do
1062 if strlower(k)==opt then
1063 opt = k -- overwrite with key (in case of case mismatches)
1064 ok = true
1065 break
1066 end
1067 end
1068-
1069+
1070 if not ok then
1071 usererr(info, inputpos, "'"..opt.."' - "..L["unknown selection"])
1072 return
1073 end
1074-
1075+
1076 --check that if val was supplied it is valid
1077 if val then
1078 if val == L["on"] or val == L["off"] or (tab.tristate and val == L["default"]) then
1079@@ -596,14 +596,14 @@ local function handle(info, inputpos, tab, depth, retfalse)
1080 sels[opt] = true
1081 end
1082 end
1083-
1084+
1085 for opt, val in pairs(sels) do
1086 local newval
1087-
1088+
1089 if (val == true) then
1090 --toggle the option
1091 local b = callmethod(info, inputpos, tab, "get", opt)
1092-
1093+
1094 if tab.tristate then
1095 --cycle in true, nil, false order
1096 if b then
1097@@ -627,11 +627,11 @@ local function handle(info, inputpos, tab, depth, retfalse)
1098 newval = nil
1099 end
1100 end
1101-
1102+
1103 do_final(info, inputpos, tab, "set", opt, newval)
1104 end
1105-
1106-
1107+
1108+
1109 elseif tab.type=="color" then
1110 ------------ color --------------------------------------------
1111 local str = strtrim(strlower(str))
1112@@ -639,16 +639,16 @@ local function handle(info, inputpos, tab, depth, retfalse)
1113 --TODO: Show current value
1114 return
1115 end
1116-
1117+
1118 local r, g, b, a
1119-
1120+
1121 local hasAlpha = tab.hasAlpha
1122 if type(hasAlpha) == "function" or type(hasAlpha) == "string" then
1123 info.hasAlpha = hasAlpha
1124 hasAlpha = callmethod(info, inputpos, tab, 'hasAlpha')
1125 info.hasAlpha = nil
1126 end
1127-
1128+
1129 if hasAlpha then
1130 if str:len() == 8 and str:find("^%x*$") then
1131 --parse a hex string
1132@@ -662,7 +662,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
1133 usererr(info, inputpos, format(L["'%s' - expected 'RRGGBBAA' or 'r g b a'."], str))
1134 return
1135 end
1136-
1137+
1138 if r >= 0.0 and r <= 1.0 and g >= 0.0 and g <= 1.0 and b >= 0.0 and b <= 1.0 and a >= 0.0 and a <= 1.0 then
1139 --values are valid
1140 elseif r >= 0 and r <= 255 and g >= 0 and g <= 255 and b >= 0 and b <= 255 and a >= 0 and a <= 255 then
1141@@ -701,7 +701,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
1142 usererr(info, inputpos, format(L["'%s' - values must all be either in the range 0-1 or 0-255."], str))
1143 end
1144 end
1145-
1146+
1147 do_final(info, inputpos, tab, "set", r,g,b,a)
1148
1149 elseif tab.type=="keybinding" then
1150@@ -737,7 +737,7 @@ end
1151 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceConsole-3.0")
1152 -- -- Use AceConsole-3.0 to register a Chat Command
1153 -- MyAddon:RegisterChatCommand("mychat", "ChatCommand")
1154---
1155+--
1156 -- -- Show the GUI if no input is supplied, otherwise handle the chat input.
1157 -- function MyAddon:ChatCommand(input)
1158 -- -- Assuming "MyOptions" is the appName of a valid options table
1159@@ -754,7 +754,7 @@ function AceConfigCmd:HandleCommand(slashcmd, appName, input)
1160 error([[Usage: HandleCommand("slashcmd", "appName", "input"): 'appName' - no options table "]]..tostring(appName)..[[" has been registered]], 2)
1161 end
1162 local options = assert( optgetter("cmd", MAJOR) )
1163-
1164+
1165 local info = { -- Don't try to recycle this, it gets handed off to callbacks and whatnot
1166 [0] = slashcmd,
1167 appName = appName,
1168@@ -765,7 +765,7 @@ function AceConfigCmd:HandleCommand(slashcmd, appName, input)
1169 uiType = "cmd",
1170 uiName = MAJOR,
1171 }
1172-
1173+
1174 handle(info, 1, options, 0) -- (info, inputpos, table, depth)
1175 end
1176
1177diff --git AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
1178index 0b63dce..73719da 100644
1179--- AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
1180+++ AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
1181@@ -56,18 +56,18 @@ local width_multiplier = 170
1182 --[[
1183 Group Types
1184 Tree - All Descendant Groups will all become nodes on the tree, direct child options will appear above the tree
1185- - Descendant Groups with inline=true and thier children will not become nodes
1186+ - Descendant Groups with inline=true and thier children will not become nodes
1187
1188 Tab - Direct Child Groups will become tabs, direct child options will appear above the tab control
1189- - Grandchild groups will default to inline unless specified otherwise
1190+ - Grandchild groups will default to inline unless specified otherwise
1191
1192 Select- Same as Tab but with entries in a dropdown rather than tabs
1193
1194
1195 Inline Groups
1196- - Will not become nodes of a select group, they will be effectivly part of thier parent group seperated by a border
1197- - If declared on a direct child of a root node of a select group, they will appear above the group container control
1198- - When a group is displayed inline, all descendants will also be inline members of the group
1199+ - Will not become nodes of a select group, they will be effectivly part of thier parent group seperated by a border
1200+ - If declared on a direct child of a root node of a select group, they will appear above the group container control
1201+ - When a group is displayed inline, all descendants will also be inline members of the group
1202
1203 ]]
1204
1205@@ -168,11 +168,11 @@ local allIsLiteral = {
1206 local function GetOptionsMemberValue(membername, option, options, path, appName, ...)
1207 --get definition for the member
1208 local inherits = isInherited[membername]
1209-
1210+
1211
1212 --get the member of the option, traversing the tree if it can be inherited
1213 local member
1214-
1215+
1216 if inherits then
1217 local group = options
1218 if group[membername] ~= nil then
1219@@ -187,7 +187,7 @@ local function GetOptionsMemberValue(membername, option, options, path, appName,
1220 else
1221 member = option[membername]
1222 end
1223-
1224+
1225 --check if we need to call a functon, or if we have a literal value
1226 if ( not allIsLiteral[membername] ) and ( type(member) == "function" or ((not stringIsLiteral[membername]) and type(member) == "string") ) then
1227 --We have a function to call
1228@@ -196,13 +196,13 @@ local function GetOptionsMemberValue(membername, option, options, path, appName,
1229 local handler
1230 local group = options
1231 handler = group.handler or handler
1232-
1233+
1234 for i = 1, #path do
1235 group = GetSubOption(group, path[i])
1236 info[i] = path[i]
1237 handler = group.handler or handler
1238 end
1239-
1240+
1241 info.options = options
1242 info.appName = appName
1243 info[0] = appName
1244@@ -212,8 +212,8 @@ local function GetOptionsMemberValue(membername, option, options, path, appName,
1245 info.type = option.type
1246 info.uiType = "dialog"
1247 info.uiName = MAJOR
1248-
1249- local a, b, c ,d
1250+
1251+ local a, b, c ,d
1252 --using 4 returns for the get of a color type, increase if a type needs more
1253 if type(member) == "function" then
1254 --Call the function
1255@@ -230,8 +230,8 @@ local function GetOptionsMemberValue(membername, option, options, path, appName,
1256 return a,b,c,d
1257 else
1258 --The value isnt a function to call, return it
1259- return member
1260- end
1261+ return member
1262+ end
1263 end
1264
1265 --[[calls an options function that could be inherited, method name or function ref
1266@@ -315,7 +315,7 @@ end
1267 local function BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
1268 tempOrders = new()
1269 tempNames = new()
1270-
1271+
1272 if group.plugins then
1273 for plugin, t in pairs(group.plugins) do
1274 for k, v in pairs(t) do
1275@@ -331,7 +331,7 @@ local function BuildSortedOptionsTable(group, keySort, opts, options, path, appN
1276 end
1277 end
1278 end
1279-
1280+
1281 for k, v in pairs(group.args) do
1282 if not opts[k] then
1283 tinsert(keySort, k)
1284@@ -362,7 +362,7 @@ local function DelTree(tree)
1285 end
1286
1287 local function CleanUserData(widget, event)
1288-
1289+
1290 local user = widget:GetUserDataTable()
1291
1292 if user.path then
1293@@ -402,7 +402,7 @@ end
1294 -- - Gets a status table for the given appname and options path.
1295 -- @param appName The application name as given to `:RegisterOptionsTable()`
1296 -- @param path The path to the options (a table with all group keys)
1297--- @return
1298+-- @return
1299 function AceConfigDialog:GetStatusTable(appName, path)
1300 local status = self.Status
1301
1302@@ -436,7 +436,7 @@ end
1303 function AceConfigDialog:SelectGroup(appName, ...)
1304 local path = new()
1305
1306-
1307+
1308 local app = reg:GetOptionsTable(appName)
1309 if not app then
1310 error(("%s isn't registed with AceConfigRegistry, unable to open config"):format(appName), 2)
1311@@ -448,9 +448,9 @@ function AceConfigDialog:SelectGroup(appName, ...)
1312 status.groups = {}
1313 end
1314 status = status.groups
1315- local treevalue
1316- local treestatus
1317-
1318+ local treevalue
1319+ local treestatus
1320+
1321 for n = 1, select("#",...) do
1322 local key = select(n, ...)
1323
1324@@ -477,12 +477,12 @@ function AceConfigDialog:SelectGroup(appName, ...)
1325 --the selected group will be overwritten if a child is the final target but still needs to be open
1326 treestatus.selected = treevalue
1327 treestatus.groups[treevalue] = true
1328-
1329+
1330 end
1331-
1332+
1333 --move to the next group in the path
1334 group = GetSubOption(group, key)
1335- if not group then
1336+ if not group then
1337 break
1338 end
1339 tinsert(path, key)
1340@@ -492,10 +492,10 @@ function AceConfigDialog:SelectGroup(appName, ...)
1341 end
1342 status = status.groups
1343 end
1344-
1345+
1346 del(path)
1347 reg:NotifyChange(appName)
1348-end
1349+end
1350
1351 local function OptionOnMouseOver(widget, event)
1352 --show a tooltip/set the status bar to the desc text
1353@@ -510,14 +510,14 @@ local function OptionOnMouseOver(widget, event)
1354 local desc = GetOptionsMemberValue("desc", opt, options, path, appName)
1355 local usage = GetOptionsMemberValue("usage", opt, options, path, appName)
1356 local descStyle = opt.descStyle
1357-
1358+
1359 if descStyle and descStyle ~= "tooltip" then return end
1360-
1361+
1362 GameTooltip:SetText(name, 1, .82, 0, true)
1363-
1364+
1365 if opt.type == "multiselect" then
1366 GameTooltip:AddLine(user.text, 0.5, 0.5, 0.8, true)
1367- end
1368+ end
1369 if type(desc) == "string" then
1370 GameTooltip:AddLine(desc, 1, 1, 1, true)
1371 end
1372@@ -675,7 +675,7 @@ local function ActivateControl(widget, event, ...)
1373 end
1374 end
1375 end
1376-
1377+
1378 local success
1379 if validated and option.type ~= "execute" then
1380 if type(validate) == "string" then
1381@@ -690,7 +690,7 @@ local function ActivateControl(widget, event, ...)
1382 if not success then validated = false end
1383 end
1384 end
1385-
1386+
1387 local rootframe = user.rootframe
1388 if not validated or type(validated) == "string" then
1389 if not validated then
1390@@ -715,7 +715,7 @@ local function ActivateControl(widget, event, ...)
1391 del(info)
1392 return true
1393 else
1394-
1395+
1396 local confirmText = option.confirmText
1397 --call confirm func/method
1398 if type(confirm) == "string" then
1399@@ -756,10 +756,10 @@ local function ActivateControl(widget, event, ...)
1400 confirmText = confirmText.." - "..desc
1401 end
1402 end
1403-
1404+
1405 local iscustom = user.rootframe:GetUserData("iscustom")
1406 local rootframe
1407-
1408+
1409 if iscustom then
1410 rootframe = user.rootframe
1411 end
1412@@ -796,7 +796,7 @@ local function ActivateControl(widget, event, ...)
1413 --full refresh of the frame, some controls dont cause this on all events
1414 if option.type == "color" then
1415 if event == "OnValueConfirmed" then
1416-
1417+
1418 if iscustom then
1419 AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
1420 else
1421@@ -1066,7 +1066,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
1422 else
1423 GroupContainer = gui:Create("SimpleGroup")
1424 end
1425-
1426+
1427 GroupContainer.width = "fill"
1428 GroupContainer:SetLayout("flow")
1429 container:AddChild(GroupContainer)
1430@@ -1075,14 +1075,14 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
1431 else
1432 --Control to feed
1433 local control
1434-
1435+
1436 local name = GetOptionsMemberValue("name", v, options, path, appName)
1437-
1438+
1439 if v.type == "execute" then
1440-
1441+
1442 local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
1443 local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
1444-
1445+
1446 if type(image) == "string" or type(image) == "number" then
1447 control = gui:Create("Icon")
1448 if not width then
1449@@ -1117,7 +1117,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
1450 geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType)))
1451 control = gui:Create(v.multiline and "MultiLineEditBox" or "EditBox")
1452 end
1453-
1454+
1455 if v.multiline and control.SetNumLines then
1456 control:SetNumLines(tonumber(v.multiline) or 4)
1457 end
1458@@ -1136,15 +1136,15 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
1459 local value = GetOptionsMemberValue("get",v, options, path, appName)
1460 control:SetValue(value)
1461 control:SetCallback("OnValueChanged",ActivateControl)
1462-
1463+
1464 if v.descStyle == "inline" then
1465 local desc = GetOptionsMemberValue("desc", v, options, path, appName)
1466 control:SetDescription(desc)
1467 end
1468-
1469+
1470 local image = GetOptionsMemberValue("image", v, options, path, appName)
1471 local imageCoords = GetOptionsMemberValue("imageCoords", v, options, path, appName)
1472-
1473+
1474 if type(image) == "string" or type(image) == "number" then
1475 if type(imageCoords) == "table" then
1476 control:SetImage(image, unpack(imageCoords))
1477@@ -1233,9 +1233,9 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
1478 elseif v.type == "multiselect" then
1479 local values = GetOptionsMemberValue("values", v, options, path, appName)
1480 local disabled = CheckOptionDisabled(v, options, path, appName)
1481-
1482+
1483 local controlType = v.dialogControl or v.control
1484-
1485+
1486 local valuesort = new()
1487 if values then
1488 for value, text in pairs(values) do
1489@@ -1243,7 +1243,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
1490 end
1491 end
1492 tsort(valuesort)
1493-
1494+
1495 if controlType then
1496 control = gui:Create(controlType)
1497 if not control then
1498@@ -1311,9 +1311,9 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
1499 control:ResumeLayout()
1500 control:DoLayout()
1501
1502-
1503+
1504 end
1505-
1506+
1507 del(valuesort)
1508
1509 elseif v.type == "color" then
1510@@ -1338,7 +1338,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
1511 elseif v.type == "description" then
1512 control = gui:Create("Label")
1513 control:SetText(name)
1514-
1515+
1516 local fontSize = GetOptionsMemberValue("fontSize",v, options, path, appName)
1517 if fontSize == "medium" then
1518 control:SetFontObject(GameFontHighlight)
1519@@ -1347,10 +1347,10 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
1520 else -- small or invalid
1521 control:SetFontObject(GameFontHighlightSmall)
1522 end
1523-
1524+
1525 local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
1526 local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
1527-
1528+
1529 if type(image) == "string" or type(image) == "number" then
1530 if not width then
1531 width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
1532@@ -1399,7 +1399,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
1533 InjectInfo(control, options, v, path, rootframe, appName)
1534 container:AddChild(control)
1535 end
1536-
1537+
1538 end
1539 end
1540 tremove(path)
1541@@ -1424,7 +1424,7 @@ local function TreeOnButtonEnter(widget, event, uniquevalue, button)
1542 local option = user.option
1543 local path = user.path
1544 local appName = user.appName
1545-
1546+
1547 local feedpath = new()
1548 for i = 1, #path do
1549 feedpath[i] = path[i]
1550@@ -1439,7 +1439,7 @@ local function TreeOnButtonEnter(widget, event, uniquevalue, button)
1551
1552 local name = GetOptionsMemberValue("name", group, options, feedpath, appName)
1553 local desc = GetOptionsMemberValue("desc", group, options, feedpath, appName)
1554-
1555+
1556 GameTooltip:SetOwner(button, "ANCHOR_NONE")
1557 if widget.type == "TabGroup" then
1558 GameTooltip:SetPoint("BOTTOM",button,"TOP")
1559@@ -1448,11 +1448,11 @@ local function TreeOnButtonEnter(widget, event, uniquevalue, button)
1560 end
1561
1562 GameTooltip:SetText(name, 1, .82, 0, true)
1563-
1564+
1565 if type(desc) == "string" then
1566 GameTooltip:AddLine(desc, 1, 1, 1, true)
1567 end
1568-
1569+
1570 GameTooltip:Show()
1571 end
1572
1573@@ -1463,25 +1463,25 @@ end
1574
1575 local function GroupExists(appName, options, path, uniquevalue)
1576 if not uniquevalue then return false end
1577-
1578+
1579 local feedpath = new()
1580 local temppath = new()
1581 for i = 1, #path do
1582 feedpath[i] = path[i]
1583 end
1584-
1585+
1586 BuildPath(feedpath, ("\001"):split(uniquevalue))
1587-
1588+
1589 local group = options
1590 for i = 1, #feedpath do
1591 local v = feedpath[i]
1592 temppath[i] = v
1593 group = GetSubOption(group, v)
1594-
1595- if not group or group.type ~= "group" or CheckOptionHidden(group, options, temppath, appName) then
1596+
1597+ if not group or group.type ~= "group" or CheckOptionHidden(group, options, temppath, appName) then
1598 del(feedpath)
1599 del(temppath)
1600- return false
1601+ return false
1602 end
1603 end
1604 del(feedpath)
1605@@ -1600,7 +1600,7 @@ function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isR
1606 tab:SetCallback("OnGroupSelected", GroupSelected)
1607 tab:SetCallback("OnTabEnter", TreeOnButtonEnter)
1608 tab:SetCallback("OnTabLeave", TreeOnButtonLeave)
1609-
1610+
1611 local status = AceConfigDialog:GetStatusTable(appName, path)
1612 if not status.groups then
1613 status.groups = {}
1614@@ -1620,7 +1620,7 @@ function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isR
1615 break
1616 end
1617 end
1618-
1619+
1620 container:AddChild(tab)
1621
1622 elseif grouptype == "select" then
1623@@ -1643,7 +1643,7 @@ function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isR
1624 if firstgroup then
1625 select:SetGroup((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or firstgroup)
1626 end
1627-
1628+
1629 select.width = "fill"
1630 select.height = "fill"
1631
1632@@ -1655,14 +1655,14 @@ function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isR
1633 local tree = gui:Create("TreeGroup")
1634 InjectInfo(tree, options, group, path, rootframe, appName)
1635 tree:EnableButtonTooltips(false)
1636-
1637+
1638 tree.width = "fill"
1639 tree.height = "fill"
1640
1641 tree:SetCallback("OnGroupSelected", GroupSelected)
1642 tree:SetCallback("OnButtonEnter", TreeOnButtonEnter)
1643 tree:SetCallback("OnButtonLeave", TreeOnButtonLeave)
1644-
1645+
1646 local status = AceConfigDialog:GetStatusTable(appName, path)
1647 if not status.groups then
1648 status.groups = {}
1649@@ -1703,7 +1703,7 @@ local function RefreshOnUpdate(this)
1650 end
1651 this.closing[appName] = nil
1652 end
1653-
1654+
1655 if this.closeAll then
1656 for k, v in pairs(AceConfigDialog.OpenFrames) do
1657 if not this.closeAllOverride[k] then
1658@@ -1713,7 +1713,7 @@ local function RefreshOnUpdate(this)
1659 this.closeAll = nil
1660 wipe(this.closeAllOverride)
1661 end
1662-
1663+
1664 for appName in pairs(this.apps) do
1665 if AceConfigDialog.OpenFrames[appName] then
1666 local user = AceConfigDialog.OpenFrames[appName]:GetUserDataTable()
1667@@ -1798,10 +1798,10 @@ function AceConfigDialog:Open(appName, container, ...)
1668 local options = app("dialog", MAJOR)
1669
1670 local f
1671-
1672+
1673 local path = new()
1674 local name = GetOptionsMemberValue("name", options, options, path, appName)
1675-
1676+
1677 --If an optional path is specified add it to the path table before feeding the options
1678 --as container is optional as well it may contain the first element of the path
1679 if type(container) == "string" then
1680@@ -1811,7 +1811,7 @@ function AceConfigDialog:Open(appName, container, ...)
1681 for n = 1, select("#",...) do
1682 tinsert(path, (select(n, ...)))
1683 end
1684-
1685+
1686 local option = options
1687 if type(container) == "table" and container.type == "BlizOptionsGroup" and #path > 0 then
1688 for i = 1, #path do
1689@@ -1819,7 +1819,7 @@ function AceConfigDialog:Open(appName, container, ...)
1690 end
1691 name = format("%s - %s", name, GetOptionsMemberValue("name", option, options, path, appName))
1692 end
1693-
1694+
1695 --if a container is given feed into that
1696 if container then
1697 f = container
1698@@ -1913,19 +1913,19 @@ end
1699 -- @param name A descriptive name to display in the options tree (defaults to appName)
1700 -- @param parent The parent to use in the interface options tree.
1701 -- @param ... The path in the options table to feed into the interface options panel.
1702--- @return The reference to the frame registered into the Interface Options.
1703+-- @return The reference to the frame registered into the Interface Options.
1704 function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
1705 local BlizOptions = AceConfigDialog.BlizOptions
1706-
1707+
1708 local key = appName
1709 for n = 1, select("#", ...) do
1710 key = key.."\001"..select(n, ...)
1711 end
1712-
1713+
1714 if not BlizOptions[appName] then
1715 BlizOptions[appName] = {}
1716 end
1717-
1718+
1719 if not BlizOptions[appName][key] then
1720 local group = gui:Create("BlizOptionsGroup")
1721 BlizOptions[appName][key] = group
1722diff --git AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
1723index 94f1e84..2455d17 100644
1724--- AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
1725+++ AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
1726@@ -4,7 +4,7 @@
1727 -- * Valid **uiTypes**: "cmd", "dropdown", "dialog". This is verified by the library at call time. \\
1728 -- * The **uiName** field is expected to contain the full name of the calling addon, including version, e.g. "FooBar-1.0". This is verified by the library at call time.\\
1729 -- * The **appName** field is the options table name as given at registration time \\
1730---
1731+--
1732 -- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
1733 -- @class file
1734 -- @name AceConfigRegistry-3.0
1735@@ -33,7 +33,7 @@ local error, assert = error, assert
1736
1737
1738 AceConfigRegistry.validated = {
1739- -- list of options table names ran through :ValidateOptionsTable automatically.
1740+ -- list of options table names ran through :ValidateOptionsTable automatically.
1741 -- CLEARED ON PURPOSE, since newer versions may have newer validators
1742 cmd = {},
1743 dropdown = {},
1744@@ -145,8 +145,8 @@ local typedkeys={
1745 select={
1746 values=ismethodtable,
1747 style={
1748- ["nil"]=true,
1749- ["string"]={dropdown=true,radio=true},
1750+ ["nil"]=true,
1751+ ["string"]={dropdown=true,radio=true},
1752 _="string: 'dropdown' or 'radio'"
1753 },
1754 control=optstring,
1755@@ -203,13 +203,13 @@ local function validate(options,errlvl,...)
1756 if type(options.type)~="string" then
1757 err(".type: expected a string, got a "..type(options.type), errlvl,...)
1758 end
1759-
1760+
1761 -- get type and 'typedkeys' member
1762 local tk = typedkeys[options.type]
1763 if not tk then
1764 err(".type: unknown type '"..options.type.."'", errlvl,...)
1765 end
1766-
1767+
1768 -- make sure that all options[] are known parameters
1769 for k,v in pairs(options) do
1770 if not (tk[k] or basekeys[k]) then
1771@@ -302,7 +302,7 @@ function AceConfigRegistry:RegisterOptionsTable(appName, options, skipValidation
1772 AceConfigRegistry:ValidateOptionsTable(options, appName, errlvl) -- upgradable
1773 AceConfigRegistry.validated[uiType][appName] = true
1774 end
1775- return options
1776+ return options
1777 end
1778 elseif type(options)=="function" then
1779 AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
1780@@ -340,7 +340,7 @@ function AceConfigRegistry:GetOptionsTable(appName, uiType, uiName)
1781 if not f then
1782 return nil
1783 end
1784-
1785+
1786 if uiType then
1787 return f(uiType,uiName,1) -- get the table for us
1788 else
1789diff --git AceConsole-3.0/AceConsole-3.0.lua AceConsole-3.0/AceConsole-3.0.lua
1790index 1a90292..3f46b36 100644
1791--- AceConsole-3.0/AceConsole-3.0.lua
1792+++ AceConsole-3.0/AceConsole-3.0.lua
1793@@ -2,7 +2,7 @@
1794 -- You can register slash commands to your custom functions and use the `GetArgs` function to parse them
1795 -- to your addons individual needs.
1796 --
1797--- **AceConsole-3.0** can be embeded into your addon, either explicitly by calling AceConsole:Embed(MyAddon) or by
1798+-- **AceConsole-3.0** can be embeded into your addon, either explicitly by calling AceConsole:Embed(MyAddon) or by
1799 -- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
1800 -- and can be accessed directly, without having to explicitly call AceConsole itself.\\
1801 -- It is recommended to embed AceConsole, otherwise you'll have to specify a custom `self` on all calls you
1802@@ -84,11 +84,11 @@ end
1803 -- @param persist if false, the command will be soft disabled/enabled when aceconsole is used as a mixin (default: true)
1804 function AceConsole:RegisterChatCommand( command, func, persist )
1805 if type(command)~="string" then error([[Usage: AceConsole:RegisterChatCommand( "command", func[, persist ]): 'command' - expected a string]], 2) end
1806-
1807+
1808 if persist==nil then persist=true end -- I'd rather have my addon's "/addon enable" around if the author screws up. Having some extra slash regged when it shouldnt be isn't as destructive. True is a better default. /Mikk
1809-
1810+
1811 local name = "ACECONSOLE_"..command:upper()
1812-
1813+
1814 if type( func ) == "string" then
1815 SlashCmdList[name] = function(input, editBox)
1816 self[func](self, input, editBox)
1817@@ -132,9 +132,9 @@ local function nils(n, ...)
1818 return ...
1819 end
1820 end
1821-
1822
1823---- Retreive one or more space-separated arguments from a string.
1824+
1825+--- Retreive one or more space-separated arguments from a string.
1826 -- Treats quoted strings and itemlinks as non-spaced.
1827 -- @param str The raw argument string
1828 -- @param numargs How many arguments to get (default 1)
1829@@ -144,7 +144,7 @@ end
1830 function AceConsole:GetArgs(str, numargs, startpos)
1831 numargs = numargs or 1
1832 startpos = max(startpos or 1, 1)
1833-
1834+
1835 local pos=startpos
1836
1837 -- find start of new arg
1838@@ -169,24 +169,24 @@ function AceConsole:GetArgs(str, numargs, startpos)
1839 else
1840 delim_or_pipe="([| ])"
1841 end
1842-
1843+
1844 startpos = pos
1845-
1846+
1847 while true do
1848 -- find delimiter or hyperlink
1849 local ch,_
1850 pos,_,ch = strfind(str, delim_or_pipe, pos)
1851-
1852+
1853 if not pos then break end
1854-
1855+
1856 if ch=="|" then
1857 -- some kind of escape
1858-
1859+
1860 if strsub(str,pos,pos+1)=="|H" then
1861 -- It's a |H....|hhyper link!|h
1862 pos=strfind(str, "|h", pos+2) -- first |h
1863 if not pos then break end
1864-
1865+
1866 pos=strfind(str, "|h", pos+2) -- second |h
1867 if not pos then break end
1868 elseif strsub(str,pos, pos+1) == "|T" then
1869@@ -194,16 +194,16 @@ function AceConsole:GetArgs(str, numargs, startpos)
1870 pos=strfind(str, "|t", pos+2)
1871 if not pos then break end
1872 end
1873-
1874+
1875 pos=pos+2 -- skip past this escape (last |h if it was a hyperlink)
1876-
1877+
1878 else
1879 -- found delimiter, done with this arg
1880 return strsub(str, startpos, pos-1), AceConsole:GetArgs(str, numargs-1, pos+1)
1881 end
1882-
1883+
1884 end
1885-
1886+
1887 -- search aborted, we hit end of string. return it all as one argument. (yes, even if it's an unterminated quote or hyperlink)
1888 return strsub(str, startpos), nils(numargs-1, 1e9)
1889 end
1890@@ -214,10 +214,10 @@ end
1891 local mixins = {
1892 "Print",
1893 "Printf",
1894- "RegisterChatCommand",
1895+ "RegisterChatCommand",
1896 "UnregisterChatCommand",
1897 "GetArgs",
1898-}
1899+}
1900
1901 -- Embeds AceConsole into the target object making the functions from the mixins list available on target:..
1902 -- @param target target object to embed AceBucket in
1903diff --git AceDBOptions-3.0/AceDBOptions-3.0.lua AceDBOptions-3.0/AceDBOptions-3.0.lua
1904index a27491c..3c23951 100644
1905--- AceDBOptions-3.0/AceDBOptions-3.0.lua
1906+++ AceDBOptions-3.0/AceDBOptions-3.0.lua
1907@@ -240,22 +240,22 @@ local tmpprofiles = {}
1908 -- @return Hashtable of all profiles with the internal name as keys and the display name as value.
1909 local function getProfileList(db, common, nocurrent)
1910 local profiles = {}
1911-
1912+
1913 -- copy existing profiles into the table
1914 local currentProfile = db:GetCurrentProfile()
1915- for i,v in pairs(db:GetProfiles(tmpprofiles)) do
1916- if not (nocurrent and v == currentProfile) then
1917- profiles[v] = v
1918- end
1919+ for i,v in pairs(db:GetProfiles(tmpprofiles)) do
1920+ if not (nocurrent and v == currentProfile) then
1921+ profiles[v] = v
1922+ end
1923 end
1924-
1925+
1926 -- add our default profiles to choose from ( or rename existing profiles)
1927 for k,v in pairs(defaultProfiles) do
1928 if (common or profiles[k]) and not (nocurrent and k == currentProfile) then
1929 profiles[k] = v
1930 end
1931 end
1932-
1933+
1934 return profiles
1935 end
1936
1937@@ -280,11 +280,11 @@ function OptionsHandlerPrototype:GetCurrentProfile()
1938 return self.db:GetCurrentProfile()
1939 end
1940
1941---[[
1942+--[[
1943 List all active profiles
1944 you can control the output with the .arg variable
1945 currently four modes are supported
1946-
1947+
1948 (empty) - return all available profiles
1949 "nocurrent" - returns all available profiles except the currently active profile
1950 "common" - returns all avaialble profiles + some commonly used profiles ("char - realm", "realm", "class", "Default")
1951@@ -302,7 +302,7 @@ function OptionsHandlerPrototype:ListProfiles(info)
1952 else
1953 profiles = getProfileList(self.db)
1954 end
1955-
1956+
1957 return profiles
1958 end
1959
1960@@ -336,19 +336,19 @@ local function getOptionsHandler(db, noDefaultProfiles)
1961 if not defaultProfiles then
1962 generateDefaultProfiles(db)
1963 end
1964-
1965+
1966 local handler = AceDBOptions.handlers[db] or { db = db, noDefaultProfiles = noDefaultProfiles }
1967-
1968+
1969 for k,v in pairs(OptionsHandlerPrototype) do
1970 handler[k] = v
1971 end
1972-
1973+
1974 AceDBOptions.handlers[db] = handler
1975 return handler
1976 end
1977
1978 --[[
1979- the real options table
1980+ the real options table
1981 ]]
1982 local optionsTable = {
1983 desc = {
1984@@ -436,7 +436,7 @@ local optionsTable = {
1985 --- Get/Create a option table that you can use in your addon to control the profiles of AceDB-3.0.
1986 -- @param db The database object to create the options table for.
1987 -- @return The options table to be used in AceConfig-3.0
1988--- @usage
1989+-- @usage
1990 -- -- Assuming `options` is your top-level options table and `self.db` is your database:
1991 -- options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
1992 function AceDBOptions:GetOptionsTable(db, noDefaultProfiles)
1993@@ -445,7 +445,7 @@ function AceDBOptions:GetOptionsTable(db, noDefaultProfiles)
1994 name = L["profiles"],
1995 desc = L["profiles_sub"],
1996 }
1997-
1998+
1999 tbl.handler = getOptionsHandler(db, noDefaultProfiles)
2000 tbl.args = optionsTable
2001
2002diff --git AceEvent-3.0/AceEvent-3.0.lua AceEvent-3.0/AceEvent-3.0.lua
2003index 20cbd31..9f96bf3 100644
2004--- AceEvent-3.0/AceEvent-3.0.lua
2005+++ AceEvent-3.0/AceEvent-3.0.lua
2006@@ -2,7 +2,7 @@
2007 -- All dispatching is done using **CallbackHandler-1.0**. AceEvent is a simple wrapper around
2008 -- CallbackHandler, and dispatches all game events or addon message to the registrees.
2009 --
2010--- **AceEvent-3.0** can be embeded into your addon, either explicitly by calling AceEvent:Embed(MyAddon) or by
2011+-- **AceEvent-3.0** can be embeded into your addon, either explicitly by calling AceEvent:Embed(MyAddon) or by
2012 -- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
2013 -- and can be accessed directly, without having to explicitly call AceEvent itself.\\
2014 -- It is recommended to embed AceEvent, otherwise you'll have to specify a custom `self` on all calls you
2015@@ -25,22 +25,22 @@ AceEvent.embeds = AceEvent.embeds or {} -- what objects embed this lib
2016
2017 -- APIs and registry for blizzard events, using CallbackHandler lib
2018 if not AceEvent.events then
2019- AceEvent.events = CallbackHandler:New(AceEvent,
2020+ AceEvent.events = CallbackHandler:New(AceEvent,
2021 "RegisterEvent", "UnregisterEvent", "UnregisterAllEvents")
2022 end
2023
2024-function AceEvent.events:OnUsed(target, eventname)
2025+function AceEvent.events:OnUsed(target, eventname)
2026 AceEvent.frame:RegisterEvent(eventname)
2027 end
2028
2029-function AceEvent.events:OnUnused(target, eventname)
2030+function AceEvent.events:OnUnused(target, eventname)
2031 AceEvent.frame:UnregisterEvent(eventname)
2032 end
2033
2034
2035 -- APIs and registry for IPC messages, using CallbackHandler lib
2036 if not AceEvent.messages then
2037- AceEvent.messages = CallbackHandler:New(AceEvent,
2038+ AceEvent.messages = CallbackHandler:New(AceEvent,
2039 "RegisterMessage", "UnregisterMessage", "UnregisterAllMessages"
2040 )
2041 AceEvent.SendMessage = AceEvent.messages.Fire
2042diff --git AceGUI-3.0/AceGUI-3.0.lua AceGUI-3.0/AceGUI-3.0.lua
2043index 0ea4ffd..c7994b4 100644
2044--- AceGUI-3.0/AceGUI-3.0.lua
2045+++ AceGUI-3.0/AceGUI-3.0.lua
2046@@ -1,6 +1,6 @@
2047 --- **AceGUI-3.0** provides access to numerous widgets which can be used to create GUIs.
2048 -- AceGUI is used by AceConfigDialog to create the option GUIs, but you can use it by itself
2049--- to create any custom GUI. There are more extensive examples in the test suite in the Ace3
2050+-- to create any custom GUI. There are more extensive examples in the test suite in the Ace3
2051 -- stand-alone distribution.
2052 --
2053 -- **Note**: When using AceGUI-3.0 directly, please do not modify the frames of the widgets directly,
2054@@ -51,7 +51,7 @@ AceGUI.LayoutRegistry = AceGUI.LayoutRegistry or {}
2055 AceGUI.WidgetBase = AceGUI.WidgetBase or {}
2056 AceGUI.WidgetContainerBase = AceGUI.WidgetContainerBase or {}
2057 AceGUI.WidgetVersions = AceGUI.WidgetVersions or {}
2058-
2059+
2060 -- local upvalues
2061 local WidgetRegistry = AceGUI.WidgetRegistry
2062 local LayoutRegistry = AceGUI.LayoutRegistry
2063@@ -79,7 +79,7 @@ do
2064 -- Internal Storage of the objects changed, from an array table
2065 -- to a hash table, and additionally we introduced versioning on
2066 -- the widgets which would discard all widgets from a pre-29 version
2067- -- anyway, so we just clear the storage now, and don't try to
2068+ -- anyway, so we just clear the storage now, and don't try to
2069 -- convert the storage tables to the new format.
2070 -- This should generally not cause *many* widgets to end up in trash,
2071 -- since once dialogs are opened, all addons should be loaded already
2072@@ -89,7 +89,7 @@ do
2073 if oldminor and oldminor < 29 and AceGUI.objPools then
2074 AceGUI.objPools = nil
2075 end
2076-
2077+
2078 AceGUI.objPools = AceGUI.objPools or {}
2079 local objPools = AceGUI.objPools
2080 --Returns a new instance, if none are available either returns a new table or calls the given contructor
2081@@ -97,11 +97,11 @@ do
2082 if not WidgetRegistry[type] then
2083 error("Attempt to instantiate unknown widget type", 2)
2084 end
2085-
2086+
2087 if not objPools[type] then
2088 objPools[type] = {}
2089 end
2090-
2091+
2092 local newObj = next(objPools[type])
2093 if not newObj then
2094 newObj = WidgetRegistry[type]()
2095@@ -151,12 +151,12 @@ function AceGUI:Create(type)
2096 widget.OnAcquire = widget.Aquire
2097 widget.Aquire = nil
2098 end
2099-
2100+
2101 if rawget(widget, "Release") then
2102- widget.OnRelease = rawget(widget, "Release")
2103+ widget.OnRelease = rawget(widget, "Release")
2104 widget.Release = nil
2105 end
2106-
2107+
2108 if widget.OnAcquire then
2109 widget:OnAcquire()
2110 else
2111@@ -238,18 +238,18 @@ end
2112 --[[
2113 Widgets must provide the following functions
2114 OnAcquire() - Called when the object is acquired, should set everything to a default hidden state
2115-
2116+
2117 And the following members
2118 frame - the frame or derivitive object that will be treated as the widget for size and anchoring purposes
2119 type - the type of the object, same as the name given to :RegisterWidget()
2120-
2121+
2122 Widgets contain a table called userdata, this is a safe place to store data associated with the wigdet
2123 It will be cleared automatically when a widget is released
2124 Placing values directly into a widget object should be avoided
2125-
2126+
2127 If the Widget can act as a container for other Widgets the following
2128 content - frame or derivitive that children will be anchored to
2129-
2130+
2131 The Widget can supply the following Optional Members
2132 :OnRelease() - Called when the object is Released, should remove any additional anchors and clear any data
2133 :OnWidthSet(width) - Called when the width of the widget is changed
2134@@ -265,21 +265,21 @@ end
2135 -- Widget Base Template --
2136 --------------------------
2137 do
2138- local WidgetBase = AceGUI.WidgetBase
2139-
2140+ local WidgetBase = AceGUI.WidgetBase
2141+
2142 WidgetBase.SetParent = function(self, parent)
2143 local frame = self.frame
2144 frame:SetParent(nil)
2145 frame:SetParent(parent.content)
2146 self.parent = parent
2147 end
2148-
2149+
2150 WidgetBase.SetCallback = function(self, name, func)
2151 if type(func) == "function" then
2152 self.events[name] = func
2153 end
2154 end
2155-
2156+
2157 WidgetBase.Fire = function(self, name, ...)
2158 if self.events[name] then
2159 local success, ret = safecall(self.events[name], self, name, ...)
2160@@ -288,7 +288,7 @@ do
2161 end
2162 end
2163 end
2164-
2165+
2166 WidgetBase.SetWidth = function(self, width)
2167 self.frame:SetWidth(width)
2168 self.frame.width = width
2169@@ -296,7 +296,7 @@ do
2170 self:OnWidthSet(width)
2171 end
2172 end
2173-
2174+
2175 WidgetBase.SetRelativeWidth = function(self, width)
2176 if width <= 0 or width > 1 then
2177 error(":SetRelativeWidth(width): Invalid relative width.", 2)
2178@@ -304,7 +304,7 @@ do
2179 self.relWidth = width
2180 self.width = "relative"
2181 end
2182-
2183+
2184 WidgetBase.SetHeight = function(self, height)
2185 self.frame:SetHeight(height)
2186 self.frame.height = height
2187@@ -312,7 +312,7 @@ do
2188 self:OnHeightSet(height)
2189 end
2190 end
2191-
2192+
2193 --[[ WidgetBase.SetRelativeHeight = function(self, height)
2194 if height <= 0 or height > 1 then
2195 error(":SetRelativeHeight(height): Invalid relative height.", 2)
2196@@ -324,47 +324,47 @@ do
2197 WidgetBase.IsVisible = function(self)
2198 return self.frame:IsVisible()
2199 end
2200-
2201+
2202 WidgetBase.IsShown= function(self)
2203 return self.frame:IsShown()
2204 end
2205-
2206+
2207 WidgetBase.Release = function(self)
2208 AceGUI:Release(self)
2209 end
2210-
2211+
2212 WidgetBase.SetPoint = function(self, ...)
2213 return self.frame:SetPoint(...)
2214 end
2215-
2216+
2217 WidgetBase.ClearAllPoints = function(self)
2218 return self.frame:ClearAllPoints()
2219 end
2220-
2221+
2222 WidgetBase.GetNumPoints = function(self)
2223 return self.frame:GetNumPoints()
2224 end
2225-
2226+
2227 WidgetBase.GetPoint = function(self, ...)
2228 return self.frame:GetPoint(...)
2229- end
2230-
2231+ end
2232+
2233 WidgetBase.GetUserDataTable = function(self)
2234 return self.userdata
2235 end
2236-
2237+
2238 WidgetBase.SetUserData = function(self, key, value)
2239 self.userdata[key] = value
2240 end
2241-
2242+
2243 WidgetBase.GetUserData = function(self, key)
2244 return self.userdata[key]
2245 end
2246-
2247+
2248 WidgetBase.IsFullHeight = function(self)
2249 return self.height == "fill"
2250 end
2251-
2252+
2253 WidgetBase.SetFullHeight = function(self, isFull)
2254 if isFull then
2255 self.height = "fill"
2256@@ -372,11 +372,11 @@ do
2257 self.height = nil
2258 end
2259 end
2260-
2261+
2262 WidgetBase.IsFullWidth = function(self)
2263 return self.width == "fill"
2264 end
2265-
2266+
2267 WidgetBase.SetFullWidth = function(self, isFull)
2268 if isFull then
2269 self.width = "fill"
2270@@ -384,29 +384,29 @@ do
2271 self.width = nil
2272 end
2273 end
2274-
2275+
2276 -- local function LayoutOnUpdate(this)
2277 -- this:SetScript("OnUpdate",nil)
2278 -- this.obj:PerformLayout()
2279 -- end
2280-
2281+
2282 local WidgetContainerBase = AceGUI.WidgetContainerBase
2283-
2284+
2285 WidgetContainerBase.PauseLayout = function(self)
2286 self.LayoutPaused = true
2287 end
2288-
2289+
2290 WidgetContainerBase.ResumeLayout = function(self)
2291 self.LayoutPaused = nil
2292 end
2293-
2294+
2295 WidgetContainerBase.PerformLayout = function(self)
2296 if self.LayoutPaused then
2297 return
2298 end
2299 safecall(self.LayoutFunc, self.content, self.children)
2300 end
2301-
2302+
2303 --call this function to layout, makes sure layed out objects get a frame to get sizes etc
2304 WidgetContainerBase.DoLayout = function(self)
2305 self:PerformLayout()
2306@@ -414,7 +414,7 @@ do
2307 -- self.frame:SetScript("OnUpdate", LayoutOnUpdate)
2308 -- end
2309 end
2310-
2311+
2312 WidgetContainerBase.AddChild = function(self, child, beforeWidget)
2313 if beforeWidget then
2314 local siblingIndex = 1
2315@@ -422,7 +422,7 @@ do
2316 if widget == beforeWidget then
2317 break
2318 end
2319- siblingIndex = siblingIndex + 1
2320+ siblingIndex = siblingIndex + 1
2321 end
2322 tinsert(self.children, siblingIndex, child)
2323 else
2324@@ -432,7 +432,7 @@ do
2325 child.frame:Show()
2326 self:DoLayout()
2327 end
2328-
2329+
2330 WidgetContainerBase.AddChildren = function(self, ...)
2331 for i = 1, select("#", ...) do
2332 local child = select(i, ...)
2333@@ -442,7 +442,7 @@ do
2334 end
2335 self:DoLayout()
2336 end
2337-
2338+
2339 WidgetContainerBase.ReleaseChildren = function(self)
2340 local children = self.children
2341 for i = 1,#children do
2342@@ -450,7 +450,7 @@ do
2343 children[i] = nil
2344 end
2345 end
2346-
2347+
2348 WidgetContainerBase.SetLayout = function(self, Layout)
2349 self.LayoutFunc = AceGUI:GetLayout(Layout)
2350 end
2351@@ -474,7 +474,7 @@ do
2352 end
2353 end
2354 end
2355-
2356+
2357 local function ContentResize(this)
2358 if this:GetWidth() and this:GetHeight() then
2359 this.width = this:GetWidth()
2360@@ -486,7 +486,7 @@ do
2361 setmetatable(WidgetContainerBase, {__index=WidgetBase})
2362
2363 --One of these function should be called on each Widget Instance as part of its creation process
2364-
2365+
2366 --- Register a widget-class as a container for newly created widgets.
2367 -- @param widget The widget class
2368 function AceGUI:RegisterAsContainer(widget)
2369@@ -502,7 +502,7 @@ do
2370 widget:SetLayout("List")
2371 return widget
2372 end
2373-
2374+
2375 --- Register a widget-class as a widget.
2376 -- @param widget The widget class
2377 function AceGUI:RegisterAsWidget(widget)
2378@@ -529,11 +529,11 @@ end
2379 -- @param Version The version of the widget
2380 function AceGUI:RegisterWidgetType(Name, Constructor, Version)
2381 assert(type(Constructor) == "function")
2382- assert(type(Version) == "number")
2383-
2384+ assert(type(Version) == "number")
2385+
2386 local oldVersion = WidgetVersions[Name]
2387 if oldVersion and oldVersion >= Version then return end
2388-
2389+
2390 WidgetVersions[Name] = Version
2391 WidgetRegistry[Name] = Constructor
2392 end
2393@@ -602,7 +602,7 @@ AceGUI:RegisterLayout("List",
2394 local width = content.width or content:GetWidth() or 0
2395 for i = 1, #children do
2396 local child = children[i]
2397-
2398+
2399 local frame = child.frame
2400 frame:ClearAllPoints()
2401 frame:Show()
2402@@ -611,22 +611,22 @@ AceGUI:RegisterLayout("List",
2403 else
2404 frame:SetPoint("TOPLEFT", children[i-1].frame, "BOTTOMLEFT")
2405 end
2406-
2407+
2408 if child.width == "fill" then
2409 child:SetWidth(width)
2410 frame:SetPoint("RIGHT", content)
2411-
2412+
2413 if child.DoLayout then
2414 child:DoLayout()
2415 end
2416 elseif child.width == "relative" then
2417 child:SetWidth(width * child.relWidth)
2418-
2419+
2420 if child.DoLayout then
2421 child:DoLayout()
2422 end
2423 end
2424-
2425+
2426 height = height + (frame.height or frame:GetHeight() or 0)
2427 end
2428 safecall(content.obj.LayoutFinished, content.obj, nil, height)
2429@@ -661,17 +661,17 @@ AceGUI:RegisterLayout("Flow",
2430 --height of the current row
2431 local rowheight = 0
2432 local rowoffset = 0
2433-
2434+
2435 local width = content.width or content:GetWidth() or 0
2436-
2437+
2438 --control at the start of the row
2439 local rowstart
2440 local rowstartoffset
2441 local isfullheight
2442-
2443+
2444 local frameoffset
2445 local lastframeoffset
2446- local oversize
2447+ local oversize
2448 for i = 1, #children do
2449 local child = children[i]
2450 oversize = nil
2451@@ -679,17 +679,17 @@ AceGUI:RegisterLayout("Flow",
2452 local frameheight = frame.height or frame:GetHeight() or 0
2453 local framewidth = frame.width or frame:GetWidth() or 0
2454 lastframeoffset = frameoffset
2455- -- HACK: Why did we set a frameoffset of (frameheight / 2) ?
2456+ -- HACK: Why did we set a frameoffset of (frameheight / 2) ?
2457 -- That was moving all widgets half the widgets size down, is that intended?
2458 -- Actually, it seems to be neccessary for many cases, we'll leave it in for now.
2459 -- If widgets seem to anchor weirdly with this, provide a valid alignoffset for them.
2460 -- TODO: Investigate moar!
2461 frameoffset = child.alignoffset or (frameheight / 2)
2462-
2463+
2464 if child.width == "relative" then
2465 framewidth = width * child.relWidth
2466 end
2467-
2468+
2469 frame:Show()
2470 frame:ClearAllPoints()
2471 if i == 1 then
2472@@ -728,11 +728,11 @@ AceGUI:RegisterLayout("Flow",
2473 else
2474 --handles cases where the new height is higher than either control because of the offsets
2475 --math.max(rowheight-rowoffset+frameoffset, frameheight-frameoffset+rowoffset)
2476-
2477+
2478 --offset is always the larger of the two offsets
2479 rowoffset = math_max(rowoffset, frameoffset)
2480 rowheight = math_max(rowheight, rowoffset + (frameheight / 2))
2481-
2482+
2483 frame:SetPoint("TOPLEFT", children[i-1].frame, "TOPRIGHT", 0, frameoffset - lastframeoffset)
2484 usedwidth = framewidth + usedwidth
2485 end
2486@@ -741,11 +741,11 @@ AceGUI:RegisterLayout("Flow",
2487 if child.width == "fill" then
2488 safelayoutcall(child, "SetWidth", width)
2489 frame:SetPoint("RIGHT", content)
2490-
2491+
2492 usedwidth = 0
2493 rowstart = frame
2494 rowstartoffset = frameoffset
2495-
2496+
2497 if child.DoLayout then
2498 child:DoLayout()
2499 end
2500@@ -754,7 +754,7 @@ AceGUI:RegisterLayout("Flow",
2501 rowstartoffset = rowoffset
2502 elseif child.width == "relative" then
2503 safelayoutcall(child, "SetWidth", width * child.relWidth)
2504-
2505+
2506 if child.DoLayout then
2507 child:DoLayout()
2508 end
2509@@ -763,20 +763,20 @@ AceGUI:RegisterLayout("Flow",
2510 frame:SetPoint("RIGHT", content)
2511 end
2512 end
2513-
2514+
2515 if child.height == "fill" then
2516 frame:SetPoint("BOTTOM", content)
2517 isfullheight = true
2518 end
2519 end
2520-
2521+
2522 --anchor the last row, if its full height needs a special case since its height has just been changed by the anchor
2523 if isfullheight then
2524 rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -height)
2525 elseif rowstart then
2526 rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -(height + (rowoffset - rowstartoffset) + 3))
2527 end
2528-
2529+
2530 height = height + rowheight + 3
2531 safecall(content.obj.LayoutFinished, content.obj, nil, height)
2532 end)
2533@@ -840,7 +840,7 @@ AceGUI:RegisterLayout("Table",
2534 local spaceH = tableObj.spaceH or tableObj.space or 0
2535 local spaceV = tableObj.spaceV or tableObj.space or 0
2536 local totalH = (content:GetWidth() or content.width or 0) - spaceH * (#cols - 1)
2537-
2538+
2539 -- We need to reuse these because layout events can come in very frequently
2540 local layoutCache = obj:GetUserData("layoutCache")
2541 if not layoutCache then
2542@@ -848,7 +848,7 @@ AceGUI:RegisterLayout("Table",
2543 obj:SetUserData("layoutCache", layoutCache)
2544 end
2545 local t, laneH, laneV, rowspans, rowStart, colStart = unpack(layoutCache)
2546-
2547+
2548 -- Create the grid
2549 local n, slotFound = 0
2550 for i,child in ipairs(children) do
2551@@ -913,7 +913,7 @@ AceGUI:RegisterLayout("Table",
2552 local f = child.frame
2553 f:ClearAllPoints()
2554 local childH = f:GetWidth() or 0
2555-
2556+
2557 laneH[col] = max(laneH[col], childH - GetCellDimension("H", laneH, colStart[child], col - 1, spaceH))
2558 end
2559 end
2560@@ -947,7 +947,7 @@ AceGUI:RegisterLayout("Table",
2561 local cellObj = child:GetUserData("cell")
2562 local offsetH = GetCellDimension("H", laneH, 1, colStart[child] - 1, spaceH) + (colStart[child] == 1 and 0 or spaceH)
2563 local cellH = GetCellDimension("H", laneH, colStart[child], col, spaceH)
2564-
2565+
2566 local f = child.frame
2567 f:ClearAllPoints()
2568 local childH = f:GetWidth() or 0
2569@@ -957,7 +957,7 @@ AceGUI:RegisterLayout("Table",
2570 if child:IsFullWidth() or alignFn == "fill" or childH > cellH then
2571 f:SetPoint("RIGHT", content, "LEFT", offsetH + align + cellH, 0)
2572 end
2573-
2574+
2575 if child.DoLayout then
2576 child:DoLayout()
2577 end
2578@@ -976,7 +976,7 @@ AceGUI:RegisterLayout("Table",
2579 local cellObj = child:GetUserData("cell")
2580 local offsetV = GetCellDimension("V", laneV, 1, rowStart[child] - 1, spaceV) + (rowStart[child] == 1 and 0 or spaceV)
2581 local cellV = GetCellDimension("V", laneV, rowStart[child], row, spaceV)
2582-
2583+
2584 local f = child.frame
2585 local childV = f:GetHeight() or 0
2586
2587@@ -991,7 +991,7 @@ AceGUI:RegisterLayout("Table",
2588
2589 -- Calculate total height
2590 local totalV = GetCellDimension("V", laneV, 1, #laneV, spaceV)
2591-
2592+
2593 -- Cleanup
2594 for _,v in pairs(layoutCache) do wipe(v) end
2595
2596diff --git AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
2597index b0f81b7..4b09d64 100644
2598--- AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
2599+++ AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
2600@@ -150,7 +150,7 @@ local function Constructor()
2601 widget[method] = func
2602 end
2603 dropdown.parentgroup = widget
2604-
2605+
2606 return AceGUI:RegisterAsContainer(widget)
2607 end
2608
2609diff --git AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
2610index eb8e215..d110d03 100644
2611--- AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
2612+++ AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
2613@@ -40,7 +40,7 @@ end
2614 Methods
2615 -------------------------------------------------------------------------------]]
2616 local methods = {
2617- ["OnAcquire"] = function(self)
2618+ ["OnAcquire"] = function(self)
2619 self:SetScroll(0)
2620 self.scrollframe:SetScript("OnUpdate", FixScrollOnUpdate)
2621 end,
2622@@ -77,7 +77,7 @@ local methods = {
2623 ["MoveScroll"] = function(self, value)
2624 local status = self.status or self.localstatus
2625 local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight()
2626-
2627+
2628 if self.scrollBarShown then
2629 local diff = height - viewheight
2630 local delta = 1
2631diff --git AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
2632index 9129f9d..053e27d 100644
2633--- AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
2634+++ AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
2635@@ -161,21 +161,21 @@ local methods = {
2636 self.tablist = tabs
2637 self:BuildTabs()
2638 end,
2639-
2640+
2641
2642 ["BuildTabs"] = function(self)
2643 local hastitle = (self.titletext:GetText() and self.titletext:GetText() ~= "")
2644 local tablist = self.tablist
2645 local tabs = self.tabs
2646-
2647+
2648 if not tablist then return end
2649-
2650+
2651 local width = self.frame.width or self.frame:GetWidth() or 0
2652-
2653+
2654 wipe(widths)
2655 wipe(rowwidths)
2656 wipe(rowends)
2657-
2658+
2659 --Place Text into tabs and get thier initial width
2660 for i, v in ipairs(tablist) do
2661 local tab = tabs[i]
2662@@ -183,19 +183,19 @@ local methods = {
2663 tab = self:CreateTab(i)
2664 tabs[i] = tab
2665 end
2666-
2667+
2668 tab:Show()
2669 tab:SetText(v.text)
2670 tab:SetDisabled(v.disabled)
2671 tab.value = v.value
2672-
2673+
2674 widths[i] = tab:GetWidth() - 6 --tabs are anchored 10 pixels from the right side of the previous one to reduce spacing, but add a fixed 4px padding for the text
2675 end
2676-
2677+
2678 for i = (#tablist)+1, #tabs, 1 do
2679 tabs[i]:Hide()
2680 end
2681-
2682+
2683 --First pass, find the minimum number of rows needed to hold all tabs and the initial tab layout
2684 local numtabs = #tablist
2685 local numrows = 1
2686@@ -213,7 +213,7 @@ local methods = {
2687 end
2688 rowwidths[numrows] = usedwidth + 10 --first tab in each row takes up an extra 10px
2689 rowends[numrows] = #tablist
2690-
2691+
2692 --Fix for single tabs being left on the last row, move a tab from the row above if applicable
2693 if numrows > 1 then
2694 --if the last row has only one tab
2695@@ -244,22 +244,22 @@ local methods = {
2696 tab:SetPoint("LEFT", tabs[tabno-1], "RIGHT", -10, 0)
2697 end
2698 end
2699-
2700+
2701 -- equal padding for each tab to fill the available width,
2702 -- if the used space is above 75% already
2703- -- the 18 pixel is the typical width of a scrollbar, so we can have a tab group inside a scrolling frame,
2704+ -- the 18 pixel is the typical width of a scrollbar, so we can have a tab group inside a scrolling frame,
2705 -- and not have the tabs jump around funny when switching between tabs that need scrolling and those that don't
2706 local padding = 0
2707 if not (numrows == 1 and rowwidths[1] < width*0.75 - 18) then
2708 padding = (width - rowwidths[row]) / (endtab - starttab+1)
2709 end
2710-
2711+
2712 for i = starttab, endtab do
2713 PanelTemplates_TabResize(tabs[i], padding + 4, nil, nil, width, tabs[i]:GetFontString():GetStringWidth())
2714 end
2715 starttab = endtab + 1
2716 end
2717-
2718+
2719 self.borderoffset = (hastitle and 17 or 10)+((numrows)*20)
2720 self.border:SetPoint("TOPLEFT", 1, -self.borderoffset)
2721 end,
2722@@ -285,7 +285,7 @@ local methods = {
2723 content:SetHeight(contentheight)
2724 content.height = contentheight
2725 end,
2726-
2727+
2728 ["LayoutFinished"] = function(self, width, height)
2729 if self.noAutoHeight then return end
2730 self:SetHeight((height or 0) + (self.borderoffset + 23))
2731@@ -342,7 +342,7 @@ local function Constructor()
2732 for method, func in pairs(methods) do
2733 widget[method] = func
2734 end
2735-
2736+
2737 return AceGUI:RegisterAsContainer(widget)
2738 end
2739
2740diff --git AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2741index ba916d0..0cc69af 100644
2742--- AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2743+++ AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2744@@ -36,7 +36,7 @@ do
2745 function del(t)
2746 for k in pairs(t) do
2747 t[k] = nil
2748- end
2749+ end
2750 pool[t] = true
2751 end
2752 end
2753@@ -66,7 +66,7 @@ local function UpdateButton(button, treeline, selected, canExpand, isExpanded)
2754 local value = treeline.value
2755 local uniquevalue = treeline.uniquevalue
2756 local disabled = treeline.disabled
2757-
2758+
2759 button.treeline = treeline
2760 button.value = value
2761 button.uniquevalue = uniquevalue
2762@@ -87,7 +87,7 @@ local function UpdateButton(button, treeline, selected, canExpand, isExpanded)
2763 button:SetHighlightFontObject("GameFontHighlightSmall")
2764 button.text:SetPoint("LEFT", (icon and 16 or 0) + 8 * level, 2)
2765 end
2766-
2767+
2768 if disabled then
2769 button:EnableMouse(false)
2770 button.text:SetText("|cff808080"..text..FONT_COLOR_CODE_CLOSE)
2771@@ -95,20 +95,20 @@ local function UpdateButton(button, treeline, selected, canExpand, isExpanded)
2772 button.text:SetText(text)
2773 button:EnableMouse(true)
2774 end
2775-
2776+
2777 if icon then
2778 button.icon:SetTexture(icon)
2779 button.icon:SetPoint("LEFT", 8 * level, (level == 1) and 0 or 1)
2780 else
2781 button.icon:SetTexture(nil)
2782 end
2783-
2784+
2785 if iconCoords then
2786 button.icon:SetTexCoord(unpack(iconCoords))
2787 else
2788 button.icon:SetTexCoord(0, 1, 0, 1)
2789 end
2790-
2791+
2792 if canExpand then
2793 if not isExpanded then
2794 toggle:SetNormalTexture(130838) -- Interface\\Buttons\\UI-PlusButton-UP
2795@@ -275,10 +275,10 @@ local function Dragger_OnMouseUp(frame)
2796 treeframe:SetHeight(0)
2797 treeframe:SetPoint("TOPLEFT", frame, "TOPLEFT",0,0)
2798 treeframe:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT",0,0)
2799-
2800+
2801 local status = self.status or self.localstatus
2802 status.treewidth = treeframe:GetWidth()
2803-
2804+
2805 treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth())
2806 -- recalculate the content width
2807 treeframe.obj:OnWidthSet(status.fullwidth)
2808@@ -363,8 +363,8 @@ local methods = {
2809 --sets the tree to be displayed
2810 ["SetTree"] = function(self, tree, filter)
2811 self.filter = filter
2812- if tree then
2813- assert(type(tree) == "table")
2814+ if tree then
2815+ assert(type(tree) == "table")
2816 end
2817 self.tree = tree
2818 self:RefreshTree()
2819@@ -372,7 +372,7 @@ local methods = {
2820
2821 ["BuildLevel"] = function(self, tree, level, parent)
2822 local groups = (self.status or self.localstatus).groups
2823-
2824+
2825 for i, v in ipairs(tree) do
2826 if v.children then
2827 if not self.filter or ShouldDisplayLevel(v.children) then
2828@@ -409,7 +409,7 @@ local methods = {
2829 local tree = self.tree
2830
2831 local treeframe = self.treeframe
2832-
2833+
2834 status.scrollToSelection = status.scrollToSelection or scrollToSelection -- needs to be cached in case the control hasn't been drawn yet (code bails out below)
2835
2836 self:BuildLevel(tree, 1)
2837@@ -426,7 +426,7 @@ local methods = {
2838 end
2839
2840 local first, last
2841-
2842+
2843 scrollToSelection = status.scrollToSelection
2844 status.scrollToSelection = nil
2845
2846@@ -502,9 +502,9 @@ local methods = {
2847 button:Show()
2848 buttonnum = buttonnum + 1
2849 end
2850-
2851+
2852 end,
2853-
2854+
2855 ["SetSelected"] = function(self, value)
2856 local status = self.status or self.localstatus
2857 if status.selected ~= value then
2858@@ -554,16 +554,16 @@ local methods = {
2859 local treeframe = self.treeframe
2860 local status = self.status or self.localstatus
2861 status.fullwidth = width
2862-
2863+
2864 local contentwidth = width - status.treewidth - 20
2865 if contentwidth < 0 then
2866 contentwidth = 0
2867 end
2868 content:SetWidth(contentwidth)
2869 content.width = contentwidth
2870-
2871+
2872 local maxtreewidth = math_min(400, width - 50)
2873-
2874+
2875 if maxtreewidth > 100 and status.treewidth > maxtreewidth then
2876 self:SetTreeWidth(maxtreewidth, status.treesizable)
2877 end
2878@@ -589,16 +589,16 @@ local methods = {
2879 treewidth = DEFAULT_TREE_WIDTH
2880 else
2881 resizable = false
2882- treewidth = DEFAULT_TREE_WIDTH
2883+ treewidth = DEFAULT_TREE_WIDTH
2884 end
2885 end
2886 self.treeframe:SetWidth(treewidth)
2887 self.dragger:EnableMouse(resizable)
2888-
2889+
2890 local status = self.status or self.localstatus
2891 status.treewidth = treewidth
2892 status.treesizable = resizable
2893-
2894+
2895 -- recalculate the content width
2896 if status.fullwidth then
2897 self:OnWidthSet(status.fullwidth)
2898diff --git AceGUI-3.0/widgets/AceGUIContainer-Window.lua AceGUI-3.0/widgets/AceGUIContainer-Window.lua
2899index 9818e6d..2e28a3d 100644
2900--- AceGUI-3.0/widgets/AceGUIContainer-Window.lua
2901+++ AceGUI-3.0/widgets/AceGUIContainer-Window.lua
2902@@ -30,21 +30,21 @@ do
2903 local function frameOnClose(this)
2904 this.obj:Fire("OnClose")
2905 end
2906-
2907+
2908 local function closeOnClick(this)
2909 PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
2910 this.obj:Hide()
2911 end
2912-
2913+
2914 local function frameOnMouseDown(this)
2915 AceGUI:ClearFocus()
2916 end
2917-
2918+
2919 local function titleOnMouseDown(this)
2920 this:GetParent():StartMoving()
2921 AceGUI:ClearFocus()
2922 end
2923-
2924+
2925 local function frameOnMouseUp(this)
2926 local frame = this:GetParent()
2927 frame:StopMovingOrSizing()
2928@@ -55,22 +55,22 @@ do
2929 status.top = frame:GetTop()
2930 status.left = frame:GetLeft()
2931 end
2932-
2933+
2934 local function sizerseOnMouseDown(this)
2935 this:GetParent():StartSizing("BOTTOMRIGHT")
2936 AceGUI:ClearFocus()
2937 end
2938-
2939+
2940 local function sizersOnMouseDown(this)
2941 this:GetParent():StartSizing("BOTTOM")
2942 AceGUI:ClearFocus()
2943 end
2944-
2945+
2946 local function sizereOnMouseDown(this)
2947 this:GetParent():StartSizing("RIGHT")
2948 AceGUI:ClearFocus()
2949 end
2950-
2951+
2952 local function sizerOnMouseUp(this)
2953 this:GetParent():StopMovingOrSizing()
2954 end
2955@@ -78,19 +78,19 @@ do
2956 local function SetTitle(self,title)
2957 self.titletext:SetText(title)
2958 end
2959-
2960+
2961 local function SetStatusText(self,text)
2962 -- self.statustext:SetText(text)
2963 end
2964-
2965+
2966 local function Hide(self)
2967 self.frame:Hide()
2968 end
2969-
2970+
2971 local function Show(self)
2972 self.frame:Show()
2973 end
2974-
2975+
2976 local function OnAcquire(self)
2977 self.frame:SetParent(UIParent)
2978 self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
2979@@ -98,21 +98,21 @@ do
2980 self:EnableResize(true)
2981 self:Show()
2982 end
2983-
2984+
2985 local function OnRelease(self)
2986 self.status = nil
2987 for k in pairs(self.localstatus) do
2988 self.localstatus[k] = nil
2989 end
2990 end
2991-
2992+
2993 -- called to set an external table to store status in
2994 local function SetStatusTable(self, status)
2995 assert(type(status) == "table")
2996 self.status = status
2997 self:ApplyStatus()
2998 end
2999-
3000+
3001 local function ApplyStatus(self)
3002 local status = self.status or self.localstatus
3003 local frame = self.frame
3004@@ -125,7 +125,7 @@ do
3005 frame:SetPoint("CENTER",UIParent,"CENTER")
3006 end
3007 end
3008-
3009+
3010 local function OnWidthSet(self, width)
3011 local content = self.content
3012 local contentwidth = width - 34
3013@@ -135,8 +135,8 @@ do
3014 content:SetWidth(contentwidth)
3015 content.width = contentwidth
3016 end
3017-
3018-
3019+
3020+
3021 local function OnHeightSet(self, height)
3022 local content = self.content
3023 local contentheight = height - 57
3024@@ -146,19 +146,19 @@ do
3025 content:SetHeight(contentheight)
3026 content.height = contentheight
3027 end
3028-
3029+
3030 local function EnableResize(self, state)
3031 local func = state and "Show" or "Hide"
3032 self.sizer_se[func](self.sizer_se)
3033 self.sizer_s[func](self.sizer_s)
3034 self.sizer_e[func](self.sizer_e)
3035 end
3036-
3037+
3038 local function Constructor()
3039 local frame = CreateFrame("Frame",nil,UIParent)
3040 local self = {}
3041 self.type = "Window"
3042-
3043+
3044 self.Hide = Hide
3045 self.Show = Show
3046 self.SetTitle = SetTitle
3047@@ -170,9 +170,9 @@ do
3048 self.OnWidthSet = OnWidthSet
3049 self.OnHeightSet = OnHeightSet
3050 self.EnableResize = EnableResize
3051-
3052+
3053 self.localstatus = {}
3054-
3055+
3056 self.frame = frame
3057 frame.obj = self
3058 frame:SetWidth(700)
3059@@ -183,7 +183,7 @@ do
3060 frame:SetResizable(true)
3061 frame:SetFrameStrata("FULLSCREEN_DIALOG")
3062 frame:SetScript("OnMouseDown", frameOnMouseDown)
3063-
3064+
3065 frame:SetScript("OnShow",frameOnShow)
3066 frame:SetScript("OnHide",frameOnClose)
3067 frame:SetMinResize(240,240)
3068@@ -193,81 +193,81 @@ do
3069 titlebg:SetTexture(251966) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Title-Background
3070 titlebg:SetPoint("TOPLEFT", 9, -6)
3071 titlebg:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", -28, -24)
3072-
3073+
3074 local dialogbg = frame:CreateTexture(nil, "BACKGROUND")
3075 dialogbg:SetTexture(137056) -- Interface\\Tooltips\\UI-Tooltip-Background
3076 dialogbg:SetPoint("TOPLEFT", 8, -24)
3077 dialogbg:SetPoint("BOTTOMRIGHT", -6, 8)
3078 dialogbg:SetVertexColor(0, 0, 0, .75)
3079-
3080+
3081 local topleft = frame:CreateTexture(nil, "BORDER")
3082 topleft:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
3083 topleft:SetWidth(64)
3084 topleft:SetHeight(64)
3085 topleft:SetPoint("TOPLEFT")
3086 topleft:SetTexCoord(0.501953125, 0.625, 0, 1)
3087-
3088+
3089 local topright = frame:CreateTexture(nil, "BORDER")
3090 topright:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
3091 topright:SetWidth(64)
3092 topright:SetHeight(64)
3093 topright:SetPoint("TOPRIGHT")
3094 topright:SetTexCoord(0.625, 0.75, 0, 1)
3095-
3096+
3097 local top = frame:CreateTexture(nil, "BORDER")
3098 top:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
3099 top:SetHeight(64)
3100 top:SetPoint("TOPLEFT", topleft, "TOPRIGHT")
3101 top:SetPoint("TOPRIGHT", topright, "TOPLEFT")
3102 top:SetTexCoord(0.25, 0.369140625, 0, 1)
3103-
3104+
3105 local bottomleft = frame:CreateTexture(nil, "BORDER")
3106 bottomleft:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
3107 bottomleft:SetWidth(64)
3108 bottomleft:SetHeight(64)
3109 bottomleft:SetPoint("BOTTOMLEFT")
3110 bottomleft:SetTexCoord(0.751953125, 0.875, 0, 1)
3111-
3112+
3113 local bottomright = frame:CreateTexture(nil, "BORDER")
3114 bottomright:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
3115 bottomright:SetWidth(64)
3116 bottomright:SetHeight(64)
3117 bottomright:SetPoint("BOTTOMRIGHT")
3118 bottomright:SetTexCoord(0.875, 1, 0, 1)
3119-
3120+
3121 local bottom = frame:CreateTexture(nil, "BORDER")
3122 bottom:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
3123 bottom:SetHeight(64)
3124 bottom:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMRIGHT")
3125 bottom:SetPoint("BOTTOMRIGHT", bottomright, "BOTTOMLEFT")
3126 bottom:SetTexCoord(0.376953125, 0.498046875, 0, 1)
3127-
3128+
3129 local left = frame:CreateTexture(nil, "BORDER")
3130 left:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
3131 left:SetWidth(64)
3132 left:SetPoint("TOPLEFT", topleft, "BOTTOMLEFT")
3133 left:SetPoint("BOTTOMLEFT", bottomleft, "TOPLEFT")
3134 left:SetTexCoord(0.001953125, 0.125, 0, 1)
3135-
3136+
3137 local right = frame:CreateTexture(nil, "BORDER")
3138 right:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border
3139 right:SetWidth(64)
3140 right:SetPoint("TOPRIGHT", topright, "BOTTOMRIGHT")
3141 right:SetPoint("BOTTOMRIGHT", bottomright, "TOPRIGHT")
3142 right:SetTexCoord(0.1171875, 0.2421875, 0, 1)
3143-
3144+
3145 local close = CreateFrame("Button", nil, frame, "UIPanelCloseButton")
3146 close:SetPoint("TOPRIGHT", 2, 1)
3147 close:SetScript("OnClick", closeOnClick)
3148 self.closebutton = close
3149 close.obj = self
3150-
3151+
3152 local titletext = frame:CreateFontString(nil, "ARTWORK")
3153 titletext:SetFontObject(GameFontNormal)
3154 titletext:SetPoint("TOPLEFT", 12, -8)
3155 titletext:SetPoint("TOPRIGHT", -32, -8)
3156 self.titletext = titletext
3157-
3158+
3159 local title = CreateFrame("Button", nil, frame)
3160 title:SetPoint("TOPLEFT", titlebg)
3161 title:SetPoint("BOTTOMRIGHT", titlebg)
3162@@ -275,7 +275,7 @@ do
3163 title:SetScript("OnMouseDown",titleOnMouseDown)
3164 title:SetScript("OnMouseUp", frameOnMouseUp)
3165 self.title = title
3166-
3167+
3168 local sizer_se = CreateFrame("Frame",nil,frame)
3169 sizer_se:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0)
3170 sizer_se:SetWidth(25)
3171@@ -311,7 +311,7 @@ do
3172 sizer_s:SetScript("OnMouseDown",sizersOnMouseDown)
3173 sizer_s:SetScript("OnMouseUp", sizerOnMouseUp)
3174 self.sizer_s = sizer_s
3175-
3176+
3177 local sizer_e = CreateFrame("Frame",nil,frame)
3178 sizer_e:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,25)
3179 sizer_e:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
3180@@ -320,17 +320,17 @@ do
3181 sizer_e:SetScript("OnMouseDown",sizereOnMouseDown)
3182 sizer_e:SetScript("OnMouseUp", sizerOnMouseUp)
3183 self.sizer_e = sizer_e
3184-
3185+
3186 --Container Support
3187 local content = CreateFrame("Frame",nil,frame)
3188 self.content = content
3189 content.obj = self
3190 content:SetPoint("TOPLEFT",frame,"TOPLEFT",12,-32)
3191 content:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-12,13)
3192-
3193+
3194 AceGUI:RegisterAsContainer(self)
3195- return self
3196+ return self
3197 end
3198-
3199+
3200 AceGUI:RegisterWidgetType(Type,Constructor,Version)
3201 end
3202diff --git AceGUI-3.0/widgets/AceGUIWidget-Button.lua AceGUI-3.0/widgets/AceGUIWidget-Button.lua
3203index 0a23be4..0e286ca 100644
3204--- AceGUI-3.0/widgets/AceGUIWidget-Button.lua
3205+++ AceGUI-3.0/widgets/AceGUIWidget-Button.lua
3206@@ -51,7 +51,7 @@ local methods = {
3207 self:SetWidth(self.text:GetStringWidth() + 30)
3208 end
3209 end,
3210-
3211+
3212 ["SetAutoWidth"] = function(self, autoWidth)
3213 self.autoWidth = autoWidth
3214 if self.autoWidth then
3215diff --git AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
3216index be9ae81..53ef618 100644
3217--- AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
3218+++ AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
3219@@ -221,11 +221,11 @@ local methods = {
3220 self:SetHeight(24)
3221 end
3222 end,
3223-
3224+
3225 ["SetImage"] = function(self, path, ...)
3226 local image = self.image
3227 image:SetTexture(path)
3228-
3229+
3230 if image:GetTexture() then
3231 local n = select("#", ...)
3232 if n == 4 or n == 8 then
3233diff --git AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
3234index 9ff421a..c9b54ea 100644
3235--- AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
3236+++ AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
3237@@ -33,7 +33,7 @@ end
3238
3239 -- ItemBase is the base "class" for all dropdown items.
3240 -- Each item has to use ItemBase.Create(widgetType) to
3241--- create an initial 'self' value.
3242+-- create an initial 'self' value.
3243 -- ItemBase will add common functions and ui event handlers.
3244 -- Be sure to keep basic usage when you override functions.
3245
3246@@ -52,7 +52,7 @@ function ItemBase.Frame_OnEnter(this)
3247 self.highlight:Show()
3248 end
3249 self:Fire("OnEnter")
3250-
3251+
3252 if self.specialOnEnter then
3253 self.specialOnEnter(self)
3254 end
3255@@ -60,10 +60,10 @@ end
3256
3257 function ItemBase.Frame_OnLeave(this)
3258 local self = this.obj
3259-
3260+
3261 self.highlight:Hide()
3262 self:Fire("OnLeave")
3263-
3264+
3265 if self.specialOnLeave then
3266 self.specialOnLeave(self)
3267 end
3268@@ -89,7 +89,7 @@ end
3269 -- Do not call this method directly
3270 function ItemBase.SetPullout(self, pullout)
3271 self.pullout = pullout
3272-
3273+
3274 self.frame:SetParent(nil)
3275 self.frame:SetParent(pullout.itemFrame)
3276 self.parent = pullout.itemFrame
3277@@ -155,12 +155,12 @@ function ItemBase.Create(type)
3278 self.frame = frame
3279 frame.obj = self
3280 self.type = type
3281-
3282+
3283 self.useHighlight = true
3284-
3285+
3286 frame:SetHeight(17)
3287 frame:SetFrameStrata("FULLSCREEN_DIALOG")
3288-
3289+
3290 local text = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
3291 text:SetTextColor(1,1,1)
3292 text:SetJustifyH("LEFT")
3293@@ -178,7 +178,7 @@ function ItemBase.Create(type)
3294 highlight:Hide()
3295 self.highlight = highlight
3296
3297- local check = frame:CreateTexture("OVERLAY")
3298+ local check = frame:CreateTexture("OVERLAY")
3299 check:SetWidth(16)
3300 check:SetHeight(16)
3301 check:SetPoint("LEFT",frame,"LEFT",3,-1)
3302@@ -192,26 +192,26 @@ function ItemBase.Create(type)
3303 sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
3304 sub:SetTexture(130940) -- Interface\\ChatFrame\\ChatFrameExpandArrow
3305 sub:Hide()
3306- self.sub = sub
3307-
3308+ self.sub = sub
3309+
3310 frame:SetScript("OnEnter", ItemBase.Frame_OnEnter)
3311 frame:SetScript("OnLeave", ItemBase.Frame_OnLeave)
3312-
3313+
3314 self.OnAcquire = ItemBase.OnAcquire
3315 self.OnRelease = ItemBase.OnRelease
3316-
3317+
3318 self.SetPullout = ItemBase.SetPullout
3319 self.GetText = ItemBase.GetText
3320 self.SetText = ItemBase.SetText
3321 self.SetDisabled = ItemBase.SetDisabled
3322-
3323+
3324 self.SetPoint = ItemBase.SetPoint
3325 self.Show = ItemBase.Show
3326 self.Hide = ItemBase.Hide
3327-
3328+
3329 self.SetOnLeave = ItemBase.SetOnLeave
3330 self.SetOnEnter = ItemBase.SetOnEnter
3331-
3332+
3333 return self
3334 end
3335
3336@@ -223,20 +223,20 @@ end
3337
3338 --[[
3339 Template for items:
3340-
3341+
3342 -- Item:
3343 --
3344 do
3345 local widgetType = "Dropdown-Item-"
3346 local widgetVersion = 1
3347-
3348+
3349 local function Constructor()
3350 local self = ItemBase.Create(widgetType)
3351-
3352+
3353 AceGUI:RegisterAsWidget(self)
3354 return self
3355 end
3356-
3357+
3358 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
3359 end
3360 --]]
3361@@ -247,25 +247,25 @@ end
3362 do
3363 local widgetType = "Dropdown-Item-Header"
3364 local widgetVersion = 1
3365-
3366+
3367 local function OnEnter(this)
3368 local self = this.obj
3369 self:Fire("OnEnter")
3370-
3371+
3372 if self.specialOnEnter then
3373 self.specialOnEnter(self)
3374 end
3375 end
3376-
3377+
3378 local function OnLeave(this)
3379 local self = this.obj
3380 self:Fire("OnLeave")
3381-
3382+
3383 if self.specialOnLeave then
3384 self.specialOnLeave(self)
3385 end
3386 end
3387-
3388+
3389 -- exported, override
3390 local function SetDisabled(self, disabled)
3391 ItemBase.SetDisabled(self, disabled)
3392@@ -273,21 +273,21 @@ do
3393 self.text:SetTextColor(1, 1, 0)
3394 end
3395 end
3396-
3397+
3398 local function Constructor()
3399 local self = ItemBase.Create(widgetType)
3400-
3401+
3402 self.SetDisabled = SetDisabled
3403-
3404+
3405 self.frame:SetScript("OnEnter", OnEnter)
3406 self.frame:SetScript("OnLeave", OnLeave)
3407-
3408+
3409 self.text:SetTextColor(1, 1, 0)
3410-
3411+
3412 AceGUI:RegisterAsWidget(self)
3413 return self
3414 end
3415-
3416+
3417 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
3418 end
3419
3420@@ -296,7 +296,7 @@ end
3421 do
3422 local widgetType = "Dropdown-Item-Execute"
3423 local widgetVersion = 1
3424-
3425+
3426 local function Frame_OnClick(this, button)
3427 local self = this.obj
3428 if self.disabled then return end
3429@@ -305,16 +305,16 @@ do
3430 self.pullout:Close()
3431 end
3432 end
3433-
3434+
3435 local function Constructor()
3436 local self = ItemBase.Create(widgetType)
3437-
3438+
3439 self.frame:SetScript("OnClick", Frame_OnClick)
3440-
3441+
3442 AceGUI:RegisterAsWidget(self)
3443 return self
3444 end
3445-
3446+
3447 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
3448 end
3449
3450@@ -324,7 +324,7 @@ end
3451 do
3452 local widgetType = "Dropdown-Item-Toggle"
3453 local widgetVersion = 4
3454-
3455+
3456 local function UpdateToggle(self)
3457 if self.value then
3458 self.check:Show()
3459@@ -332,12 +332,12 @@ do
3460 self.check:Hide()
3461 end
3462 end
3463-
3464+
3465 local function OnRelease(self)
3466 ItemBase.OnRelease(self)
3467 self:SetValue(nil)
3468 end
3469-
3470+
3471 local function Frame_OnClick(this, button)
3472 local self = this.obj
3473 if self.disabled then return end
3474@@ -350,31 +350,31 @@ do
3475 UpdateToggle(self)
3476 self:Fire("OnValueChanged", self.value)
3477 end
3478-
3479+
3480 -- exported
3481 local function SetValue(self, value)
3482 self.value = value
3483 UpdateToggle(self)
3484 end
3485-
3486+
3487 -- exported
3488 local function GetValue(self)
3489 return self.value
3490 end
3491-
3492+
3493 local function Constructor()
3494 local self = ItemBase.Create(widgetType)
3495-
3496+
3497 self.frame:SetScript("OnClick", Frame_OnClick)
3498-
3499+
3500 self.SetValue = SetValue
3501 self.GetValue = GetValue
3502 self.OnRelease = OnRelease
3503-
3504+
3505 AceGUI:RegisterAsWidget(self)
3506 return self
3507 end
3508-
3509+
3510 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
3511 end
3512
3513@@ -384,55 +384,55 @@ end
3514 do
3515 local widgetType = "Dropdown-Item-Menu"
3516 local widgetVersion = 2
3517-
3518+
3519 local function OnEnter(this)
3520 local self = this.obj
3521 self:Fire("OnEnter")
3522-
3523+
3524 if self.specialOnEnter then
3525 self.specialOnEnter(self)
3526 end
3527-
3528+
3529 self.highlight:Show()
3530-
3531+
3532 if not self.disabled and self.submenu then
3533 self.submenu:Open("TOPLEFT", self.frame, "TOPRIGHT", self.pullout:GetRightBorderWidth(), 0, self.frame:GetFrameLevel() + 100)
3534 end
3535 end
3536-
3537+
3538 local function OnHide(this)
3539 local self = this.obj
3540 if self.submenu then
3541 self.submenu:Close()
3542 end
3543 end
3544-
3545+
3546 -- exported
3547 local function SetMenu(self, menu)
3548 assert(menu.type == "Dropdown-Pullout")
3549 self.submenu = menu
3550 end
3551-
3552+
3553 -- exported
3554 local function CloseMenu(self)
3555 self.submenu:Close()
3556 end
3557-
3558+
3559 local function Constructor()
3560 local self = ItemBase.Create(widgetType)
3561-
3562+
3563 self.sub:Show()
3564-
3565+
3566 self.frame:SetScript("OnEnter", OnEnter)
3567 self.frame:SetScript("OnHide", OnHide)
3568-
3569+
3570 self.SetMenu = SetMenu
3571 self.CloseMenu = CloseMenu
3572-
3573+
3574 AceGUI:RegisterAsWidget(self)
3575 return self
3576 end
3577-
3578+
3579 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
3580 end
3581
3582@@ -441,31 +441,31 @@ end
3583 do
3584 local widgetType = "Dropdown-Item-Separator"
3585 local widgetVersion = 2
3586-
3587+
3588 -- exported, override
3589 local function SetDisabled(self, disabled)
3590 ItemBase.SetDisabled(self, disabled)
3591 self.useHighlight = false
3592 end
3593-
3594+
3595 local function Constructor()
3596 local self = ItemBase.Create(widgetType)
3597-
3598+
3599 self.SetDisabled = SetDisabled
3600-
3601+
3602 local line = self.frame:CreateTexture(nil, "OVERLAY")
3603 line:SetHeight(1)
3604 line:SetColorTexture(.5, .5, .5)
3605 line:SetPoint("LEFT", self.frame, "LEFT", 10, 0)
3606 line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0)
3607-
3608+
3609 self.text:Hide()
3610-
3611+
3612 self.useHighlight = false
3613-
3614+
3615 AceGUI:RegisterAsWidget(self)
3616 return self
3617 end
3618-
3619+
3620 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
3621 end
3622diff --git AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
3623index 889ec2b..67696cd 100644
3624--- AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
3625+++ AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
3626@@ -40,9 +40,9 @@ end
3627 do
3628 local widgetType = "Dropdown-Pullout"
3629 local widgetVersion = 3
3630-
3631+
3632 --[[ Static data ]]--
3633-
3634+
3635 local backdrop = {
3636 bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
3637 edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
3638@@ -60,9 +60,9 @@ do
3639
3640 local defaultWidth = 200
3641 local defaultMaxHeight = 600
3642-
3643+
3644 --[[ UI Event Handlers ]]--
3645-
3646+
3647 -- HACK: This should be no part of the pullout, but there
3648 -- is no other 'clean' way to response to any item-OnEnter
3649 -- Used to close Submenus when an other item is entered
3650@@ -74,22 +74,22 @@ do
3651 end
3652 end
3653 end
3654-
3655+
3656 -- See the note in Constructor() for each scroll related function
3657 local function OnMouseWheel(this, value)
3658 this.obj:MoveScroll(value)
3659 end
3660-
3661+
3662 local function OnScrollValueChanged(this, value)
3663 this.obj:SetScroll(value)
3664 end
3665-
3666+
3667 local function OnSizeChanged(this)
3668 this.obj:FixScroll()
3669 end
3670-
3671+
3672 --[[ Exported methods ]]--
3673-
3674+
3675 -- exported
3676 local function SetScroll(self, value)
3677 local status = self.scrollStatus
3678@@ -106,9 +106,9 @@ do
3679 child:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, offset)
3680 child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", self.slider:IsShown() and -12 or 0, offset)
3681 status.offset = offset
3682- status.scrollvalue = value
3683+ status.scrollvalue = value
3684 end
3685-
3686+
3687 -- exported
3688 local function MoveScroll(self, value)
3689 local status = self.scrollStatus
3690@@ -127,7 +127,7 @@ do
3691 self.slider:SetValue(min(max(status.scrollvalue + delta*(1000/(diff/45)),0), 1000))
3692 end
3693 end
3694-
3695+
3696 -- exported
3697 local function FixScroll(self)
3698 local status = self.scrollStatus
3699@@ -140,7 +140,7 @@ do
3700 child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, offset)
3701 self.slider:SetValue(0)
3702 else
3703- self.slider:Show()
3704+ self.slider:Show()
3705 local value = (offset / (viewheight - height) * 1000)
3706 if value > 1000 then value = 1000 end
3707 self.slider:SetValue(value)
3708@@ -153,44 +153,44 @@ do
3709 end
3710 end
3711 end
3712-
3713+
3714 -- exported, AceGUI callback
3715 local function OnAcquire(self)
3716 self.frame:SetParent(UIParent)
3717 --self.itemFrame:SetToplevel(true)
3718 end
3719-
3720+
3721 -- exported, AceGUI callback
3722 local function OnRelease(self)
3723 self:Clear()
3724 self.frame:ClearAllPoints()
3725 self.frame:Hide()
3726 end
3727-
3728+
3729 -- exported
3730 local function AddItem(self, item)
3731 self.items[#self.items + 1] = item
3732-
3733+
3734 local h = #self.items * 16
3735 self.itemFrame:SetHeight(h)
3736 self.frame:SetHeight(min(h + 34, self.maxHeight)) -- +34: 20 for scrollFrame placement (10 offset) and +14 for item placement
3737-
3738+
3739 item.frame:SetPoint("LEFT", self.itemFrame, "LEFT")
3740 item.frame:SetPoint("RIGHT", self.itemFrame, "RIGHT")
3741-
3742+
3743 item:SetPullout(self)
3744 item:SetOnEnter(OnEnter)
3745 end
3746-
3747+
3748 -- exported
3749- local function Open(self, point, relFrame, relPoint, x, y)
3750+ local function Open(self, point, relFrame, relPoint, x, y)
3751 local items = self.items
3752 local frame = self.frame
3753 local itemFrame = self.itemFrame
3754-
3755+
3756 frame:SetPoint(point, relFrame, relPoint, x, y)
3757
3758-
3759+
3760 local height = 8
3761 for i, item in pairs(items) do
3762 if i == 1 then
3763@@ -198,23 +198,23 @@ do
3764 else
3765 item:SetPoint("TOP", items[i-1].frame, "BOTTOM", 0, 1)
3766 end
3767-
3768+
3769 item:Show()
3770-
3771+
3772 height = height + 16
3773 end
3774 itemFrame:SetHeight(height)
3775 fixstrata("TOOLTIP", frame, frame:GetChildren())
3776 frame:Show()
3777 self:Fire("OnOpen")
3778- end
3779-
3780+ end
3781+
3782 -- exported
3783 local function Close(self)
3784 self.frame:Hide()
3785 self:Fire("OnClose")
3786- end
3787-
3788+ end
3789+
3790 -- exported
3791 local function Clear(self)
3792 local items = self.items
3793@@ -222,18 +222,18 @@ do
3794 AceGUI:Release(item)
3795 items[i] = nil
3796 end
3797- end
3798-
3799+ end
3800+
3801 -- exported
3802 local function IterateItems(self)
3803 return ipairs(self.items)
3804 end
3805-
3806+
3807 -- exported
3808 local function SetHideOnLeave(self, val)
3809 self.hideOnLeave = val
3810 end
3811-
3812+
3813 -- exported
3814 local function SetMaxHeight(self, height)
3815 self.maxHeight = height or defaultMaxHeight
3816@@ -243,19 +243,19 @@ do
3817 self.frame:SetHeight(self.itemFrame:GetHeight() + 34) -- see :AddItem
3818 end
3819 end
3820-
3821+
3822 -- exported
3823 local function GetRightBorderWidth(self)
3824 return 6 + (self.slider:IsShown() and 12 or 0)
3825 end
3826-
3827+
3828 -- exported
3829 local function GetLeftBorderWidth(self)
3830 return 6
3831 end
3832-
3833+
3834 --[[ Constructor ]]--
3835-
3836+
3837 local function Constructor()
3838 local count = AceGUI:GetNextWidgetNum(widgetType)
3839 local frame = CreateFrame("Frame", "AceGUI30Pullout"..count, UIParent)
3840@@ -264,7 +264,7 @@ do
3841 self.type = widgetType
3842 self.frame = frame
3843 frame.obj = self
3844-
3845+
3846 self.OnAcquire = OnAcquire
3847 self.OnRelease = OnRelease
3848
3849@@ -278,37 +278,37 @@ do
3850 self.SetScroll = SetScroll
3851 self.MoveScroll = MoveScroll
3852 self.FixScroll = FixScroll
3853-
3854+
3855 self.SetMaxHeight = SetMaxHeight
3856 self.GetRightBorderWidth = GetRightBorderWidth
3857 self.GetLeftBorderWidth = GetLeftBorderWidth
3858-
3859+
3860 self.items = {}
3861-
3862+
3863 self.scrollStatus = {
3864 scrollvalue = 0,
3865 }
3866-
3867+
3868 self.maxHeight = defaultMaxHeight
3869-
3870+
3871 frame:SetBackdrop(backdrop)
3872 frame:SetBackdropColor(0, 0, 0)
3873 frame:SetFrameStrata("FULLSCREEN_DIALOG")
3874 frame:SetClampedToScreen(true)
3875 frame:SetWidth(defaultWidth)
3876- frame:SetHeight(self.maxHeight)
3877+ frame:SetHeight(self.maxHeight)
3878 --frame:SetToplevel(true)
3879-
3880+
3881 -- NOTE: The whole scroll frame code is copied from the AceGUI-3.0 widget ScrollFrame
3882 local scrollFrame = CreateFrame("ScrollFrame", nil, frame)
3883 local itemFrame = CreateFrame("Frame", nil, scrollFrame)
3884-
3885+
3886 self.scrollFrame = scrollFrame
3887 self.itemFrame = itemFrame
3888-
3889+
3890 scrollFrame.obj = self
3891 itemFrame.obj = self
3892-
3893+
3894 local slider = CreateFrame("Slider", "AceGUI30PulloutScrollbar"..count, scrollFrame)
3895 slider:SetOrientation("VERTICAL")
3896 slider:SetHitRectInsets(0, 0, -10, 0)
3897@@ -318,7 +318,7 @@ do
3898 slider:SetFrameStrata("FULLSCREEN_DIALOG")
3899 self.slider = slider
3900 slider.obj = self
3901-
3902+
3903 scrollFrame:SetScrollChild(itemFrame)
3904 scrollFrame:SetPoint("TOPLEFT", frame, "TOPLEFT", 6, -12)
3905 scrollFrame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -6, 12)
3906@@ -327,46 +327,46 @@ do
3907 scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
3908 scrollFrame:SetToplevel(true)
3909 scrollFrame:SetFrameStrata("FULLSCREEN_DIALOG")
3910-
3911+
3912 itemFrame:SetPoint("TOPLEFT", scrollFrame, "TOPLEFT", 0, 0)
3913 itemFrame:SetPoint("TOPRIGHT", scrollFrame, "TOPRIGHT", -12, 0)
3914 itemFrame:SetHeight(400)
3915 itemFrame:SetToplevel(true)
3916 itemFrame:SetFrameStrata("FULLSCREEN_DIALOG")
3917-
3918+
3919 slider:SetPoint("TOPLEFT", scrollFrame, "TOPRIGHT", -16, 0)
3920 slider:SetPoint("BOTTOMLEFT", scrollFrame, "BOTTOMRIGHT", -16, 0)
3921 slider:SetScript("OnValueChanged", OnScrollValueChanged)
3922 slider:SetMinMaxValues(0, 1000)
3923 slider:SetValueStep(1)
3924 slider:SetValue(0)
3925-
3926+
3927 scrollFrame:Show()
3928 itemFrame:Show()
3929 slider:Hide()
3930-
3931+
3932 self:FixScroll()
3933-
3934+
3935 AceGUI:RegisterAsWidget(self)
3936 return self
3937 end
3938-
3939+
3940 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
3941 end
3942
3943 do
3944 local widgetType = "Dropdown"
3945 local widgetVersion = 31
3946-
3947+
3948 --[[ Static data ]]--
3949-
3950+
3951 --[[ UI event handler ]]--
3952-
3953+
3954 local function Control_OnEnter(this)
3955 this.obj.button:LockHighlight()
3956 this.obj:Fire("OnEnter")
3957 end
3958-
3959+
3960 local function Control_OnLeave(this)
3961 this.obj.button:UnlockHighlight()
3962 this.obj:Fire("OnLeave")
3963@@ -378,7 +378,7 @@ do
3964 self.pullout:Close()
3965 end
3966 end
3967-
3968+
3969 local function Dropdown_TogglePullout(this)
3970 local self = this.obj
3971 PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
3972@@ -393,17 +393,17 @@ do
3973 AceGUI:SetFocus(self)
3974 end
3975 end
3976-
3977+
3978 local function OnPulloutOpen(this)
3979 local self = this.userdata.obj
3980 local value = self.value
3981-
3982+
3983 if not self.multiselect then
3984 for i, item in this:IterateItems() do
3985 item:SetValue(item.userdata.value == value)
3986 end
3987 end
3988-
3989+
3990 self.open = true
3991 self:Fire("OnOpened")
3992 end
3993@@ -413,7 +413,7 @@ do
3994 self.open = nil
3995 self:Fire("OnClosed")
3996 end
3997-
3998+
3999 local function ShowMultiText(self)
4000 local text
4001 for i, widget in self.pullout:IterateItems() do
4002@@ -429,10 +429,10 @@ do
4003 end
4004 self:SetText(text)
4005 end
4006-
4007+
4008 local function OnItemValueChanged(this, event, checked)
4009 local self = this.userdata.obj
4010-
4011+
4012 if self.multiselect then
4013 self:Fire("OnValueChanged", this.userdata.value, checked)
4014 ShowMultiText(self)
4015@@ -443,14 +443,14 @@ do
4016 else
4017 this:SetValue(true)
4018 end
4019- if self.open then
4020+ if self.open then
4021 self.pullout:Close()
4022 end
4023 end
4024 end
4025-
4026+
4027 --[[ Exported methods ]]--
4028-
4029+
4030 -- exported, AceGUI callback
4031 local function OnAcquire(self)
4032 local pullout = AceGUI:Create("Dropdown-Pullout")
4033@@ -460,13 +460,13 @@ do
4034 pullout:SetCallback("OnOpen", OnPulloutOpen)
4035 self.pullout.frame:SetFrameLevel(self.frame:GetFrameLevel() + 1)
4036 fixlevels(self.pullout.frame, self.pullout.frame:GetChildren())
4037-
4038+
4039 self:SetHeight(44)
4040 self:SetWidth(200)
4041 self:SetLabel()
4042 self:SetPulloutWidth(nil)
4043 end
4044-
4045+
4046 -- exported, AceGUI callback
4047 local function OnRelease(self)
4048 if self.open then
4049@@ -474,20 +474,20 @@ do
4050 end
4051 AceGUI:Release(self.pullout)
4052 self.pullout = nil
4053-
4054+
4055 self:SetText("")
4056 self:SetDisabled(false)
4057 self:SetMultiselect(false)
4058-
4059+
4060 self.value = nil
4061 self.list = nil
4062 self.open = nil
4063 self.hasClose = nil
4064-
4065+
4066 self.frame:ClearAllPoints()
4067 self.frame:Hide()
4068 end
4069-
4070+
4071 -- exported
4072 local function SetDisabled(self, disabled)
4073 self.disabled = disabled
4074@@ -503,19 +503,19 @@ do
4075 self.text:SetTextColor(1,1,1)
4076 end
4077 end
4078-
4079+
4080 -- exported
4081 local function ClearFocus(self)
4082 if self.open then
4083 self.pullout:Close()
4084 end
4085 end
4086-
4087+
4088 -- exported
4089 local function SetText(self, text)
4090 self.text:SetText(text or "")
4091 end
4092-
4093+
4094 -- exported
4095 local function SetLabel(self, text)
4096 if text and text ~= "" then
4097@@ -532,7 +532,7 @@ do
4098 self.alignoffset = 12
4099 end
4100 end
4101-
4102+
4103 -- exported
4104 local function SetValue(self, value)
4105 if self.list then
4106@@ -540,12 +540,12 @@ do
4107 end
4108 self.value = value
4109 end
4110-
4111+
4112 -- exported
4113 local function GetValue(self)
4114 return self.value
4115 end
4116-
4117+
4118 -- exported
4119 local function SetItemValue(self, item, value)
4120 if not self.multiselect then return end
4121@@ -558,7 +558,7 @@ do
4122 end
4123 ShowMultiText(self)
4124 end
4125-
4126+
4127 -- exported
4128 local function SetItemDisabled(self, item, disabled)
4129 for i, widget in self.pullout:IterateItems() do
4130@@ -567,7 +567,7 @@ do
4131 end
4132 end
4133 end
4134-
4135+
4136 local function AddListItem(self, value, text, itemType)
4137 if not itemType then itemType = "Dropdown-Item-Toggle" end
4138 local exists = AceGUI:GetWidgetVersion(itemType)
4139@@ -580,7 +580,7 @@ do
4140 item:SetCallback("OnValueChanged", OnItemValueChanged)
4141 self.pullout:AddItem(item)
4142 end
4143-
4144+
4145 local function AddCloseButton(self)
4146 if not self.hasClose then
4147 local close = AceGUI:Create("Dropdown-Item-Execute")
4148@@ -589,7 +589,7 @@ do
4149 self.hasClose = true
4150 end
4151 end
4152-
4153+
4154 -- exported
4155 local sortlist = {}
4156 local function SetList(self, list, order, itemType)
4157@@ -597,13 +597,13 @@ do
4158 self.pullout:Clear()
4159 self.hasClose = nil
4160 if not list then return end
4161-
4162+
4163 if type(order) ~= "table" then
4164 for v in pairs(list) do
4165 sortlist[#sortlist + 1] = v
4166 end
4167 tsort(sortlist)
4168-
4169+
4170 for i, key in ipairs(sortlist) do
4171 AddListItem(self, key, list[key], itemType)
4172 sortlist[i] = nil
4173@@ -618,7 +618,7 @@ do
4174 AddCloseButton(self)
4175 end
4176 end
4177-
4178+
4179 -- exported
4180 local function AddItem(self, value, text, itemType)
4181 if self.list then
4182@@ -626,7 +626,7 @@ do
4183 AddListItem(self, value, text, itemType)
4184 end
4185 end
4186-
4187+
4188 -- exported
4189 local function SetMultiselect(self, multi)
4190 self.multiselect = multi
4191@@ -635,23 +635,23 @@ do
4192 AddCloseButton(self)
4193 end
4194 end
4195-
4196+
4197 -- exported
4198 local function GetMultiselect(self)
4199 return self.multiselect
4200 end
4201-
4202+
4203 local function SetPulloutWidth(self, width)
4204 self.pulloutWidth = width
4205 end
4206-
4207+
4208 --[[ Constructor ]]--
4209-
4210+
4211 local function Constructor()
4212 local count = AceGUI:GetNextWidgetNum(widgetType)
4213 local frame = CreateFrame("Frame", nil, UIParent)
4214 local dropdown = CreateFrame("Frame", "AceGUI30DropDown"..count, frame, "UIDropDownMenuTemplate")
4215-
4216+
4217 local self = {}
4218 self.type = widgetType
4219 self.frame = frame
4220@@ -659,10 +659,10 @@ do
4221 self.count = count
4222 frame.obj = self
4223 dropdown.obj = self
4224-
4225+
4226 self.OnRelease = OnRelease
4227 self.OnAcquire = OnAcquire
4228-
4229+
4230 self.ClearFocus = ClearFocus
4231
4232 self.SetText = SetText
4233@@ -677,9 +677,9 @@ do
4234 self.SetItemValue = SetItemValue
4235 self.SetItemDisabled = SetItemDisabled
4236 self.SetPulloutWidth = SetPulloutWidth
4237-
4238+
4239 self.alignoffset = 26
4240-
4241+
4242 frame:SetScript("OnHide",Dropdown_OnHide)
4243
4244 dropdown:ClearAllPoints()
4245@@ -690,10 +690,10 @@ do
4246 local left = _G[dropdown:GetName() .. "Left"]
4247 local middle = _G[dropdown:GetName() .. "Middle"]
4248 local right = _G[dropdown:GetName() .. "Right"]
4249-
4250+
4251 middle:ClearAllPoints()
4252 right:ClearAllPoints()
4253-
4254+
4255 middle:SetPoint("LEFT", left, "RIGHT", 0, 0)
4256 middle:SetPoint("RIGHT", right, "LEFT", 0, 0)
4257 right:SetPoint("TOPRIGHT", dropdown, "TOPRIGHT", 0, 17)
4258@@ -704,7 +704,7 @@ do
4259 button:SetScript("OnEnter",Control_OnEnter)
4260 button:SetScript("OnLeave",Control_OnLeave)
4261 button:SetScript("OnClick",Dropdown_TogglePullout)
4262-
4263+
4264 local button_cover = CreateFrame("BUTTON",nil,self.frame)
4265 self.button_cover = button_cover
4266 button_cover.obj = self
4267@@ -713,14 +713,14 @@ do
4268 button_cover:SetScript("OnEnter",Control_OnEnter)
4269 button_cover:SetScript("OnLeave",Control_OnLeave)
4270 button_cover:SetScript("OnClick",Dropdown_TogglePullout)
4271-
4272+
4273 local text = _G[dropdown:GetName() .. "Text"]
4274 self.text = text
4275 text.obj = self
4276 text:ClearAllPoints()
4277 text:SetPoint("RIGHT", right, "RIGHT" ,-43, 2)
4278 text:SetPoint("LEFT", left, "LEFT", 25, 2)
4279-
4280+
4281 local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
4282 label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
4283 label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
4284@@ -732,6 +732,6 @@ do
4285 AceGUI:RegisterAsWidget(self)
4286 return self
4287 end
4288-
4289+
4290 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
4291-end
4292+end
4293diff --git AceGUI-3.0/widgets/AceGUIWidget-Icon.lua AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
4294index bc3d02a..378e813 100644
4295--- AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
4296+++ AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
4297@@ -56,7 +56,7 @@ local methods = {
4298 ["SetImage"] = function(self, path, ...)
4299 local image = self.image
4300 image:SetTexture(path)
4301-
4302+
4303 if image:GetTexture() then
4304 local n = select("#", ...)
4305 if n == 4 or n == 8 then
4306diff --git AceGUI-3.0/widgets/AceGUIWidget-Label.lua AceGUI-3.0/widgets/AceGUIWidget-Label.lua
4307index 7a754f6..eec999e 100644
4308--- AceGUI-3.0/widgets/AceGUIWidget-Label.lua
4309+++ AceGUI-3.0/widgets/AceGUIWidget-Label.lua
4310@@ -57,12 +57,12 @@ local function UpdateImageAnchor(self)
4311 label:SetWidth(width)
4312 height = label:GetStringHeight()
4313 end
4314-
4315+
4316 -- avoid zero-height labels, since they can used as spacers
4317 if not height or height == 0 then
4318 height = 1
4319 end
4320-
4321+
4322 self.resizing = true
4323 frame:SetHeight(height)
4324 frame.height = height
4325@@ -113,7 +113,7 @@ local methods = {
4326 ["SetImage"] = function(self, path, ...)
4327 local image = self.image
4328 image:SetTexture(path)
4329-
4330+
4331 if image:GetTexture() then
4332 self.imageshown = true
4333 local n = select("#", ...)
4334diff --git AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
4335index 9af4b87..7bcf551 100644
4336--- AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
4337+++ AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
4338@@ -233,7 +233,7 @@ local methods = {
4339 end
4340 Layout(self)
4341 end,
4342-
4343+
4344 ["ClearFocus"] = function(self)
4345 self.editBox:ClearFocus()
4346 self.frame:SetScript("OnShow", nil)
4347@@ -253,12 +253,10 @@ local methods = {
4348 ["GetCursorPosition"] = function(self)
4349 return self.editBox:GetCursorPosition()
4350 end,
4351-
4352+
4353 ["SetCursorPosition"] = function(self, ...)
4354 return self.editBox:SetCursorPosition(...)
4355 end,
4356-
4357-
4358 }
4359
4360 --[[-----------------------------------------------------------------------------
4361@@ -273,7 +271,7 @@ local backdrop = {
4362 local function Constructor()
4363 local frame = CreateFrame("Frame", nil, UIParent)
4364 frame:Hide()
4365-
4366+
4367 local widgetNum = AceGUI:GetNextWidgetNum(Type)
4368
4369 local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
4370@@ -290,7 +288,7 @@ local function Constructor()
4371 button:SetText(ACCEPT)
4372 button:SetScript("OnClick", OnClick)
4373 button:Disable()
4374-
4375+
4376 local text = button:GetFontString()
4377 text:ClearAllPoints()
4378 text:SetPoint("TOPLEFT", button, "TOPLEFT", 5, -5)
4379@@ -339,7 +337,7 @@ local function Constructor()
4380 editBox:SetScript("OnTextChanged", OnTextChanged)
4381 editBox:SetScript("OnTextSet", OnTextSet)
4382 editBox:SetScript("OnEditFocusGained", OnEditFocusGained)
4383-
4384+
4385
4386 scrollFrame:SetScrollChild(editBox)
4387
4388diff --git AceGUI-3.0/widgets/AceGUIWidget-Slider.lua AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
4389index 5a81759..019c84e 100644
4390--- AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
4391+++ AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
4392@@ -105,7 +105,7 @@ local function EditBox_OnEnterPressed(frame)
4393 else
4394 value = tonumber(value)
4395 end
4396-
4397+
4398 if value then
4399 PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
4400 self.slider:SetValue(value)
4401diff --git AceHook-3.0/AceHook-3.0.lua AceHook-3.0/AceHook-3.0.lua
4402index 0996ee6..96f18a5 100644
4403--- AceHook-3.0/AceHook-3.0.lua
4404+++ AceHook-3.0/AceHook-3.0.lua
4405@@ -2,7 +2,7 @@
4406 -- Using AceHook-3.0 is recommended when you need to unhook your hooks again, so the hook chain isn't broken
4407 -- when you manually restore the original function.
4408 --
4409--- **AceHook-3.0** can be embeded into your addon, either explicitly by calling AceHook:Embed(MyAddon) or by
4410+-- **AceHook-3.0** can be embeded into your addon, either explicitly by calling AceHook:Embed(MyAddon) or by
4411 -- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
4412 -- and can be accessed directly, without having to explicitly call AceHook itself.\\
4413 -- It is recommended to embed AceHook, otherwise you'll have to specify a custom `self` on all calls you
4414@@ -117,14 +117,14 @@ function donothing() end
4415
4416 function hook(self, obj, method, handler, script, secure, raw, forceSecure, usage)
4417 if not handler then handler = method end
4418-
4419+
4420 -- These asserts make sure AceHooks's devs play by the rules.
4421 assert(not script or type(script) == "boolean")
4422 assert(not secure or type(secure) == "boolean")
4423 assert(not raw or type(raw) == "boolean")
4424 assert(not forceSecure or type(forceSecure) == "boolean")
4425 assert(usage)
4426-
4427+
4428 -- Error checking Battery!
4429 if obj and type(obj) ~= "table" then
4430 error(format("%s: 'object' - nil or table expected got %s", usage, type(obj)), 3)
4431@@ -146,8 +146,8 @@ function hook(self, obj, method, handler, script, secure, raw, forceSecure, usag
4432 error(format("Cannot hook secure script %q; Use SecureHookScript(obj, method, [handler]) instead.", method), 3)
4433 end
4434 else
4435- local issecure
4436- if obj then
4437+ local issecure
4438+ if obj then
4439 issecure = onceSecure[obj] and onceSecure[obj][method] or issecurevariable(obj, method)
4440 else
4441 issecure = onceSecure[method] or issecurevariable(method)
4442@@ -165,21 +165,21 @@ function hook(self, obj, method, handler, script, secure, raw, forceSecure, usag
4443 end
4444 end
4445 end
4446-
4447+
4448 local uid
4449 if obj then
4450 uid = registry[self][obj] and registry[self][obj][method]
4451 else
4452 uid = registry[self][method]
4453 end
4454-
4455+
4456 if uid then
4457 if actives[uid] then
4458 -- Only two sane choices exist here. We either a) error 100% of the time or b) always unhook and then hook
4459 -- choice b would likely lead to odd debuging conditions or other mysteries so we're going with a.
4460 error(format("Attempting to rehook already active hook %s.", method))
4461 end
4462-
4463+
4464 if handlers[uid] == handler then -- turn on a decative hook, note enclosures break this ability, small memory leak
4465 actives[uid] = true
4466 return
4467@@ -197,7 +197,7 @@ function hook(self, obj, method, handler, script, secure, raw, forceSecure, usag
4468 handlers[uid], actives[uid], scripts[uid] = nil, nil, nil
4469 uid = nil
4470 end
4471-
4472+
4473 local orig
4474 if script then
4475 orig = obj:GetScript(method) or donothing
4476@@ -206,13 +206,13 @@ function hook(self, obj, method, handler, script, secure, raw, forceSecure, usag
4477 else
4478 orig = _G[method]
4479 end
4480-
4481+
4482 if not orig then
4483 error(format("%s: Attempting to hook a non existing target", usage), 3)
4484 end
4485-
4486+
4487 uid = createHook(self, handler, orig, secure, not (raw or secure))
4488-
4489+
4490 if obj then
4491 self.hooks[obj] = self.hooks[obj] or {}
4492 registry[self][obj] = registry[self][obj] or {}
4493@@ -221,7 +221,7 @@ function hook(self, obj, method, handler, script, secure, raw, forceSecure, usag
4494 if not secure then
4495 self.hooks[obj][method] = orig
4496 end
4497-
4498+
4499 if script then
4500 if not secure then
4501 obj:SetScript(method, uid)
4502@@ -237,7 +237,7 @@ function hook(self, obj, method, handler, script, secure, raw, forceSecure, usag
4503 end
4504 else
4505 registry[self][method] = uid
4506-
4507+
4508 if not secure then
4509 _G[method] = uid
4510 self.hooks[method] = orig
4511@@ -245,8 +245,8 @@ function hook(self, obj, method, handler, script, secure, raw, forceSecure, usag
4512 hooksecurefunc(method, uid)
4513 end
4514 end
4515-
4516- actives[uid], handlers[uid], scripts[uid] = true, handler, script and true or nil
4517+
4518+ actives[uid], handlers[uid], scripts[uid] = true, handler, script and true or nil
4519 end
4520
4521 --- Hook a function or a method on an object.
4522@@ -262,7 +262,7 @@ end
4523 -- @usage
4524 -- -- create an addon with AceHook embeded
4525 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
4526---
4527+--
4528 -- function MyAddon:OnEnable()
4529 -- -- Hook ActionButton_UpdateHotkeys, overwriting the secure status
4530 -- self:Hook("ActionButton_UpdateHotkeys", true)
4531@@ -275,12 +275,12 @@ function AceHook:Hook(object, method, handler, hookSecure)
4532 if type(object) == "string" then
4533 method, handler, hookSecure, object = object, method, handler, nil
4534 end
4535-
4536+
4537 if handler == true then
4538 handler, hookSecure = nil, true
4539 end
4540
4541- hook(self, object, method, handler, false, false, false, hookSecure or false, "Usage: Hook([object], method, [handler], [hookSecure])")
4542+ hook(self, object, method, handler, false, false, false, hookSecure or false, "Usage: Hook([object], method, [handler], [hookSecure])")
4543 end
4544
4545 --- RawHook a function or a method on an object.
4546@@ -297,7 +297,7 @@ end
4547 -- @usage
4548 -- -- create an addon with AceHook embeded
4549 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
4550---
4551+--
4552 -- function MyAddon:OnEnable()
4553 -- -- Hook ActionButton_UpdateHotkeys, overwriting the secure status
4554 -- self:RawHook("ActionButton_UpdateHotkeys", true)
4555@@ -314,11 +314,11 @@ function AceHook:RawHook(object, method, handler, hookSecure)
4556 if type(object) == "string" then
4557 method, handler, hookSecure, object = object, method, handler, nil
4558 end
4559-
4560+
4561 if handler == true then
4562 handler, hookSecure = nil, true
4563 end
4564-
4565+
4566 hook(self, object, method, handler, false, false, true, hookSecure or false, "Usage: RawHook([object], method, [handler], [hookSecure])")
4567 end
4568
4569@@ -337,7 +337,7 @@ function AceHook:SecureHook(object, method, handler)
4570 if type(object) == "string" then
4571 method, handler, object = object, method, nil
4572 end
4573-
4574+
4575 hook(self, object, method, handler, false, true, false, false, "Usage: SecureHook([object], method, [handler])")
4576 end
4577
4578@@ -354,9 +354,9 @@ end
4579 -- @usage
4580 -- -- create an addon with AceHook embeded
4581 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
4582---
4583+--
4584 -- function MyAddon:OnEnable()
4585--- -- Hook the OnShow of FriendsFrame
4586+-- -- Hook the OnShow of FriendsFrame
4587 -- self:HookScript(FriendsFrame, "OnShow", "FriendsFrameOnShow")
4588 -- end
4589 --
4590@@ -380,9 +380,9 @@ end
4591 -- @usage
4592 -- -- create an addon with AceHook embeded
4593 -- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
4594---
4595+--
4596 -- function MyAddon:OnEnable()
4597--- -- Hook the OnShow of FriendsFrame
4598+-- -- Hook the OnShow of FriendsFrame
4599 -- self:RawHookScript(FriendsFrame, "OnShow", "FriendsFrameOnShow")
4600 -- end
4601 --
4602@@ -420,54 +420,54 @@ function AceHook:Unhook(obj, method)
4603 if type(obj) == "string" then
4604 method, obj = obj, nil
4605 end
4606-
4607+
4608 if obj and type(obj) ~= "table" then
4609 error(format("%s: 'obj' - expecting nil or table got %s", usage, type(obj)), 2)
4610 end
4611 if type(method) ~= "string" then
4612 error(format("%s: 'method' - expeting string got %s", usage, type(method)), 2)
4613 end
4614-
4615+
4616 local uid
4617 if obj then
4618 uid = registry[self][obj] and registry[self][obj][method]
4619 else
4620 uid = registry[self][method]
4621 end
4622-
4623+
4624 if not uid or not actives[uid] then
4625 -- Declining to error on an unneeded unhook since the end effect is the same and this would just be annoying.
4626 return false
4627 end
4628-
4629+
4630 actives[uid], handlers[uid] = nil, nil
4631-
4632+
4633 if obj then
4634 registry[self][obj][method] = nil
4635 registry[self][obj] = next(registry[self][obj]) and registry[self][obj] or nil
4636-
4637+
4638 -- if the hook reference doesnt exist, then its a secure hook, just bail out and dont do any unhooking
4639 if not self.hooks[obj] or not self.hooks[obj][method] then return true end
4640-
4641+
4642 if scripts[uid] and obj:GetScript(method) == uid then -- unhooks scripts
4643- obj:SetScript(method, self.hooks[obj][method] ~= donothing and self.hooks[obj][method] or nil)
4644+ obj:SetScript(method, self.hooks[obj][method] ~= donothing and self.hooks[obj][method] or nil)
4645 scripts[uid] = nil
4646 elseif obj and self.hooks[obj] and self.hooks[obj][method] and obj[method] == uid then -- unhooks methods
4647 obj[method] = self.hooks[obj][method]
4648 end
4649-
4650+
4651 self.hooks[obj][method] = nil
4652 self.hooks[obj] = next(self.hooks[obj]) and self.hooks[obj] or nil
4653 else
4654 registry[self][method] = nil
4655-
4656+
4657 -- if self.hooks[method] doesn't exist, then this is a SecureHook, just bail out
4658 if not self.hooks[method] then return true end
4659-
4660+
4661 if self.hooks[method] and _G[method] == uid then -- unhooks functions
4662 _G[method] = self.hooks[method]
4663 end
4664-
4665+
4666 self.hooks[method] = nil
4667 end
4668 return true
4669@@ -501,7 +501,7 @@ function AceHook:IsHooked(obj, method)
4670 return true, handlers[registry[self][obj][method]]
4671 end
4672 end
4673-
4674+
4675 return false, nil
4676 end
4677
4678diff --git AceSerializer-3.0/AceSerializer-3.0.lua AceSerializer-3.0/AceSerializer-3.0.lua
4679index 6885093..91c5510 100644
4680--- AceSerializer-3.0/AceSerializer-3.0.lua
4681+++ AceSerializer-3.0/AceSerializer-3.0.lua
4682@@ -1,9 +1,9 @@
4683 --- **AceSerializer-3.0** can serialize any variable (except functions or userdata) into a string format,
4684--- that can be send over the addon comm channel. AceSerializer was designed to keep all data intact, especially
4685+-- that can be send over the addon comm channel. AceSerializer was designed to keep all data intact, especially
4686 -- very large numbers or floating point numbers, and table structures. The only caveat currently is, that multiple
4687 -- references to the same table will be send individually.
4688 --
4689--- **AceSerializer-3.0** can be embeded into your addon, either explicitly by calling AceSerializer:Embed(MyAddon) or by
4690+-- **AceSerializer-3.0** can be embeded into your addon, either explicitly by calling AceSerializer:Embed(MyAddon) or by
4691 -- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
4692 -- and can be accessed directly, without having to explicitly call AceSerializer itself.\\
4693 -- It is recommended to embed AceSerializer, otherwise you'll have to specify a custom `self` on all calls you
4694@@ -40,7 +40,7 @@ local function SerializeStringHelper(ch) -- Used by SerializeValue for strings
4695 return "\126\122"
4696 elseif n<=32 then -- nonprint + space
4697 return "\126"..strchar(n+64)
4698- elseif n==94 then -- value separator
4699+ elseif n==94 then -- value separator
4700 return "\126\125"
4701 elseif n==126 then -- our own escape character
4702 return "\126\124"
4703@@ -54,12 +54,12 @@ end
4704 local function SerializeValue(v, res, nres)
4705 -- We use "^" as a value separator, followed by one byte for type indicator
4706 local t=type(v)
4707-
4708+
4709 if t=="string" then -- ^S = string (escaped to remove nonprints, "^"s, etc)
4710 res[nres+1] = "^S"
4711 res[nres+2] = gsub(v,"[%c \94\126\127]", SerializeStringHelper)
4712 nres=nres+2
4713-
4714+
4715 elseif t=="number" then -- ^N = number (just tostring()ed) or ^F (float components)
4716 local str = tostring(v)
4717 if tonumber(str)==v --[[not in 4.3 or str==serNaN]] then
4718@@ -79,7 +79,7 @@ local function SerializeValue(v, res, nres)
4719 res[nres+4] = tostring(e-53) -- adjust exponent to counteract mantissa manipulation
4720 nres=nres+4
4721 end
4722-
4723+
4724 elseif t=="table" then -- ^T...^t = table (list of key,value pairs)
4725 nres=nres+1
4726 res[nres] = "^T"
4727@@ -89,7 +89,7 @@ local function SerializeValue(v, res, nres)
4728 end
4729 nres=nres+1
4730 res[nres] = "^t"
4731-
4732+
4733 elseif t=="boolean" then -- ^B = true, ^b = false
4734 nres=nres+1
4735 if v then
4736@@ -97,15 +97,15 @@ local function SerializeValue(v, res, nres)
4737 else
4738 res[nres] = "^b" -- false
4739 end
4740-
4741+
4742 elseif t=="nil" then -- ^Z = nil (zero, "N" was taken :P)
4743 nres=nres+1
4744 res[nres] = "^Z"
4745-
4746+
4747 else
4748 error(MAJOR..": Cannot serialize a value of type '"..t.."'") -- can't produce error on right level, this is wildly recursive
4749 end
4750-
4751+
4752 return nres
4753 end
4754
4755@@ -121,14 +121,14 @@ local serializeTbl = { "^1" } -- "^1" = Hi, I'm data serialized by AceSerializer
4756 -- @return The data in its serialized form (string)
4757 function AceSerializer:Serialize(...)
4758 local nres = 1
4759-
4760+
4761 for i=1,select("#", ...) do
4762 local v = select(i, ...)
4763 nres = SerializeValue(v, serializeTbl, nres)
4764 end
4765-
4766+
4767 serializeTbl[nres+1] = "^^" -- "^^" = End of serialized data
4768-
4769+
4770 return tconcat(serializeTbl, "", 1, nres+1)
4771 end
4772
4773@@ -175,9 +175,9 @@ local function DeserializeValue(iter,single,ctl,data)
4774 ctl,data = iter()
4775 end
4776
4777- if not ctl then
4778+ if not ctl then
4779 error("Supplied data misses AceSerializer terminator ('^^')")
4780- end
4781+ end
4782
4783 if ctl=="^^" then
4784 -- ignore extraneous data
4785@@ -185,7 +185,7 @@ local function DeserializeValue(iter,single,ctl,data)
4786 end
4787
4788 local res
4789-
4790+
4791 if ctl=="^S" then
4792 res = gsub(data, "~.", DeserializeStringHelper)
4793 elseif ctl=="^N" then
4794@@ -218,7 +218,7 @@ local function DeserializeValue(iter,single,ctl,data)
4795 ctl,data = iter()
4796 if ctl=="^t" then break end -- ignore ^t's data
4797 k = DeserializeValue(iter,true,ctl,data)
4798- if k==nil then
4799+ if k==nil then
4800 error("Invalid AceSerializer table format (no table end marker)")
4801 end
4802 ctl,data = iter()
4803@@ -231,7 +231,7 @@ local function DeserializeValue(iter,single,ctl,data)
4804 else
4805 error("Invalid AceSerializer control code '"..ctl.."'")
4806 end
4807-
4808+
4809 if not single then
4810 return res,DeserializeValue(iter)
4811 else
4812diff --git AceTab-3.0/AceTab-3.0.lua AceTab-3.0/AceTab-3.0.lua
4813index 8a30756..f02354c 100644
4814--- AceTab-3.0/AceTab-3.0.lua
4815+++ AceTab-3.0/AceTab-3.0.lua
4816@@ -131,7 +131,7 @@ function AceTab:RegisterTabCompletion(descriptor, prematches, wordlist, usagefun
4817 elseif type(listenframes) ~= 'table' or type(listenframes[0]) == 'userdata' and type(listenframes.IsObjectType) == 'function' then -- single frame or framename
4818 listenframes = { listenframes }
4819 end
4820-
4821+
4822 -- Hook each registered listenframe and give it a matches table.
4823 for _, f in pairs(listenframes) do
4824 if type(f) == 'string' then
4825@@ -148,7 +148,7 @@ function AceTab:RegisterTabCompletion(descriptor, prematches, wordlist, usagefun
4826 end
4827 end
4828 end
4829-
4830+
4831 -- Everything checks out; register this completion.
4832 if not registry[descriptor] then
4833 registry[descriptor] = { prematches = pmtable, wordlist = wordlist, usagefunc = usagefunc, listenframes = listenframes, postfunc = postfunc, pmoverwrite = pmoverwrite }
4834@@ -358,7 +358,7 @@ function AceTab:OnTabPressed(this)
4835 firstPMLength = 0
4836 hasNonFallback = false
4837 for i in pairs(pmolengths) do pmolengths[i] = nil end
4838-
4839+
4840 for desc in pairs(notfallbacks) do
4841 fillMatches(this, desc)
4842 end
4843@@ -368,7 +368,7 @@ function AceTab:OnTabPressed(this)
4844 end
4845 end
4846
4847- if not firstMatch then
4848+ if not firstMatch then
4849 this.at3_last_precursor = "\0"
4850 return true
4851 end
4852@@ -390,7 +390,7 @@ function AceTab:OnTabPressed(this)
4853 for desc, matches in pairs(this.at3matches) do
4854 -- Don't print usage statements for fallback completion groups if we have 'real' completion groups with matches.
4855 if hasNonFallback and fallbacks[desc] then break end
4856-
4857+
4858 -- Use the group's description as a heading for its usage statements.
4859 DEFAULT_CHAT_FRAME:AddMessage(desc..":")
4860
4861diff --git LibStub/LibStub.lua LibStub/LibStub.lua
4862index 0a41ac0..725982d 100644
4863--- LibStub/LibStub.lua
4864+++ LibStub/LibStub.lua
4865@@ -7,24 +7,24 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then
4866 LibStub = LibStub or {libs = {}, minors = {} }
4867 _G[LIBSTUB_MAJOR] = LibStub
4868 LibStub.minor = LIBSTUB_MINOR
4869-
4870+
4871 function LibStub:NewLibrary(major, minor)
4872 assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
4873 minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
4874-
4875+
4876 local oldminor = self.minors[major]
4877 if oldminor and oldminor >= minor then return nil end
4878 self.minors[major], self.libs[major] = minor, self.libs[major] or {}
4879 return self.libs[major], oldminor
4880 end
4881-
4882+
4883 function LibStub:GetLibrary(major, silent)
4884 if not self.libs[major] and not silent then
4885 error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
4886 end
4887 return self.libs[major], self.minors[major]
4888 end
4889-
4890+
4891 function LibStub:IterateLibraries() return pairs(self.libs) end
4892 setmetatable(LibStub, { __call = LibStub.GetLibrary })
4893 end