Skip to content

Commit

Permalink
Build 14505
Browse files Browse the repository at this point in the history
  • Loading branch information
tekkub committed Aug 17, 2011
1 parent 0fae32c commit 01f1afe
Show file tree
Hide file tree
Showing 13 changed files with 265 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ do --Enclosure to make sure people go through SetSetting
if ( value and value ~= "0" ) then
manager.container:Show();
CompactRaidFrameManagerDisplayFrameHiddenModeToggle:SetText(HIDE);
CompactRaidFrameManagerDisplayFrameHiddenModeToggle.shownMode = "0";
CompactRaidFrameManagerDisplayFrameHiddenModeToggle.shownMode = false;
else
manager.container:Hide();
CompactRaidFrameManagerDisplayFrameHiddenModeToggle:SetText(SHOW);
CompactRaidFrameManagerDisplayFrameHiddenModeToggle.shownMode = "1";
CompactRaidFrameManagerDisplayFrameHiddenModeToggle.shownMode = true;
end
end

Expand Down
58 changes: 58 additions & 0 deletions AddOns/Blizzard_GuildUI/Blizzard_GuildUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ function GuildFrame_OnLoad(self)
self:RegisterEvent("GUILD_PERK_UPDATE");
self:RegisterEvent("PLAYER_ENTERING_WORLD");
self:RegisterEvent("UPDATE_FACTION");
self:RegisterEvent("GUILD_RENAME_REQUIRED");
self:RegisterEvent("REQUIRED_GUILD_RENAME_RESULT");
GuildFrame.hasForcedNameChange = GetGuildRenameRequired();
PanelTemplates_SetNumTabs(self, 5);
RequestGuildRewards();
QueryGuildXP();
Expand Down Expand Up @@ -51,6 +54,8 @@ function GuildFrame_OnShow(self)
end
GuildRoster();
UpdateMicroButtons();
GuildNameChangeAlertFrame.topAnchored = true;
GuildFrame_CheckName();
end

function GuildFrame_OnHide(self)
Expand Down Expand Up @@ -90,6 +95,15 @@ function GuildFrame_OnEvent(self, event, ...)
QueryGuildNews();
elseif ( event == "GUILD_PERK_UPDATE" ) then
GuildFrame_UpdateLevel();
elseif ( event == "GUILD_RENAME_REQUIRED" ) then
GuildFrame.hasForcedNameChange = ...;
GuildFrame_CheckName();
elseif ( event == "REQUIRED_GUILD_RENAME_RESULT" ) then
local success = ...
if ( success ) then
GuildFrame.hasForcedNameChange = GetGuildRenameRequired();
GuildFrame_CheckName();
end
end
end

Expand Down Expand Up @@ -150,6 +164,50 @@ function GuildFrame_CheckPermissions()
end
end

function GuildFrame_CheckName()
if ( GuildFrame.hasForcedNameChange ) then
local clickableHelp = false
GuildNameChangeAlertFrame:Show();

if ( IsGuildLeader() ) then
GuildNameChangeFrame.gmText:Show();
GuildNameChangeFrame.memberText:Hide();
GuildNameChangeFrame.button:SetText(ACCEPT);
GuildNameChangeFrame.button:SetPoint("TOP", GuildNameChangeFrame.editBox, "BOTTOM", 0, -10);
GuildNameChangeFrame.renameText:Show();
GuildNameChangeFrame.editBox:Show();
else
clickableHelp = GuildNameChangeAlertFrame.topAnchored;
GuildNameChangeFrame.gmText:Hide();
GuildNameChangeFrame.memberText:Show();
GuildNameChangeFrame.button:SetText(OKAY);
GuildNameChangeFrame.button:SetPoint("TOP", GuildNameChangeFrame.memberText, "BOTTOM", 0, -30);
GuildNameChangeFrame.renameText:Hide();
GuildNameChangeFrame.editBox:Hide();
end


