fix(libs): pick up coa-ace3 3ec2009 (BlizOptionsGroup + Settings.* CoA-compat)

Re-sync after coa-ace3 3ec2009 added two CoA-compat patches:
  - AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua: parent
    falls back to UIParent when InterfaceOptionsFramePanelContainer is nil
  - AceConfig-3.0/AceConfigDialog-3.0: Settings.* block guarded with
    fallback to InterfaceOptions_AddCategory on WotLK-era clients

Without these, every addon registering a Blizzard Interface Options
panel via AceConfigDialog errors on load on the CoA client.
This commit is contained in:
2026-05-24 17:41:31 +02:00
parent 7229fb3a37
commit f6db3caee0
2 changed files with 34 additions and 21 deletions
@@ -2014,28 +2014,37 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
group:SetCallback("OnHide", ClearBlizPanel) group:SetCallback("OnHide", ClearBlizPanel)
local categoryName = name or appName local categoryName = name or appName
if parent then -- CoA-compat: the Settings.* API (GetCategory / RegisterCanvasLayoutCategory /
local parentID = BlizOptionsIDMap[parent] or parent -- RegisterCanvasLayoutSubcategory / RegisterAddOnCategory) is a retail-only
local category = Settings.GetCategory(parentID) -- (Dragonflight+) replacement for the WotLK-era InterfaceOptions_AddCategory.
if not category then -- On the 3.3.5-based CoA client Settings is nil, so fall back to the legacy API.
error(("The parent category '%s' was not found"):format(parent), 2) if Settings and Settings.GetCategory then
end if parent then
local subcategory = Settings.RegisterCanvasLayoutSubcategory(category, group.frame, categoryName) local parentID = BlizOptionsIDMap[parent] or parent
group:SetName(subcategory.ID, parentID) local category = Settings.GetCategory(parentID)
else if not category then
if BlizOptionsIDMap[categoryName] then error(("The parent category '%s' was not found"):format(parent), 2)
error(("%s has already been added to the Blizzard Options Window with the given name: %s"):format(appName, categoryName), 2) end
end local subcategory = Settings.RegisterCanvasLayoutSubcategory(category, group.frame, categoryName)
group:SetName(subcategory.ID, parentID)
else
if BlizOptionsIDMap[categoryName] then
error(("%s has already been added to the Blizzard Options Window with the given name: %s"):format(appName, categoryName), 2)
end
local category = Settings.RegisterCanvasLayoutCategory(group.frame, categoryName) local category = Settings.RegisterCanvasLayoutCategory(group.frame, categoryName)
if not (C_SettingsUtil and C_SettingsUtil.OpenSettingsPanel) then if not (C_SettingsUtil and C_SettingsUtil.OpenSettingsPanel) then
-- override the ID so the name can be used in Settings.OpenToCategory -- override the ID so the name can be used in Settings.OpenToCategory
-- unfortunately with incoming API changes in 12.0 (and likely classic at some point) this override is no longer possible -- unfortunately with incoming API changes in 12.0 (and likely classic at some point) this override is no longer possible
category.ID = categoryName category.ID = categoryName
end
group:SetName(category.ID)
BlizOptionsIDMap[categoryName] = category.ID
Settings.RegisterAddOnCategory(category)
end end
group:SetName(category.ID) else
BlizOptionsIDMap[categoryName] = category.ID group:SetName(name or appName, parent)
Settings.RegisterAddOnCategory(category) InterfaceOptions_AddCategory(group.frame)
end end
return group.frame, group.frame.name return group.frame, group.frame.name
@@ -99,7 +99,11 @@ local methods = {
Constructor Constructor
-------------------------------------------------------------------------------]] -------------------------------------------------------------------------------]]
local function Constructor() local function Constructor()
local frame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer) -- CoA-compat: InterfaceOptionsFramePanelContainer is a global from the stock 3.3.5
-- Interface Options frame; on the CoA reworked FrameXML it can be nil at the time
-- AceGUI widgets are constructed. Fall back to UIParent so CreateFrame doesn't blow up.
local _parent = InterfaceOptionsFramePanelContainer or UIParent
local frame = CreateFrame("Frame", nil, _parent)
frame:Hide() frame:Hide()
-- support functions for the Blizzard Interface Options -- support functions for the Blizzard Interface Options