WoWInterface SVN PhanxConfigWidgets

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches
    from Rev 5 to Rev 15
    Reverse comparison

Rev 5 → Rev 15

LibAboutPanel/LibAboutPanel.lua
1,18 → 1,18
--[[
 
****************************************************************************************
LibAboutPanel
 
File date: 2009-03-06T19:03:08Z
File revision: @file-revision@
Project version: v1.33-1-g687a309
File date: 2009-06-23T02:04:30Z
Project version: v1.43
 
Author: Tekkub
Modifications: Ackis
Author: Tekkub, Ackis
 
****************************************************************************************
 
]]--
 
local lib, oldminor = LibStub:NewLibrary("LibAboutPanel", 1)
local lib, oldminor = LibStub:NewLibrary("LibAboutPanel", 2)
if not lib then return end
 
function lib.new(parent, addonname)
24,26 → 24,48
return frame
end
 
--[[
 
local GAME_LOCALE = GetLocale()
 
if GAME_LOCALE ~= "frFR" then
GAME_LOCALE = "enUS"
end
 
local L = {}
 
if GAME_LOCALE == "enUS" then
L["About"] = true
L["Click and press Ctrl-C to copy"] = true
elseif GAME_LOCALE == "frFR" then
-- frFR
if GAME_LOCALE == "frFR" then
L["About"] = "à propos de"
L["Click and press Ctrl-C to copy"] = true
L["Click and press Ctrl-C to copy"] = "Click and press Ctrl-C to copy"
-- deDE
elseif GAME_LOCALE == "deDE" then
L["About"] = "Über"
L["Click and press Ctrl-C to copy"] = "Klicken und Strg-C drücken zum kopieren"
-- esES
elseif GAME_LOCALE == "esES" then
L["About"] = "Acerca de"
L["Click and press Ctrl-C to copy"] = "Click and press Ctrl-C to copy"
-- esMX
elseif GAME_LOCALE == "esMX" then
L["About"] = "Sobre"
L["Click and press Ctrl-C to copy"] = "Click and press Ctrl-C to copy"
-- koKR
elseif GAME_LOCALE == "koKR" then
L["About"] = "대하여"
L["Click and press Ctrl-C to copy"] = "Click and press Ctrl-C to copy"
-- ruRU
elseif GAME_LOCALE == "ruRU" then
L["About"] = "Об аддоне"
L["Click and press Ctrl-C to copy"] = "Click and press Ctrl-C to copy"
-- zhCN
elseif GAME_LOCALE == "zhCN" then
L["About"] = "关于"
L["Click and press Ctrl-C to copy"] = "点击并 Ctrl-C 复制"
-- zhTW
elseif GAME_LOCALE == "zhTW" then
L["About"] = "關於"
L["Click and press Ctrl-C to copy"] = "點擊並 Ctrl-C 復制"
-- enUS and non-localized
else
L["About"] ="About"
L["Click and press Ctrl-C to copy"] = "Click and press Ctrl-C to copy"
end
 
]]--
 
local editbox = CreateFrame('EditBox', nil, UIParent)
editbox:Hide()
editbox:SetAutoFocus(true)
90,33 → 112,30
 
 
local fields = {"Version", "Author", "X-Category", "X-License", "X-Email", "Email", "eMail", "X-Website", "X-Credits", "X-Localizations", "X-Donate"}
local haseditbox = {["Version"] = true, ["X-Website"] = true, ["X-Email"] = true, ["X-Donate"] = true, ["Email"] = true, ["eMail"] = true}
local haseditbox = {["X-Website"] = true, ["X-Email"] = true, ["X-Donate"] = true, ["Email"] = true, ["eMail"] = true}
 
local function HideTooltip() GameTooltip:Hide() end
 
local function ShowTooltip(self)
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
--GameTooltip:SetText(L["Click and press Ctrl-C to copy"])
GameTooltip:SetText("Click and press Ctrl-C to copy")
GameTooltip:SetText(L["Click and press Ctrl-C to copy"])
--GameTooltip:SetText("Click and press Ctrl-C to copy")
end
 
function lib.OnShow(frame)
 
--[[
local notefield = "Notes"
 
if (GAME_LOCALE ~= "enUS") then
notefield = notefield .. "-" .. GAME_LOCALE
end
 
-- Get the localized version of notes if it exists or fall back to the english one.
local notes = GetAddOnMetadata(frame.addonname, notefield) or GetAddOnMetadata(frame.addonname, "Notes")
]]--
 
local notes = GetAddOnMetadata(frame.addonname, "Notes")
 
local title = frame:CreateFontString(nil, "ARTWORK", "GameFontNormalLarge")
title:SetPoint("TOPLEFT", 16, -16)
title:SetText(frame.parent and (frame.parent.." - About") or frame.name)
title:SetText(frame.parent and (frame.parent.." - " .. L["About"]) or frame.name)
 
local subtitle = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
subtitle:SetHeight(32)
145,7 → 164,6
detail:SetJustifyH("LEFT")
 
if (field == "Author") then
 
local authorservername = GetAddOnMetadata(frame.addonname, "X-Author-Server")
local authorfaction = GetAddOnMetadata(frame.addonname, "X-Author-Faction")
 
158,7 → 176,11
else
detail:SetText((haseditbox[field] and "|cff9999ff" or "").. val)
end
 
elseif (field == "Version") then
local addonversion = GetAddOnMetadata(frame.addonname, field)
-- Remove @project-revision@ and replace it with Repository
addonversion = string.gsub(addonversion,"@project.revision@","Repository")
detail:SetText((haseditbox[field] and "|cff9999ff" or "").. addonversion)
else
detail:SetText((haseditbox[field] and "|cff9999ff" or "").. val)
end