Quantcast

Revert "Use 'secure' registration for RegisterFrame"

James Whitehead II [05-20-11 - 07:22]
Revert "Use 'secure' registration for RegisterFrame"

This reverts commit 0fa3e7bde2be8b508e152999872878425cb612ec.
Filename
Clique.lua
diff --git a/Clique.lua b/Clique.lua
index 11eca48..d994f70 100755
--- a/Clique.lua
+++ b/Clique.lua
@@ -105,9 +105,6 @@ function addon:Initialize()
     -- attribute, which can only be accomplished in a restricted environment.
     self.header:SetAttribute("clickcast_register", [===[
         local button = self:GetAttribute("clickcast_button")
-        if not button then
-            button = self:GetFrameRef("clickcast_button")
-        end

         -- Export this frame so we can display it in the insecure environment
         self:SetAttribute("export_register", button)
@@ -220,20 +217,14 @@ function addon:RegisterFrame(button)
         return
     end

-    -- Wrap the OnEnter/OnLeave scripts in order to handle keybindings
-    addon.header:WrapScript(button, "OnEnter", addon.header:GetAttribute("setup_onenter"))
-    addon.header:WrapScript(button, "OnLeave", addon.header:GetAttribute("setup_onleave"))
-
-    self.header:SetFrameRef("clickcast_button", button)
-    self.header:Execute(self.header:GetAttribute("clickcast_register"), button)
-    do
-        return
-    end
-
     self.ccframes[button] = true

     self:UpdateRegisteredClicks(button)

+    -- Wrap the OnEnter/OnLeave scripts in order to handle keybindings
+    addon.header:WrapScript(button, "OnEnter", addon.header:GetAttribute("setup_onenter"))
+    addon.header:WrapScript(button, "OnLeave", addon.header:GetAttribute("setup_onleave"))
+
     -- Set the attributes on the frame
     self.header:SetFrameRef("cliquesetup_button", button)
     self.header:Execute(self.header:GetAttribute("setup_clicks"), button)