Skip to content

Commit

Permalink
Cleanup some deprecated stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevcairiel committed Nov 28, 2024
1 parent d5f12c4 commit b4e0d81
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1141,29 +1141,13 @@ local faqOptions = {
local acr = LibStub("AceConfigRegistry-3.0")
local acd = LibStub("AceConfigDialog-3.0")

local function findPanel(name, parent)
for i, button in next, InterfaceOptionsFrameAddOns.buttons do
if button.element then
if name and button.element.name == name then return button
elseif parent and button.element.parent == parent then return button
end
end
end
end
function Config:OnInitialize()
db = GatherMate.db.profile

self.importHelper = ImportHelper

acr:RegisterOptionsTable("GatherMate 2", generalOptions)
local options = acd:AddToBlizOptions("GatherMate 2", "GatherMate 2")

if InterfaceOptionsFrameAddOns then
options:HookScript("OnShow", function()
local p = findPanel("GatherMate 2")
if p and p.element.collapsed then OptionsListButtonToggle_OnClick(p.toggle) end
end)
end
acd:AddToBlizOptions("GatherMate 2", "GatherMate 2")

acr:RegisterOptionsTable("GM2/Minimap", minimapOptions)
acd:AddToBlizOptions("GM2/Minimap", "Minimap", "GatherMate 2")
Expand All @@ -1184,11 +1168,7 @@ function Config:OnInitialize()
acd:AddToBlizOptions("GM2/FAQ", "FAQ", "GatherMate 2")

local function openOptions()
if Settings and Settings.OpenToCategory then
Settings.OpenToCategory("GatherMate 2")
else
InterfaceOptionsFrame_OpenToCategory("GatherMate 2")
end
Settings.OpenToCategory("GatherMate 2")
end

SLASH_GatherMate21 = "/gathermate"
Expand Down Expand Up @@ -1242,7 +1222,7 @@ function Config:CheckAutoImport()
if verline and v["autoImport"] then
local dataVersion = tonumber(verline:match("%d+"))
if dataVersion and dataVersion > v["lastImport"] then
local loaded, reason = LoadAddOn(k)
local loaded, reason = C_AddOns.LoadAddOn(k)
if loaded then
local addon = LibStub("AceAddon-3.0"):GetAddon(k)
local filter = nil
Expand Down

0 comments on commit b4e0d81

Please sign in to comment.