Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fvoges committed Nov 12, 2024
2 parents ed4a690 + 0a4837b commit 5762950
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CopyPasta2.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Notes: Enables multi-line/unlimited-length pasting of text or commands into WoW, a fork of CopyPasta by Nirgali42.
## Author: Nuaik
## X-Credits: Nirgali42, oscarucb
## Version: 2.0.0
## Version: 1.0.20
## SavedVariables: PasteDB
## SavedVariablesPerCharacter:
## X-Embeds: Ace3, LibDataBroker-1.1, LibDBIcon-1.0
Expand Down
15 changes: 8 additions & 7 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,17 @@ end
function addon:SetupVersion()
local svnrev = 0
local files = vars.svnrev
files["X-Build"] = tonumber((C_AddOns.GetAddonMetadata(addonName, "X-Build") or ""):match("%d+"))
files["X-Revision"] = tonumber((C_AddOns.GetAddonMetadata(addonName, "X-Revision") or ""):match("%d+"))
files["X-Build"] = tonumber((C_AddOns.GetAddOnMetadata(addonName, "X-Build") or ""):match("%d+"))
files["X-Revision"] = tonumber((C_AddOns.GetAddOnMetadata(addonName, "X-Revision") or ""):match("%d+"))
for _,v in pairs(files) do -- determine highest file revision
if v and v > svnrev then
svnrev = v
end
end
addon.revision = svnrev

files["X-Curse-Packaged-Version"] = C_AddOns.GetAddonMetadata(addonName, "X-Curse-Packaged-Version")
files["Version"] = C_AddOns.GetAddonMetadata(addonName, "Version")
files["X-Curse-Packaged-Version"] = C_AddOns.GetAddOnMetadata(addonName, "X-Curse-Packaged-Version")
files["Version"] = C_AddOns.GetAddOnMetadata(addonName, "Version")
addon.version = files["X-Curse-Packaged-Version"] or files["Version"] or "@"
if string.find(addon.version, "@") then -- dev copy uses "@.project-version.@"
addon.version = "r"..svnrev
Expand Down Expand Up @@ -267,10 +267,11 @@ end

function addon:Config()
if optionsFrame then
if ( InterfaceOptionsFrame:IsShown() ) then
InterfaceOptionsFrame:Hide();
if ( optionsFrame:IsShown() ) then
optionsFrame:Hide()
HideUIPanel(SettingsPanel);
else
InterfaceOptionsFrame_OpenToCategory(optionsFrame)
Settings.OpenToCategory(addonName, true)
end
end
end
Expand Down

0 comments on commit 5762950

Please sign in to comment.