Skip to content

Commit

Permalink
4.4.0 (56489)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 13, 2024
1 parent bff43ac commit f59d996
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Title: Blizzard_CompactRaidFrames
## SavedVariables: Blizzard_CompactRaidFrameManager_FilterOptions
## AllowLoad: game
## AllowLoadGameType: cata
Blizzard_CompactRaidFrameReservationManager.lua
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Title: Blizzard_CompactRaidFrames
## LoadOnDemand: 0
## SavedVariables: Blizzard_CompactRaidFrameManager_FilterOptions
## AllowLoad: game
## AllowLoadGameType: wrath
Blizzard_CompactRaidFrameReservationManager.lua
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function CRFSort_Role(token1, token2)
return CRFSort_Alphabetical(token1, token2);
end

local filterOptions = {
local defaultFilterOptions = {
[1] = true,
[2] = true,
[3] = true,
Expand All @@ -97,10 +97,22 @@ local filterOptions = {
displayRoleDAMAGER = true;
}

Blizzard_CompactRaidFrameManager_FilterOptions = nil

function CompactRaidFrameManager_GetFilterOptions(index)
return filterOptions[index];

if not Blizzard_CompactRaidFrameManager_FilterOptions then
Blizzard_CompactRaidFrameManager_FilterOptions = defaultFilterOptions
end

return Blizzard_CompactRaidFrameManager_FilterOptions[index];
end

function CompactRaidFrameManager_SetFilterOptions(index, newValue)
filterOptions[index] = newValue;

if not Blizzard_CompactRaidFrameManager_FilterOptions then
Blizzard_CompactRaidFrameManager_FilterOptions = defaultFilterOptions
end

Blizzard_CompactRaidFrameManager_FilterOptions[index] = newValue;
end
31 changes: 30 additions & 1 deletion Interface/AddOns/Blizzard_SettingsDefinitions_Frame/Social.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,40 @@ local function Register()
ChatConfigFrame_OnChatDisabledChanged(disabled);
end

local function GetDisabledChatTooltip()
local tooltip = OPTION_TOOLTIP_DISABLE_CHAT;

-- If the account is muted give the player extra information on how to unmute it.
if C_SocialRestrictions.IsMuted() == true then
tooltip = tooltip .. "\n\n" .. RED_FONT_COLOR:WrapTextInColorCode(OPTION_TOOLTIP_DISABLE_CHAT_ACCOUNT_MUTE);
end

return tooltip;
end

local function CanDisableChatBeChanged()
-- The option can't be changed if the account is muted.
return C_SocialRestrictions.IsMuted() == false;
end

local defaultValue = false;

local function GetDisableChatDefaultValue()
-- The option defaults to true if the account is muted.
if C_SocialRestrictions.IsMuted() == true then
return true;
end

return defaultValue;
end

local setting = Settings.RegisterProxySetting(category, "PROXY_DISABLE_CHAT", Settings.DefaultVarLocation,
Settings.VarType.Boolean, RESTRICT_CHAT_CONFIG_DISABLE, defaultValue, C_SocialRestrictions.IsChatDisabled, SetChatDisabled);
local initializer = Settings.CreateCheckBox(category, setting, OPTION_TOOLTIP_DISABLE_CHAT);
setting.GetDefaultValueDerived = GetDisableChatDefaultValue;

local initializer = Settings.CreateCheckBox(category, setting, GetDisabledChatTooltip);
initializer:SetSettingIntercept(InterceptDisableChatChanged);
initializer:AddModifyPredicate(CanDisableChatBeChanged);

EventRegistry:RegisterFrameEventAndCallback("CHAT_DISABLED_CHANGED", function()
setting:SetValue(C_SocialRestrictions.IsChatDisabled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4405,10 +4405,10 @@ StaticPopupDialogs["TRANSMOG_APPLY_WARNING"] = {
button1 = OKAY,
button2 = CANCEL,
OnAccept = function(self)
return WardrobeTransmogFrame_ApplyPending(self.data.warningIndex);
return WardrobeTransmogFrame:ApplyPending(self.data.warningIndex);
end,
OnHide = function()
WardrobeTransmogFrame_UpdateApplyButton();
WardrobeTransmogFrame:UpdateApplyButton();
end,
timeout = 0,
hideOnEscape = 1,
Expand Down Expand Up @@ -4637,9 +4637,7 @@ StaticPopupDialogs["REGIONAL_CHAT_DISABLED"] = {
button1 = REGIONAL_RESTRICT_CHAT_DIALOG_ENABLE,
button2 = REGIONAL_RESTRICT_CHAT_DIALOG_DISABLE,
OnAccept = function()
local disabled = false;
C_SocialRestrictions.SetChatDisabled(disabled);
ChatConfigFrame_OnChatDisabledChanged(disabled);
Settings.OpenToCategory(Settings.SOCIAL_CATEGORY_ID);
end,
OnShow = function(self)
C_SocialRestrictions.AcknowledgeRegionalChatDisabled();
Expand Down

0 comments on commit f59d996

Please sign in to comment.