From 4197a7e7b91095b5e8e61040e7288ae95862c339 Mon Sep 17 00:00:00 2001 From: Mark W Date: Sat, 6 May 2023 13:34:41 +0200 Subject: [PATCH] Remove TradeSkillUI integration on wrath, since apparently it's broken --- MacroToolkit/MacroToolkit.lua | 56 ++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/MacroToolkit/MacroToolkit.lua b/MacroToolkit/MacroToolkit.lua index ad2023f..34c8559 100644 --- a/MacroToolkit/MacroToolkit.lua +++ b/MacroToolkit/MacroToolkit.lua @@ -125,33 +125,35 @@ function MT:eventHandler(this, event, arg1, ...) HideUIPanel(MacroFrame) MTF:Show() end) - elseif arg1 == "Blizzard_TradeSkillUI" then - --override code to handle tradeskill links - local function btsui_onclick() - local activeEditBox = ChatEdit_GetActiveWindow() - local activeMacroFrameText - if MacroFrameText and MacroFrameText:IsShown() and MacroFrameText:HasFocus() then - activeMacroFrameText = MacroFrameText - elseif MacroToolkitText:IsShown() and MacroToolkitText:HasFocus() then - activeMacroFrameText = MacroToolkitText - end - if activeMacroFrameText then - --local link = GetTradeSkillListLink() - local link = C_TradeSkillUI.GetTradeSkillListLink() - local text = format("%s%s", activeMacroFrameText:GetText(), link) - if 255 >= strlenutf8(text) then activeMacroFrameText:Insert(link) end - elseif activeEditBox then - --local link = GetTradeSkillListLink() - -- ticket 134 - fix by picro - local link = C_TradeSkillUI.GetTradeSkillListLink() - if not ChatEdit_InsertLink(link) then assert(activeEditBox:GetName(), "Failed to add tradeskill link") end - --else ToggleDropDownMenu(1, nil, TradeSkillLinkDropDown, "TradeSkillLinkFrame", 25, 25) end - else ToggleDropDownMenu(1, nil, TradeSkillFrame.LinkToDropDown, TradeSkillFrame.LinkToButton, 25, 25) end - --PlaySound("igMainMenuOptionCheckBoxOn") - PlaySound(856) - end - --TradeSkillLinkButton:SetScript("OnClick", btsui_onclick) - TradeSkillFrame.LinkToButton:SetScript("OnClick", btsui_onclick) + --- breaks on wrath classic + --- @TODO: found out if we care + --elseif arg1 == "Blizzard_TradeSkillUI" then + -- --override code to handle tradeskill links + -- local function btsui_onclick() + -- local activeEditBox = ChatEdit_GetActiveWindow() + -- local activeMacroFrameText + -- if MacroFrameText and MacroFrameText:IsShown() and MacroFrameText:HasFocus() then + -- activeMacroFrameText = MacroFrameText + -- elseif MacroToolkitText:IsShown() and MacroToolkitText:HasFocus() then + -- activeMacroFrameText = MacroToolkitText + -- end + -- if activeMacroFrameText then + -- --local link = GetTradeSkillListLink() + -- local link = C_TradeSkillUI.GetTradeSkillListLink() + -- local text = format("%s%s", activeMacroFrameText:GetText(), link) + -- if 255 >= strlenutf8(text) then activeMacroFrameText:Insert(link) end + -- elseif activeEditBox then + -- --local link = GetTradeSkillListLink() + -- -- ticket 134 - fix by picro + -- local link = C_TradeSkillUI.GetTradeSkillListLink() + -- if not ChatEdit_InsertLink(link) then assert(activeEditBox:GetName(), "Failed to add tradeskill link") end + -- --else ToggleDropDownMenu(1, nil, TradeSkillLinkDropDown, "TradeSkillLinkFrame", 25, 25) end + -- else ToggleDropDownMenu(1, nil, TradeSkillFrame.LinkToDropDown, TradeSkillFrame.LinkToButton, 25, 25) end + -- --PlaySound("igMainMenuOptionCheckBoxOn") + -- PlaySound(856) + -- end + -- --TradeSkillLinkButton:SetScript("OnClick", btsui_onclick) + -- TradeSkillFrame.LinkToButton:SetScript("OnClick", btsui_onclick) end elseif event == "PLAYER_LOGIN" then MT:BuildCommandList()