changeset 209:3e451836ce6d 1.1 Beta 3

Merge c24ac8ee1e45857c35b8f241a3782e884ee9c7c0
author Flick <flickerstreak@gmail.com>
date Thu, 18 Nov 2010 13:09:14 -0800
parents 443d2ea4be86 (current diff) c24ac8ee1e45 (diff)
children b2b105747466 e275a8663a16
files ReAction.lua
diffstat 5 files changed, 24 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/ReAction.lua	Thu Nov 18 13:06:14 2010 -0800
+++ b/ReAction.lua	Thu Nov 18 13:09:14 2010 -0800
@@ -49,6 +49,7 @@
   self.callbacks = LibStub("CallbackHandler-1.0"):New(self)
   LKB.RegisterCallback(self,"LIBKEYBOUND_ENABLED")
   LKB.RegisterCallback(self,"LIBKEYBOUND_DISABLED")
+  LKB.RegisterCallback(self, "LIBKEYBOUND_MODE_COLOR_CHANGED","LIBKEYBOUND_ENABLED")
   self:RegisterEvent("PLAYER_REGEN_DISABLED")
   self:InitializeOptions()
 end
@@ -271,6 +272,9 @@
 
 function ReAction:SetConfigMode( mode )
   if mode ~= self.configMode then
+    if mode then
+      self:SetKeybindMode(false)
+    end
     self.configMode = mode
     self.callbacks:Fire("OnConfigModeChanged", mode)
   end
@@ -283,10 +287,14 @@
 function ReAction:SetKeybindMode( mode )
   if mode ~= self.kbMode then
     if mode then
+      self:SetConfigMode(false)
       LKB:Activate()
     else
       LKB:Deactivate()
     end
+    for _, bar in self:IterateBars() do
+      bar:SetKeybindMode(mode)
+    end
     self.kbMode = LKB:IsShown() or false
   end
 end
--- a/ReAction.toc	Thu Nov 18 13:06:14 2010 -0800
+++ b/ReAction.toc	Thu Nov 18 13:09:14 2010 -0800
@@ -11,12 +11,4 @@
 ## X-Category: Action Bars
 ## X-License: MIT
 
-lib\embeds.xml
-locale\locale.xml
-
-ReAction.lua
-Options.lua
-Editor.lua
-
-classes\classes.xml
-modules\modules.xml
+ReAction.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ReAction.xml	Thu Nov 18 13:09:14 2010 -0800
@@ -0,0 +1,15 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" 
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
+
+  <Include file="lib\embeds.xml"/>
+  <Include file="locale\locale.xml"/>
+
+  <Script file="ReAction.lua"/>
+  <Script file="Options.lua"/>
+  <Script file="Editor.lua"/>
+
+  <Include file="classes\classes.xml"/>
+  <Include file="modules\modules.xml"/>
+
+</Ui>
--- a/classes/Bar.lua	Thu Nov 18 13:06:14 2010 -0800
+++ b/classes/Bar.lua	Thu Nov 18 13:09:14 2010 -0800
@@ -247,9 +247,6 @@
   self:SetKeybindMode(ReAction:GetKeybindMode())
 
   ReAction.RegisterCallback(self, "OnConfigModeChanged")
-  LKB.RegisterCallback(self, "LIBKEYBOUND_ENABLED")
-  LKB.RegisterCallback(self, "LIBKEYBOUND_DISABLED")
-  LKB.RegisterCallback(self, "LIBKEYBOUND_MODE_COLOR_CHANGED","LIBKEYBOUND_ENABLED")
 
   return self
 end
@@ -274,14 +271,6 @@
   self:SetConfigMode(mode)
 end
 
-function Bar:LIBKEYBOUND_ENABLED(evt)
-  self:SetKeybindMode(true)
-end
-
-function Bar:LIBKEYBOUND_DISABLED(evt)
-  self:SetKeybindMode(false)
-end
-
 --
 -- Accessors
 --
--- a/classes/Overlay.lua	Thu Nov 18 13:06:14 2010 -0800
+++ b/classes/Overlay.lua	Thu Nov 18 13:09:14 2010 -0800
@@ -704,23 +704,12 @@
     end
   )
 
-  function overlay:LIBKEYBOUND_ENABLED(evt)
-    self:SetFrameLevel(1)
-  end
-
-  function overlay:LIBKEYBOUND_DISABLED(evt)
-    self:SetFrameLevel(10)
-  end
-
   function overlay:RefreshControls()
     UpdateAnchorDecoration()
   end
 
   overlay:SetScript("OnShow", overlay.RefreshControls)
 
-  LKB.RegisterCallback(overlay,"LIBKEYBOUND_ENABLED")
-  LKB.RegisterCallback(overlay,"LIBKEYBOUND_DISABLED")
-
   if ReAction:GetKeybindMode() then
     overlay:SetFrameLevel(1)
   end