# HG changeset patch # User Zerotorescue # Date 1284318807 -7200 # Node ID fcc7112cc3655765c45eba72e45fa7d086f2a710 # Parent 8e2138877ebf60a35007dfce19d01b03edcd1fb1 You can now toggle the help tooltips for the Mail Opener-added MailFrame buttons in the general config. diff -r 8e2138877ebf -r fcc7112cc365 Core.lua --- a/Core.lua Sun Sep 12 21:06:05 2010 +0200 +++ b/Core.lua Sun Sep 12 21:13:27 2010 +0200 @@ -22,6 +22,7 @@ defaultStatus = "disabled", -- addon enabled, but mail opening not auto on defaultQAStatus = "__remember", continueOpeningStackableItems = false, + showHelpTooltips = true, autoDisableQAAutoMail = true, autoReenableQAAutoMail = false, autoSetBackQAAutoMail = true, @@ -204,15 +205,17 @@ check.tooltipTitle = "Mail Opener status"; check.tooltip = "Toggle automatic mail opening |cff00ff00on|r or |cffff0000off|r (you can also enforce this by holding shift when opening the mailbox).\n\nYou can also hold the |cfffed000shift|r key while clicking this checkbox to disable the entire addon instead."; check:SetScript("OnEnter", function(self) - GameTooltip:SetOwner(self, "ANCHOR_BOTTOM") - GameTooltip:SetPoint("BOTTOM", self, "BOTTOM") - GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) - - if type(self.tooltip) == "string" then - GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + if MailOpener.db.profile.general.showHelpTooltips then + GameTooltip:SetOwner(self, "ANCHOR_BOTTOM") + GameTooltip:SetPoint("BOTTOM", self, "BOTTOM") + GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) + + if type(self.tooltip) == "string" then + GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + end + + GameTooltip:Show(); end - - GameTooltip:Show(); end); button:SetScript("OnLeave", function(self) GameTooltip:Hide(); @@ -247,15 +250,17 @@ button.tooltipTitle = "Mail Opener Config"; button.tooltip = "Click to open the configuration window for Mail Opener."; button:SetScript("OnEnter", function(self) - GameTooltip:SetOwner(self, "ANCHOR_BOTTOM") - GameTooltip:SetPoint("BOTTOM", self, "TOP") - GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) - - if type(self.tooltip) == "string" then - GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + if MailOpener.db.profile.general.showHelpTooltips then + GameTooltip:SetOwner(self, "ANCHOR_BOTTOM") + GameTooltip:SetPoint("BOTTOM", self, "TOP") + GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) + + if type(self.tooltip) == "string" then + GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + end + + GameTooltip:Show(); end - - GameTooltip:Show(); end); button:SetScript("OnLeave", function(self) GameTooltip:Hide(); diff -r 8e2138877ebf -r fcc7112cc365 Modules/Config.lua --- a/Modules/Config.lua Sun Sep 12 21:06:05 2010 +0200 +++ b/Modules/Config.lua Sun Sep 12 21:13:27 2010 +0200 @@ -311,6 +311,15 @@ get = function() return MailOpener.db.profile.general.continueOpeningStackableItems; end, set = function(i, v) MailOpener.db.profile.general.continueOpeningStackableItems = v; end, }, + showHelpTooltips = { + order = 17, + type = "toggle", + name = "Display help tooltips at the mailbox buttons added by Mail Opener.", + desc = "Display the help tooltips when hovering at any of the mailbox buttons added by Mail Opener.", + width = "full", + get = function() return MailOpener.db.profile.general.showHelpTooltips; end, + set = function(i, v) MailOpener.db.profile.general.showHelpTooltips = v; end, + }, autoDisableQAAutoMail = { order = 20, type = "toggle", diff -r 8e2138877ebf -r fcc7112cc365 Modules/OpenAll.lua --- a/Modules/OpenAll.lua Sun Sep 12 21:06:05 2010 +0200 +++ b/Modules/OpenAll.lua Sun Sep 12 21:13:27 2010 +0200 @@ -139,15 +139,17 @@ button.tooltipTitle = "Open all"; button.tooltip = "Hold |cfffed000shift|r while clicking this button to temporarily override your filters and loot every single mail contain attachments and gold.\n\n|cfffed000Right|r click this button to quickly adjust mail opening filters for this profile."; button:SetScript("OnEnter", function(self) - GameTooltip:SetOwner(self, "ANCHOR_NONE") - GameTooltip:SetPoint("BOTTOM", self, "TOP") - GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) - - if type(self.tooltip) == "string" then - GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + if MailOpener.db.profile.general.showHelpTooltips then + GameTooltip:SetOwner(self, "ANCHOR_NONE") + GameTooltip:SetPoint("BOTTOM", self, "TOP") + GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) + + if type(self.tooltip) == "string" then + GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + end + + GameTooltip:Show(); end - - GameTooltip:Show(); end); button:SetScript("OnLeave", function(self) GameTooltip:Hide();