From 6e950d648453f55b2cbe72b52e497577df2398dc Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Tue, 16 Jan 2007 04:06:36 +0000 Subject: [PATCH] Changed the default initialization on new profile for both buffs and frames Removed the reference to PerfectRaid_Hacks --- Localization.enUS.lua | 2 ++ PerfectRaid.toc | 5 ++--- PerfectRaid_Buffs.lua | 2 +- PerfectRaid_Frames.lua | 18 ++++++++++++++++++ PerfectRaid_Options.lua | 2 ++ 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Localization.enUS.lua b/Localization.enUS.lua index 948e60e..d710f8e 100644 --- a/Localization.enUS.lua +++ b/Localization.enUS.lua @@ -2,6 +2,8 @@ PerfectRaidLocals = { ["Add"] = "Add", + ["Adding a default raid layout to new profile \"%s\""] = "Adding a default raid layout to new profile \"%s\"", + ["Adding default buffs to new profile \"%s\""] = "Adding default buffs to new profile \"%s\"", ["Aggro"] = "Aggro", ["Align frames to BOTTOM"] = "Align frames to BOTTOM", ["Align frames to RIGHT"] = "Align frames to RIGHT", diff --git a/PerfectRaid.toc b/PerfectRaid.toc index 7ae74ba..847d5c9 100644 --- a/PerfectRaid.toc +++ b/PerfectRaid.toc @@ -17,8 +17,7 @@ PerfectRaid.xml PerfectRaid.lua PerfectRaid_Options.lua -PerfectRaid_Buffs.lua -PerfectRaid_Range.lua PerfectRaid_Aggro.lua -PerfectRaid_Hacks.lua +PerfectRaid_Buffs.lua PerfectRaid_Frames.lua +PerfectRaid_Range.lua diff --git a/PerfectRaid_Buffs.lua b/PerfectRaid_Buffs.lua index 1274f54..fda378e 100644 --- a/PerfectRaid_Buffs.lua +++ b/PerfectRaid_Buffs.lua @@ -58,7 +58,7 @@ end function Buffs:DONGLE_PROFILE_CREATED(event, db, addon, svname, profileKey) if svname ~= "PerfectRaidDB" then return end - self:PrintF("Adding default buffs to new profile \"%s\"", profileKey) + self:PrintF(L["Adding default buffs to new profile \"%s\""], profileKey) local buffs = db.profile.buffs for k,v in ipairs(self.defaults) do if not v.disabled then diff --git a/PerfectRaid_Frames.lua b/PerfectRaid_Frames.lua index 67b5fdf..778d37c 100644 --- a/PerfectRaid_Frames.lua +++ b/PerfectRaid_Frames.lua @@ -36,6 +36,7 @@ local frames function Frames:Initialize() frames = PerfectRaid.frames + self:RegisterMessage("DONGLE_PROFILE_CREATED") end function Frames:Enable() @@ -48,6 +49,23 @@ end function Frames:ShowButton(button) end +function Frames:DONGLE_PROFILE_CREATED(event, db, addon, svname, profileKey) + if svname ~= "PerfectRaidDB" then return end + self:PrintF(L["Adding a default raid layout to new profile \"%s\""], profileKey) + local entry = { + numColumns = 2, + scale = 1, + colSpacing = 0, + sortType = "NAME", + deficit = 1, + colAnchor = "LEFT", + filter = "WARRIOR,PRIEST,DRUID,SHAMAN,PALADIN,MAGE,ROGUE,WARLOCK,HUNTER", + groupBy = "CLASS", + maxUnits = 25, + } + table.insert(db.profile.headers, entry) +end + function Frames:PERFECTRAID_TAB_CHANGED(old, new) if PROptions_Frames_Edit and PROptions_Frames_Edit:IsVisible() then self:CancelEntry() diff --git a/PerfectRaid_Options.lua b/PerfectRaid_Options.lua index 37463a0..093cc18 100644 --- a/PerfectRaid_Options.lua +++ b/PerfectRaid_Options.lua @@ -84,6 +84,7 @@ function Options:CreateOptions() --self:TabOnClick(PROptionsTab1) end +local work = {} function Options:AddOptionsTab(title, frame) local num = #tabs + 1 local name = "PROptionsTab"..num @@ -99,6 +100,7 @@ function Options:AddOptionsTab(title, frame) tab:SetText(title) tab.frame = frame + tab.title = title tab:Show() tab.frame:SetPoint("TOPLEFT", PROptions, "TOPLEFT", 20, -30) -- 1.7.9.5