changeset 258:a7d2efb6ffc9 stable

Merge 1.1 beta 5 to stable
author Flick
date Tue, 12 Apr 2011 16:07:21 -0700
parents 920d17851a93 (current diff) 7c62b9b7a70f (diff)
children d2e55b61e5e6
files .hgtags
diffstat 7 files changed, 39 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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
--- 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 = {
--- 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
--- 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
--- 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
--- 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