From af1c76c0bff5b3fad97df1607ffd09c44cbca45f Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sun, 5 Apr 2009 23:22:27 +0000 Subject: [PATCH] * Fix for moving the panel to the bottom instead of the top.. kind of --- NinjaPanel.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/NinjaPanel.lua b/NinjaPanel.lua index 5217353..dfad0b1 100644 --- a/NinjaPanel.lua +++ b/NinjaPanel.lua @@ -24,7 +24,13 @@ eventFrame:SetScript("OnEvent", function(self, event, arg1, ...) for k,v in pairs(db.plugins) do if type(v.panel) ~= "string" then v.panel = nil end end self:UnregisterEvent("ADDON_LOADED") + + -- In order to set the bar on the bottom instead of the top + -- comment out the first line, and uncomment the second + NinjaPanel:SpawnPanel("NinjaPanelTop", "TOP") + --NinjaPanel:SpawnPanel("NinjaPanelBottom", "BOTTOM") + if db.DEVELOPMENT then -- Spawn all four bars so we can test NinjaPanel:SpawnPanel("NinjaPanelBottom", "BOTTOM") @@ -313,8 +319,14 @@ function NinjaPanel:UpdatePanels() local head = self.panels[1] for name,entry in pairs(self.plugins) do local opt = db.plugins[name] - if not entry.panel then - opt.panel = opt.panel and self.panels[opt.panel].name or head.name + -- If the plugin hasn't been claimed + if not entry.panel then + if opt.panel and not self.panels[opt.panel] then + -- The assigned panel does not exist + -- do nothing, skip + else + opt.panel = opt.panel and self.panels[opt.panel].name or head.name + end end self:AttachPlugin(entry, opt.panel) end -- 1.7.9.5