WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 89 to Rev 90
    Reverse comparison

Rev 89 → Rev 90

trunk/Localization/enUS.lua
30,8 → 30,8
L["to clear item list"] = true
L["General"] = true
L["Profile"] = true
L["Show only in party"] = true
L["Only display the detached window when in a party"] = true
L["Show in party"] = true
L["Display the detached window when joining a party and hide the tooltip when leaving a party"] = true
L["You are not in a party"] = true
L["Hide in combat"] = true
L["Only display the detached window when not in combat"] = true
trunk/NeedyGreedy.lua
184,13 → 184,13
get = "GetAutoPopUp",
set = "SetAutoPopUp",
},
onlyShowInParty = {
name = L["Show only in party"],
desc = L["Only display the detached window when in a party"],
showOnParty = {
name = L["Show in party"],
desc = L["Display the detached window when joining a party and hide the tooltip when leaving a party"],
type = "toggle",
order = 12,
get = "GetOnlyShowInParty",
set = "SetOnlyShowInParty",
get = "GetShowOnParty",
set = "SetShowOnParty",
},
hideInCombat = {
name = L["Hide in combat"],
217,10 → 217,10
displayIcons = true,
detachedTooltip = false,
displayTextLink = false,
detachedIsShown = false,
detachedTooltipDisplayStatus = false,
minimap = { hide = false },
filterLootMsgs = false,
onlyShowInParty = false,
showOnParty = false,
hideInCombat = false,
showGroupOnly = true,
autoPopUp = true,
506,13 → 506,26
function NeedyGreedy:PARTY_MEMBERS_CHANGED()
if (GetNumPartyMembers() > 0 or GetNumRaidMembers() > 0) and not IS_IN_PARTY then
IS_IN_PARTY = true
 
if self.db.profile.resetInNewParty == "always" and (#items ~= 0) then
self:ClearItems()
elseif self.db.profile.resetInNewParty == "ask" and (#items ~= 0) then
confirmResetDialog()
end
 
if self.db.profile.showOnParty and self.db.profile.detachedTooltip and not self.db.profile.detachedTooltipDisplayStatus then
self.db.profile.detachedTooltipDisplayStatus = true
self:ShowDetachedTooltip()
end
 
elseif (GetNumPartyMembers() == 0 and GetNumRaidMembers() == 0) then
IS_IN_PARTY = false
 
if self.db.profile.showOnParty and self.db.profile.detachedTooltip and self.db.profile.detachedTooltipDisplayStatus then
self.db.profile.detachedTooltipDisplayStatus = false
self:HideDetachedTooltip()
end
 
end
 
wipe(nameList)
1065,13 → 1078,12
end
end
 
function NeedyGreedy:GetOnlyShowInParty(info)
return self.db.profile.onlyShowInParty
function NeedyGreedy:GetShowOnParty(info)
return self.db.profile.showOnParty
end
 
function NeedyGreedy:SetOnlyShowInParty(info, onlyShowInParty)
self.db.profile.onlyShowInParty = onlyShowInParty
self:RefreshTooltip()
function NeedyGreedy:SetShowOnParty(info, showOnParty)
self.db.profile.showOnParty = showOnParty
end
 
function NeedyGreedy:GetHideInCombat(info)
1463,11 → 1475,6
local lineNum
local helpText
 
if self.db.profile.detachedTooltip and not self:CheckOnlyShowInParty() then
lineNum = tooltip:AddLine()
tooltip:SetCell(lineNum, 1, L["You are not in a party"], nil, tooltip:GetColumnCount())
end
 
tooltip:AddLine("")
 
helpText = ""
1548,21 → 1555,13
 
-- Use this when forcing display of detached tooltip
function NeedyGreedy:CheckDisplayOptions()
if self:CheckOnlyShowInParty() and self:CheckShowInCombat() then
if self:CheckShowInCombat() then
return true
end
 
return false
end
 
function NeedyGreedy:CheckOnlyShowInParty()
if self.db.profile.onlyShowInParty and (GetNumPartyMembers() == 0) then
return false
end
 
return true
end
 
function NeedyGreedy:CheckShowInCombat()
if self.db.profile.hideInCombat and IS_IN_COMBAT then
return false