# HG changeset patch # User Zerotorescue # Date 1287233164 -7200 # Node ID b21c39ea338cb741f5992766f78a887910f34783 # Parent 6a51405c77336300e3e302a718b941bc998fcac6 Removed all ?QuickAuctions? checks and replaced them with ZeroAuctions checks instead. Fixed the copy dialog window. diff -r 6a51405c7733 -r b21c39ea338c Core.lua --- a/Core.lua Sat Oct 16 14:44:48 2010 +0200 +++ b/Core.lua Sat Oct 16 14:46:04 2010 +0200 @@ -289,14 +289,6 @@ end end - if select(6, GetAddOnInfo("QuickAuctions")) == nil then - self.QuickAuctionsEnabled = true; -- Set this as an object variable so we can use it in our modules - - -- Ensure this addon is loaded if AddonLoader is installed - if AddonLoader and AddonLoader.LoadAddOn then - AddonLoader:LoadAddOn("QuickAuctions"); - end - end if select(6, GetAddOnInfo("ZeroAuctions")) == nil then self.ZeroAuctionsEnabled = true; -- Set this as an object variable so we can use it in our modules @@ -312,7 +304,7 @@ -- ADJUST POSITIONS - if self.QuickAuctionsEnabled or self.ZeroAuctionsEnabled then + if self.ZeroAuctionsEnabled then -- QA is enabled so move the checkbox further to the right self.cbOpenAll:SetPoint("TOPLEFT", MailFrame, "TOPLEFT", 155, -13); @@ -438,17 +430,6 @@ InboxTooMuchMail:Hide() InboxTooMuchMail.Show = function() end - if self.QuickAuctionsEnabled then - local QAMail = LibStub("AceAddon-3.0"):GetAddon("QuickAuctions", true):GetModule("Mail", true) - - if QAMail then - -- Hide the open all button - QAMail.massOpening:Hide(); - -- Hide the x mail remaining text - QAMail.totalMail:Hide(); - end - end - if self.ZeroAuctionsEnabled then local QAMail = LibStub("AceAddon-3.0"):GetAddon("ZeroAuctions", true):GetModule("Mail", true) @@ -573,22 +554,10 @@ self:CancelTimer(self.tmrTryAgain, true); -- Insurance - if self.QuickAuctionsEnabled and QuickAuctionsAutoMail then - -- Remember the last known quick auctions status - lastQuickAuctionsStatus = QuickAuctionsAutoMail:GetChecked(); - end if self.ZeroAuctionsEnabled and ZeroAuctionsAutoMail then -- Remember the last known quick auctions status lastQuickAuctionsStatus = ZeroAuctionsAutoMail:GetChecked(); end - if self.db.profile.general.autoDisableQAAutoMail and self.QuickAuctionsEnabled and QuickAuctionsAutoMail and QuickAuctionsAutoMail:GetChecked() then - -- If auto disable "QA Auto mail" is enabled and QA's auto mail is currently toggled on, turn it off - -- We need to do this with a :click to trigger the right events - - self:Debug("Turning automail |cffff0000off|r."); - - QuickAuctionsAutoMail:Click(); - end if self.db.profile.general.autoDisableQAAutoMail and self.ZeroAuctionsEnabled and ZeroAuctionsAutoMail and ZeroAuctionsAutoMail:GetChecked() then -- If auto disable "QA Auto mail" is enabled and QA's auto mail is currently toggled on, turn it off -- We need to do this with a :click to trigger the right events @@ -638,31 +607,6 @@ end end - if self.QuickAuctionsEnabled then - -- Quick Auctions enabled? - -- Toggle automailing as per settings - - if self.db.profile.general.autoReenableQAAutoMail and QuickAuctionsAutoMail and not QuickAuctionsAutoMail:GetChecked() then - -- If auto re-enable "QA Auto mail" is enabled and QA's auto mail is currently toggled OFF, turn it on - -- We need to do this with a :click to trigger the right events - - self:Debug("Turning automail |cff00ff00on|r."); - - QuickAuctionsAutoMail:Click(); - elseif self.db.profile.general.autoSetBackQAAutoMail and QuickAuctionsAutoMail and lastQuickAuctionsStatus ~= QuickAuctionsAutoMail:GetChecked() then - -- If auto set back "QA Auto mail" is enabled and QA's auto mail is currently not the same as it was before starting, toggle it - -- We need to do this with a :click to trigger the right events - - if lastQuickAuctionsStatus then - self:Debug("Turning automail |cff00ff00on|r."); - else - self:Debug("Turning automail |cffff0000off|r."); - end - - QuickAuctionsAutoMail:Click(); - end - end - if self.ZeroAuctionsEnabled then -- Zero Auctions enabled? -- Toggle automailing as per settings @@ -794,17 +738,6 @@ function MailOpener:ToggleQAStatus() self:Debug("defaultQAStatus:" .. self.db.profile.general.defaultQAStatus); - if self.QuickAuctionsEnabled and self.db.profile.general.defaultQAStatus ~= "__remember" and QuickAuctionsAutoMail then - if self.db.profile.general.defaultQAStatus == "_enabled" and not QuickAuctionsAutoMail:GetChecked() then - self:Debug("Turning automail |cff00ff00on|r."); - - QuickAuctionsAutoMail:Click(); - elseif self.db.profile.general.defaultQAStatus == "disabled" and QuickAuctionsAutoMail:GetChecked() then - self:Debug("Turning automail |cffff0000off|r."); - - QuickAuctionsAutoMail:Click(); - end - end if self.ZeroAuctionsEnabled and self.db.profile.general.defaultQAStatus ~= "__remember" and ZeroAuctionsAutoMail then if self.db.profile.general.defaultQAStatus == "_enabled" and not ZeroAuctionsAutoMail:GetChecked() then self:Debug("Turning automail |cff00ff00on|r."); @@ -837,23 +770,21 @@ text = L["Press CTRL-C to copy."], button2 = CLOSE, hasEditBox = 1, - hasWideEditBox = 1, - OnShow = function() - local editBox = _G[this:GetName().."WideEditBox"]; - if editBox and MailOpener.currentPopupContents then - editBox:SetText(MailOpener.currentPopupContents); - editBox:SetFocus(); - editBox:HighlightText(0); + editBoxWidth = 360, + OnShow = function(self) + if self.editBox and MailOpener.currentPopupContents then + self.editBox:SetText(MailOpener.currentPopupContents); + self.editBox:SetFocus(); + self.editBox:HighlightText(0); end -- Position the close button in the middle - local button = _G[this:GetName().."Button2"]; - if button then + if self.button2 then -- Remove previous know position - button:ClearAllPoints(); - button:SetWidth(200); + self.button2:ClearAllPoints(); + self.button2:SetWidth(200); -- Reposition in the center - button:SetPoint("CENTER", editBox, "CENTER", 0, -30); + self.button2:SetPoint("CENTER", self.editBox, "CENTER", 0, -30); end end, EditBoxOnEscapePressed = function(self) diff -r 6a51405c7733 -r b21c39ea338c Modules/Config.lua --- a/Modules/Config.lua Sat Oct 16 14:44:48 2010 +0200 +++ b/Modules/Config.lua Sat Oct 16 14:46:04 2010 +0200 @@ -400,7 +400,7 @@ }, get = function() return MailOpener.db.profile.general.defaultQAStatus; end, set = function(i, v) MailOpener.db.profile.general.defaultQAStatus = v; end, - hidden = (not MailOpener.QuickAuctionsEnabled), + hidden = (not MailOpener.ZeroAuctionsEnabled), }, overrideCheckInbox = { order = 12, @@ -437,7 +437,7 @@ width = "full", get = function() return MailOpener.db.profile.general.autoDisableQAAutoMail; end, set = function(i, v) MailOpener.db.profile.general.autoDisableQAAutoMail = v; end, - hidden = (not MailOpener.QuickAuctionsEnabled), + hidden = (not MailOpener.ZeroAuctionsEnabled), }, autoReenableQAAutoMail = { order = 30, @@ -447,7 +447,7 @@ width = "full", get = function() return MailOpener.db.profile.general.autoReenableQAAutoMail; end, set = function(i, v) MailOpener.db.profile.general.autoReenableQAAutoMail = v; end, - hidden = (not MailOpener.QuickAuctionsEnabled), + hidden = (not MailOpener.ZeroAuctionsEnabled), disabled = function() return (MailOpener.db.profile.general.autoSetBackQAAutoMail and not MailOpener.db.profile.general.autoReenableQAAutoMail); end, }, autoSetBackQAAutoMail = { @@ -458,7 +458,7 @@ width = "full", get = function() return MailOpener.db.profile.general.autoSetBackQAAutoMail; end, set = function(i, v) MailOpener.db.profile.general.autoSetBackQAAutoMail = v; end, - hidden = (not MailOpener.QuickAuctionsEnabled), + hidden = (not MailOpener.ZeroAuctionsEnabled), disabled = function() return (MailOpener.db.profile.general.autoReenableQAAutoMail and not MailOpener.db.profile.general.autoSetBackQAAutoMail); end, }, },