diff modules/Stance.lua @ 147:901c91dc1bf2

Some refactoring of configmode/keybind handlers
author Flick <flickerstreak@gmail.com>
date Thu, 07 May 2009 23:55:00 +0000
parents d186e041ca14
children df68b5a40490
line wrap: on
line diff
--- a/modules/Stance.lua	Thu Apr 30 16:51:43 2009 +0000
+++ b/modules/Stance.lua	Thu May 07 23:55:00 2009 +0000
@@ -17,9 +17,6 @@
   -- mixins go here
 )
 
--- libraries
-local KB = LibStub("LibKeyBound-1.0")
-
 -- handlers
 function module:OnInitialize()
   self.db = ReAction.db:RegisterNamespace( moduleID,
@@ -39,11 +36,6 @@
   ReAction.RegisterCallback(self, "OnRefreshBar")
   ReAction.RegisterCallback(self, "OnEraseBar")
   ReAction.RegisterCallback(self, "OnRenameBar")
-  ReAction.RegisterCallback(self, "OnConfigModeChanged")
-
-  KB.RegisterCallback(self, "LIBKEYBOUND_ENABLED")
-  KB.RegisterCallback(self, "LIBKEYBOUND_DISABLED")
-  KB.RegisterCallback(self, "LIBKEYBOUND_MODE_COLOR_CHANGED","LIBKEYBOUND_ENABLED")
 end
 
 function module:OnEnable()
@@ -128,30 +120,6 @@
   b[newname], b[oldname] = b[oldname], nil
 end
 
-function module:OnConfigModeChanged(event, mode)
-  for bar in pairs(self.buttons) do
-    for b in bar:IterateButtons() do
-      b:UpdateActionIDLabel(mode)
-    end
-  end
-end
-
-function module:LIBKEYBOUND_ENABLED(evt)
-  for _, buttons in pairs(self.buttons) do
-    for _, b in pairs(buttons) do
-      b:SetKeybindMode(true)
-    end
-  end
-end
-
-function module:LIBKEYBOUND_DISABLED(evt)
-  for _, buttons in pairs(self.buttons) do
-    for _, b in pairs(buttons) do
-      b:SetKeybindMode(false)
-    end
-  end
-end
-
 function module:RefreshAll()
   for bar in pairs(self.buttons) do
     self:OnRefreshBar(nil,bar,bar:GetName())