From cd9e02cd5ba21650f33e4b531dcdacb8fea56ca9 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Fri, 30 Nov 2007 16:08:53 +0000 Subject: [PATCH] create bars in OnEnable so blizzard frame positioning code doesnt screw us --- ActionBars.lua | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ActionBars.lua b/ActionBars.lua index 7b92e85..4abc621 100644 --- a/ActionBars.lua +++ b/ActionBars.lua @@ -21,22 +21,20 @@ local defaults = { local actionbars = {} function BT4ActionBars:OnInitialize() self.db = Bartender4.db:RegisterNamespace("ActionBars", defaults) - +end + +function BT4ActionBars:OnEnable() for i=1,10 do actionbars[i] = self:Create(i, self.db.profile.Bars[i]) end - self.db.RegisterCallback(self, "OnProfileChanged", "ApplyConfig") self.db.RegisterCallback(self, "OnProfileCopied", "ApplyConfig") end -function BT4ActionBars:OnEnable() - -- do stuff -end - function BT4ActionBars:ApplyConfig() for i,v in ipairs(actionbars) do - v:ApplyConfig(self.db.profile.Bars[k]) + v:ApplyConfig(self.db.profile.Bars[i]) + v:Unlock() end end @@ -53,7 +51,7 @@ function BT4ActionBars:Create(id, config) -- TODO: Setup Buttons and set bar width before pulling initial position bar:ApplyConfig() - -- for debugging only + -- debugging bar:Unlock() return bar