From 638f3c7d64a2141592f07c4d6598c51cb57e27a4 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Wed, 6 Mar 2013 03:33:07 +0000 Subject: [PATCH] Fixing menu bindings --- Clique.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Clique.lua b/Clique.lua index d7ec7cd..7bf7d63 100755 --- a/Clique.lua +++ b/Clique.lua @@ -271,12 +271,6 @@ function addon:Enable() CliqueSpellTab.tooltip = L["Clique binding configuration"] end -local build = select(2, GetBuildInfo()) -local menuType = 'menu' -if tonumber(build) >= 16562 then - menuType = 'togglemenu' -end - -- A new profile is being created in the db, called 'profile' function addon:OnNewProfile(event, db, profile) table.insert(db.profile.bindings, { @@ -290,7 +284,7 @@ function addon:OnNewProfile(event, db, profile) table.insert(db.profile.bindings, { key = "BUTTON2", - type = menuType, + type = "menu", sets = { default = true }, @@ -503,9 +497,12 @@ function addon:GetClickAttributes(global) end -- Build any needed SetAttribute() calls - if entry.type == "target" or entry.type == "menu" then + if entry.type == "target" then bits[#bits + 1] = ATTR(indent, prefix, "type", suffix, entry.type) rembits[#rembits + 1] = REMATTR(prefix, "type", suffix) + elseif entry.type == "menu" then + bits[#bits + 1] = ATTR(indent, prefix, "type", suffix, "togglemenu") + rembits[#rembits + 1] = REMATTR(prefix, "type", suffix) elseif entry.type == "spell" and self.settings.stopcastingfix then -- Implement the 'stop casting'f ix local macrotext -- 1.7.9.5