Skip to content

Commit

Permalink
Remove compat code
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Jul 18, 2018
1 parent 454971c commit 0927c09
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 54 deletions.
24 changes: 11 additions & 13 deletions buttons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@ local _, BCM = ...
BCM.modules[#BCM.modules+1] = function()
if bcmDB.BCM_ButtonHide then return end

if not C_Map then -- XXX 8.0
local hideFunc = function(frame) frame:Hide() end
ChatFrameMenuButton:HookScript("OnShow", hideFunc) --Hide the chat shortcut button for emotes/languages/etc
ChatFrameMenuButton:Hide() --Hide the chat shortcut button for emotes/languages/etc
if QuickJoinToastButton then
QuickJoinToastButton:HookScript("OnShow", hideFunc) --Hide the "Friends Online" count button
QuickJoinToastButton:Hide() --Hide the "Friends Online" count button
end
local hideFunc = function(frame) frame:Hide() end
ChatFrameMenuButton:HookScript("OnShow", hideFunc) --Hide the chat shortcut button for emotes/languages/etc
ChatFrameMenuButton:Hide() --Hide the chat shortcut button for emotes/languages/etc
if QuickJoinToastButton then
QuickJoinToastButton:HookScript("OnShow", hideFunc) --Hide the "Friends Online" count button
QuickJoinToastButton:Hide() --Hide the "Friends Online" count button
end

BCM.chatFuncsPerFrame[#BCM.chatFuncsPerFrame+1] = function(n)
local btnFrame = _G[n.."ButtonFrame"]
btnFrame:HookScript("OnShow", hideFunc) --Hide the up/down arrows
btnFrame:Hide() --Hide the up/down arrows
end
BCM.chatFuncsPerFrame[#BCM.chatFuncsPerFrame+1] = function(n)
local btnFrame = _G[n.."ButtonFrame"]
btnFrame:HookScript("OnShow", hideFunc) --Hide the up/down arrows
btnFrame:Hide() --Hide the up/down arrows
end
end

31 changes: 1 addition & 30 deletions scrolldown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,7 @@

local _, BCM = ...
BCM.modules[#BCM.modules+1] = function()
if bcmDB.BCM_ScrollDown or bcmDB.BCM_ButtonHide or not GetCVarBool("chatMouseScroll") then return end

local clickFunc = function(frame)
frame:GetParent():ScrollToBottom()
frame:Hide()
end

local showFunc = function(frame)
local n = frame:GetName()
if frame:AtBottom() then
_G[n.."ButtonFrameBottomButton"]:Hide()
else
_G[n.."ButtonFrameBottomButton"]:Show()
end
end
if bcmDB.BCM_ScrollDown or not GetCVarBool("chatMouseScroll") then return end

local scrollFunc = function(frame, d)
if d > 0 then
Expand All @@ -37,26 +23,11 @@ BCM.modules[#BCM.modules+1] = function()
-- frame:ScrollDown()
end
end
showFunc(frame)
end



BCM.chatFuncsPerFrame[#BCM.chatFuncsPerFrame+1] = function(n)
local cf = _G[n]
cf:HookScript("OnMouseWheel", scrollFunc)
local btn = _G[n.."ButtonFrameBottomButton"]
if btn then -- XXX 8.0
btn:ClearAllPoints()
cf:HookScript("OnShow", showFunc)
btn:SetParent(cf)
btn:SetPoint("TOPRIGHT")
btn:SetScript("OnClick", clickFunc)
btn:SetSize(20, 20)
btn:Hide()
else
showFunc = function() end
end
end
end

11 changes: 0 additions & 11 deletions timestamp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ BCM.modules[#BCM.modules+1] = function()

local bcmDB = bcmDB

-- XXX temp since 7.0.3
if bcmDB.stampcolor then
bcmDB.stampcol = bcmDB.stampcolor:sub(5)
end
bcmDB.stampcolor = nil
if bcmDB.stampformat then
bcmDB.stampfmt = bcmDB.stampformat.. " "
end
bcmDB.stampformat = nil
-- XXX end temp

if bcmDB.BCM_Timestamp then bcmDB.stampcol = nil bcmDB.stampfmt = nil return end

if GetCVar("showTimestamps") ~= "none" then
Expand Down

0 comments on commit 0927c09

Please sign in to comment.