# HG changeset patch # User Flick # Date 1302649641 25200 # Node ID a7d2efb6ffc9e7dee05b676a72d53182ec1f2ca0 # Parent 920d17851a936226ba80de7b77f3904fa6490166# Parent 7c62b9b7a70f0d8136a2acece738c773990f3273 Merge 1.1 beta 5 to stable diff -r 920d17851a93 -r a7d2efb6ffc9 .hgtags --- a/.hgtags Tue Apr 12 16:06:31 2011 -0700 +++ b/.hgtags Tue Apr 12 16:07:21 2011 -0700 @@ -2,3 +2,4 @@ 9945a783d8b29e6e81eb8d42823d56dc84759d15 1.1 Beta 2 3e451836ce6dfa758794c27a4b3a2a1f12595e83 1.1 Beta 3 47818b3938c912c19018419cb5738d4013107167 1.1 beta 4 +455ef506f9695045737410a6529c9c6eb7d33022 1.1 beta 5 diff -r 920d17851a93 -r a7d2efb6ffc9 Button.lua --- a/Button.lua Tue Apr 12 16:06:31 2011 -0700 +++ b/Button.lua Tue Apr 12 16:07:21 2011 -0700 @@ -233,7 +233,7 @@ end if id == nil then if unique then - return nil + error(("All action IDs for bars of type '%s' are in use, cannot create any more buttons"):format(self.config.barType)) end pool.nWraps = nWraps + 1 end diff -r 920d17851a93 -r a7d2efb6ffc9 Editor.lua --- a/Editor.lua Tue Apr 12 16:06:31 2011 -0700 +++ b/Editor.lua Tue Apr 12 16:07:21 2011 -0700 @@ -43,11 +43,6 @@ frame:SetClampedToScreen(true) frame:Hide() - frame:SetScript("OnHide", - function(...) - ReAction:SetConfigMode(false) - end) - self.title = ("%s - %s"):format(L["ReAction"],L["Bar Editor"]) self.gui:SetTitle(self.title) @@ -61,7 +56,19 @@ type = "execute", name = L["Global Config"], desc = L["Opens ReAction global configuration settings panel"], - func = function() ReAction:ShowOptions(); self:Close() end, + func = function() + -- AceConfigDialog calls :Open() after every selection, making it + -- generally not possible to cleanly close from a menu item. + -- If you don't use a custom frame, you can use ACD:Close(), but since + -- we're using a custom frame, we have to do the work of closing later in an + -- OnUpdate script. + ReAction:ShowOptions(); + frame:SetScript("OnUpdate", + function() + self:Close() + frame:SetScript("OnUpdate",nil) + end) + end, order = 1 }, desc = { diff -r 920d17851a93 -r a7d2efb6ffc9 ReAction.lua --- a/ReAction.lua Tue Apr 12 16:06:31 2011 -0700 +++ b/ReAction.lua Tue Apr 12 16:07:21 2011 -0700 @@ -228,8 +228,10 @@ config.x = config.x or 0 else config = config or profile.bars[name] or { } - if not config or not config.type or not self.barTypes[config.type] then - error(("ReAction: Unable to construct/fetch config table for bar '%s'"):format(name)) + if not config then + error(("ReAction: Unable to fetch config table for bar '%s'"):format(name)) + elseif not config.type or not self.barTypes[config.type] then + error(("ReAction: Unrecognized bar type '%s' for bar '%s'"):format(tostring(config.type), name)) end class = self.barTypes[config.type] end diff -r 920d17851a93 -r a7d2efb6ffc9 ReAction.toc --- a/ReAction.toc Tue Apr 12 16:06:31 2011 -0700 +++ b/ReAction.toc Tue Apr 12 16:07:21 2011 -0700 @@ -4,7 +4,7 @@ ## DefaultState: enabled ## LoadOnDemand: 0 ## Author: Flick -## Version: 1.1 beta 4 +## Version: 1.1 beta 5 ## SavedVariables: ReAction_DB ## X-Embeds: Ace3, LibKeyBound-1.0 ## X-Category: Action Bars diff -r 920d17851a93 -r a7d2efb6ffc9 StanceButton.lua --- a/StanceButton.lua Tue Apr 12 16:06:31 2011 -0700 +++ b/StanceButton.lua Tue Apr 12 16:07:21 2011 -0700 @@ -35,7 +35,7 @@ local Super = ReAction.Button local Stance = setmetatable( { - defaultConfig = { + defaultBarConfig = { type = buttonTypeID, btnHeight = 36, btnWidth = 36, @@ -61,9 +61,8 @@ local barFrame = bar:GetFrame() local config = self:GetConfig() - -- set up the base stance ID - self:SetActionIDPool("stance",8) - config.stanceID = self:AcquireActionID(config.stanceID, idHint, true) + -- set up the stance ID + config.stanceID = config.stanceID or idx -- attribute setup f:SetAttribute("type","spell") @@ -101,6 +100,14 @@ return self.config.stanceID end +function Stance:AcquireActionID() + -- don't use pool +end + +function Stance:ReleaseActionID() + -- don't use pool +end + function Stance:UpdateAction() if InCombatLockdown() then self.updatePending = true diff -r 920d17851a93 -r a7d2efb6ffc9 VehicleExitButton.lua --- a/VehicleExitButton.lua Tue Apr 12 16:06:31 2011 -0700 +++ b/VehicleExitButton.lua Tue Apr 12 16:07:21 2011 -0700 @@ -70,6 +70,14 @@ return 1 end +function VExitButton:AcquireActionID() + -- don't use pool +end + +function VExitButton:ReleaseActionID() + -- don't use pool +end + function VExitButton:Refresh() Super.Refresh(self) -- it seems that setscale kills the texcoord, have to refresh it