if ( clickableHelp ) then
GuildNameChangeAlertFrame.alert:SetFontObject(GameFontHighlight);
GuildNameChangeAlertFrame:SetPoint("TOP", 15, -4);
GuildNameChangeAlertFrame:SetWidth(256);
GuildNameChangeAlertFrame:Enable();
GuildNameChangeAlertFrame.clickText:Show();
GuildNameChangeFrame:Hide();
else
GuildNameChangeAlertFrame.alert:SetFontObject(GameFontHighlightMedium);
GuildNameChangeAlertFrame:SetPoint("TOP", 0, -82);
GuildNameChangeAlertFrame:SetWidth(300);
GuildNameChangeAlertFrame:Disable();
GuildNameChangeAlertFrame.clickText:Hide();
GuildNameChangeFrame:Show();
end
else
GuildNameChangeAlertFrame:Hide();
GuildNameChangeFrame:Hide();
end
end

--****** Common Functions *******************************************************

function GuildFrame_OpenAchievement(button, achievementID)
Expand Down
138 changes: 138 additions & 0 deletions AddOns/Blizzard_GuildUI/Blizzard_GuildUI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,144 @@
</OnLeave>
</Scripts>
</Frame>

<Button name="GuildNameChangeAlertFrame" inherits="GlowBoxTemplate" parentKey="nameAlert" enableMouse="true" frameStrata="DIALOG" hidden="true">
<Size x="256" y="36"/>
<Anchors>
<Anchor point="TOP" x="15" y="-4"/>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString name="$parentText" inherits="GameFontHighlightLeft" justifyH="CENTER" text="GUILD_NAME_ALERT" parentKey="alert">
<Size x="190" y="0"/>
<Anchors>
<Anchor point="CENTER" x="0" y="2"/>
</Anchors>
</FontString>
<FontString name="$parentText" inherits="GameFontDisableSmall" justifyH="CENTER" text="CLICK_HERE_FOR_MORE_INFO" parentKey="clickText">
<Size x="180" y="0"/>
<Anchors>
<Anchor point="BOTTOM" x="0" y="2"/>
</Anchors>
</FontString>
<Texture name="$parentAlertL" file="Interface\DialogFrame\UI-Dialog-Icon-AlertNew">
<Size x="30" y="30"/>
<Anchors>
<Anchor point="LEFT" x="8" y="-1"/>
</Anchors>
</Texture>
<Texture name="$parentAlertR" file="Interface\DialogFrame\UI-Dialog-Icon-AlertNew">
<Size x="30" y="30"/>
<Anchors>
<Anchor point="RIGHT" x="-8" y="-1"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
self.topAnchored = true;
</OnLoad>
<OnClick>
self.topAnchored = false;
GuildFrame_CheckName()
</OnClick>
</Scripts>
</Button>
<Frame name="GuildNameChangeFrame" parentKey="nameAlert" enableMouse="true" frameStrata="DIALOG" hidden="true">
<Size x="300" y="300"/>
<Anchors>
<Anchor point="TOPLEFT" x="6" y="-68"/>
<Anchor point="BOTTOMRIGHT" x="-7" y="7"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture>
<Size x="30" y="30"/>
<Anchors>
<Anchor point="TOPLEFT" x="-2" y="2"/>
<Anchor point="BOTTOMRIGHT" x="2" y="-2"/>
</Anchors>
<Color r="1" g=".9" b="0" a="1"/>
</Texture>
</Layer>
<Layer level="BACKGROUND" textureSubLevel="1">
<Texture>
<Anchors>
<Anchor point="TOPLEFT" x="0" y="0"/>
<Anchor point="BOTTOMRIGHT" x="0" y="0"/>
</Anchors>
<Color r="0" g="0" b="0" a="1"/>
</Texture>
</Layer>
<Layer level="OVERLAY">
<FontString name="$parentError" inherits="GameFontHighlight" justifyH="CENTER" text="GUILD_NAME_ALERT_WARNING">
<Size x="280" y="0"/>
<Anchors>
<Anchor point="TOP" x="0" y="-80"/>
</Anchors>
<Color r="1" g="0" b="0" a="1"/>
</FontString>
<FontString name="$parentGMText" inherits="GameFontHighlightCenter" text="GUILD_NAME_ALERT_GM_HELP" parentKey="gmText">
<Size x="280" y="0"/>
<Anchors>
<Anchor point="TOP" relativeTo="$parentError" relativePoint="BOTTOM" x="0" y="-30"/>
</Anchors>
</FontString>
<FontString name="$parentMemberText" inherits="GameFontHighlightCenter" text="GUILD_NAME_ALERT_MEMBER_HELP" parentKey="memberText" hidden="true">
<Size x="280" y="0"/>
<Anchors>
<Anchor point="TOP" relativeTo="$parentError" relativePoint="BOTTOM" x="0" y="-30"/>
</Anchors>
</FontString>
<FontString name="$parentRename" inherits="GameFontNormalMed3" text="RENAME_GUILD_LABEL" parentKey="renameText">
<Size x="240" y="0"/>
<Anchors>
<Anchor point="BOTTOM" x="0" y="90"/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<EditBox name="$parentEditBox" letters="33" inherits="InputBoxTemplate" autoFocus="true" parentKey="editBox">
<Size x="200" y="20"/>
<Anchors>
<Anchor point="TOP" relativeTo="$parentRename" relativePoint="BOTTOM" x="0" y="-10"/>
</Anchors>
<Scripts>
<OnLoad>
</OnLoad>
<OnEscapePressed function="EditBox_ClearFocus"/>
<OnEditFocusLost>
</OnEditFocusLost>
<OnEditFocusGained>
self:HighlightText();
</OnEditFocusGained>
</Scripts>
</EditBox>
<Button name="$parentButton" inherits="UIPanelButtonTemplate2" text="ACCEPT" parentKey="button">
<Size x="80" y="22"/>
<Anchors>
<Anchor point="TOP" relativeTo="$parentEditBox" relativePoint="BOTTOM" x="0" y="-10"/>
</Anchors>
<Scripts>
<OnClick>
if IsGuildLeader() then
SubmitRequiredGuildRename(self:GetParent().editBox:GetText());
else
GuildNameChangeAlertFrame.topAnchored = true;
GuildFrame_CheckName()
end
</OnClick>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnShow>
self:SetFrameLevel(GuildNameChangeAlertFrame:GetFrameLevel()-1);
</OnShow>
</Scripts>
</Frame>
</Frames>
<Scripts>
<OnLoad function="GuildFrame_OnLoad"/>
Expand Down
14 changes: 7 additions & 7 deletions FrameXML/ChatFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,13 @@ SecureCmdList["CLICK"] = function(msg)
end
end

SecureCmdList["EQUIP_SET"] = function(msg)
local set = SecureCmdOptionParse(msg);
if ( set and set ~= "" ) then
EquipmentManager_EquipSet(set);
end
end

-- Pre-populate the secure command hash table
for index, value in pairs(SecureCmdList) do
local i = 1;
Expand Down Expand Up @@ -2258,13 +2265,6 @@ SlashCmdList["ACHIEVEMENTUI"] = function(msg)
ToggleAchievementFrame();
end

SlashCmdList["EQUIP_SET"] = function(msg)
local set = SecureCmdOptionParse(msg);
if ( set and set ~= "" ) then
EquipmentManager_EquipSet(set);
end
end

SlashCmdList["SET_TITLE"] = function(msg)
local name = SecureCmdOptionParse(msg);
if ( name and name ~= "") then
Expand Down
18 changes: 13 additions & 5 deletions FrameXML/GlobalStrings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ CHAT_RAID_LEADER_GET = "|Hchannel:RAID|h[Raid Leader]|h %s:\32";
CHAT_RAID_SEND = "Raid:\32";
CHAT_RAID_WARNING_GET = "[Raid Warning] %s:\32";
CHAT_RAID_WARNING_SEND = "Raid Warning:\32";
CHAT_RESTRICTED = "A trial account may only send whispers to characters that have you on their friends list.";
CHAT_RESTRICTED = "A trial account may only send whispers to characters that have you on their friends list. \124cffffd000\124HurlIndex:2\124h[Click To Upgrade]\124h\124r";
CHAT_SAY_GET = "%s says:\32";
CHAT_SAY_SEND = "Say:\32";
CHAT_SAY_UNKNOWN = "says something unintelligible.";
Expand Down Expand Up @@ -3379,7 +3379,7 @@ ERR_CANT_WRAP_UNIQUE = "Unique items can't be wrapped.";
ERR_CANT_WRAP_WRAPPED = "Wrapped items can't be wrapped.";
ERR_CHAT_PLAYER_AMBIGUOUS_S = "%s: More than one player matches, type more of their server name";
ERR_CHAT_PLAYER_NOT_FOUND_S = "No player named '%s' is currently playing.";
ERR_CHAT_RESTRICTED = "Trial accounts cannot send unlimited tells, you must wait before you can send tells to more players.";
ERR_CHAT_RESTRICTED = "Trial accounts cannot send unlimited tells, you must wait before you can send tells to more players. \124cffffd000\124HurlIndex:2\124h[Click To Upgrade]\124h\124r";
ERR_CHAT_THROTTLED = "The number of messages that can be sent is limited, please wait to send another message.";
ERR_CHAT_WHILE_DEAD = "You can't chat when you're dead!";
ERR_CHAT_WRONG_FACTION = "You can only whisper to members of your alliance.";
Expand Down Expand Up @@ -3543,7 +3543,7 @@ ERR_INVITE_IN_COMBAT = "You cannot invite a player in raid combat";
ERR_INVITE_NO_PARTY_SERVER = "Could not create a party";
ERR_INVITE_PARTY_BUSY = "Cannot invite additional players until the party is formed";
ERR_INVITE_PLAYER_S = "You have invited %s to join your group.";
ERR_INVITE_RESTRICTED = "Trial accounts cannot invite characters into groups.";
ERR_INVITE_RESTRICTED = "Trial accounts cannot invite characters into groups. \124cffffd000\124HurlIndex:2\124h[Click To Upgrade]\124h\124r";
ERR_INVITE_SELF = "You can't invite yourself to a group.";
ERR_INVITE_UNKNOWN_REALM = "You cannot invite players from that realm";
ERR_INV_FULL = "Inventory is full.";
Expand Down Expand Up @@ -3769,7 +3769,7 @@ ERR_PETITION_IN_GUILD = "You are already in a guild.";
ERR_PETITION_NOT_ENOUGH_SIGNATURES = "You need more signatures.";
ERR_PETITION_NOT_SAME_SERVER = "That player is not from your server";
ERR_PETITION_OFFERED_S = "You have requested %s's signature.";
ERR_PETITION_RESTRICTED_ACCOUNT = "Trial accounts may not sign guild charters.";
ERR_PETITION_RESTRICTED_ACCOUNT = "Trial accounts may not sign guild charters. \124cffffd000\124HurlIndex:2\124h[Click To Upgrade]\124h\124r";
ERR_PETITION_SIGNED = "Charter signed.";
ERR_PETITION_SIGNED_S = "%s has signed your charter.";
ERR_PET_BROKEN = "Your pet has run away";
Expand Down Expand Up @@ -4030,7 +4030,7 @@ ERR_WRONG_BAG_TYPE = "That item doesn't go in that container.";
ERR_WRONG_BAG_TYPE_SUBCLASS = "Only %s can be placed in that.";
ERR_WRONG_DIRECTION_FOR_ATTACK = "You aren't facing the right way to attack!";
ERR_WRONG_SLOT = "That item does not go in that slot.";
ERR_YELL_RESTRICTED = "Trial accounts cannot yell.";
ERR_YELL_RESTRICTED = "Trial accounts cannot yell. \124cffffd000\124HurlIndex:2\124h[Click To Upgrade]\124h\124r";
ERR_ZONE_EXPLORED = "Discovered: %s";
ERR_ZONE_EXPLORED_XP = "Discovered %s: %d experience gained";
ESES = "Spanish (EU)";
Expand Down Expand Up @@ -4524,6 +4524,10 @@ GUILD_MOTD_TEMPLATE = "Guild Message of the Day: %s";
GUILD_MOVE_COMPLETE = "The guild move process is complete. Please visit |HurlIndex:1|h[this web page]|h for more information.";
GUILD_MOVE_STARTING = "Your guild is in the process of being moved. The guild bank will be temporarily inaccesible until the move is completed.";
GUILD_NAME = "Guild Name";
GUILD_NAME_ALERT = "Guild Name Change Alert";
GUILD_NAME_ALERT_GM_HELP = "You must pick a new name within the guidelines of our naming policy.";
GUILD_NAME_ALERT_MEMBER_HELP = "Your guildmaster must pick a new name within then guidelines of our naming policy.";
GUILD_NAME_ALERT_WARNING = "Your guild has been flagged for a rename.";
GUILD_NAME_TEMPLATE = "Guild: %s";
GUILD_NEWS = "Guild News";
GUILD_NEWS_AND_EVENTS = "Guild News and Events";
Expand Down Expand Up @@ -6007,6 +6011,7 @@ OFFICER = "Officer";
OFFICER_CHAT = "Officer Chat";
OFFICER_NOTE_COLON = "Officer's Note";
OKAY = "Okay";
OLD_GUILD_NAME = "Old Guild Name:";
OLD_TITLE_LOST = "You have lost the title '%s'.";
ONLY_EMPTY_BAGS = "Only empty bags can be picked up!";
ON_COOLDOWN = "On Cooldown";
Expand Down Expand Up @@ -8906,7 +8911,10 @@ TRANSFER_ABORT_UNIQUE_MESSAGE2 = "You must fulfill your destiny and that of the
TRANSFER_ABORT_UNIQUE_MESSAGE3 = "The fate of Gilneas has not yet been decided. You cannot escape yet.";
TRANSFER_ABORT_ZONE_IN_COMBAT = "Unable to zone in while an encounter is in progress.";
TRAVEL_PASS_INVITE = "Invite to Group";
TRIAL_ACCOUNT_LEVEL_CAP_REACHED = "You have reached the maximum possible level on a trial account. \124cffffd000\124HurlIndex:2\124h[Click Here]\124h\124r to upgrade your account!";
TRIAL_ACCOUNT_MONEY_CAP_REACHED = "You already have the maximum amount of money on a trial account. \124cffffd000\124HurlIndex:2\124h[Click Here]\124h\124r to upgrade your account!";
TRIAL_CAPPED = "Trial cap reached.";
TRIAL_CAPPED_MONEY = "Trial money cap reached.";
TRIAL_LEVEL_CAPPED = "Trial level cap reached.";
TRIAL_RESTRICTED = "You need to convert your account to access this feature.";
TRILINEAR_FILTERING = "Trilinear Filtering";
Expand Down
2 changes: 1 addition & 1 deletion FrameXML/HelpFrame.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
<TexCoords left="0.00390625" right="0.78125000" top="0.00390625" bottom="0.21484375"/>
</HighlightTexture>
<ButtonText name="$parentText" inherits="GameFontNormalMed3" justifyH="LEFT" parentKey="text">
<Size x="140" y="30"/>
<Size x="135" y="30"/>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentIcon" relativePoint="RIGHT" x="0" y="-1"/>
</Anchors>
Expand Down
2 changes: 1 addition & 1 deletion FrameXML/InterfaceOptionsPanels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2089,5 +2089,5 @@ HelpPanelOptions = {
showNewbieTips = { text = "SHOW_NEWBIE_TIPS_TEXT" },
scriptErrors = { text = "SHOW_LUA_ERRORS" },
colorblindMode = { text = "USE_COLORBLIND_MODE" },
enableMovePad = { text = "MOVE_PAD" },
-- enableMovePad = { text = "MOVE_PAD" },
}
2 changes: 2 additions & 0 deletions FrameXML/InterfaceOptionsPanels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3809,6 +3809,7 @@
</OnLoad>
</Scripts>
</CheckButton>
<!-- Disable the MovePad due to problem with CRC :/ ... old addon still works
<CheckButton name="$parentMovePad" inherits="InterfaceOptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentColorblindMode" relativePoint="BOTTOMLEFT">
Expand Down Expand Up @@ -3838,6 +3839,7 @@
</OnEvent>
</Scripts>
</CheckButton>
-->
<Button name="$parentResetTutorials" inherits="UIPanelButtonTemplate" text="RESET_TUTORIALS">
<Size>
<AbsDimension x="128" y="22"/>
Expand Down
Loading

0 comments on commit 01f1afe

Please sign in to comment.