WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 65 to Rev 66
    Reverse comparison

Rev 65 → Rev 66

NeedyGreedy.lua
131,6 → 131,14
get = "GetShowGroupOnly",
set = "SetShowGroupOnly",
},
resetInNewParty = {
name = L["Reset on Join Party"],
desc = L["Clear the item list when joining a new group"],
type = "toggle",
order = 50,
get = "GetResetInNewParty",
set = "SetResetInNewParty",
},
 
detachedTooltipOptions = {
name = "Detached Tooltip options",
193,6 → 201,8
onlyShowInParty = false,
hideInCombat = false,
showGroupOnly = true,
autoPopUp = true,
resetInNewParty = true,
}
}
 
241,6 → 251,9
-- attacks and the window disappears as you're deciding
local ITEM_IS_BEING_ROLLED_ON = nil
 
-- For tracking grouped status
local IS_IN_PARTY = nil
 
-- Utility functions
local function sanitizePattern(pattern)
pattern = string.gsub(pattern, "%(", "%%(")
324,8 → 337,22
return nil
end
 
-- Ye olde pop up box
local function confirmResetDialog()
StaticPopupDialogs["NeedyGreedyResetDialog"] = {
text = L["Do you wish to reset NeedyGreedy?"],
button1 = ACCEPT,
button2 = CANCEL,
timeout = 30,
whileDead = 0,
hideOnEscape = 1,
OnAccept = function() NeedyGreedy:ClearItems() end,
}
StaticPopup_Show("NeedyGreedyResetDialog")
end
 
 
 
-- Event handling functions
function NeedyGreedy:OnInitialize()
self.db = LibStub("AceDB-3.0"):New("NeedyGreedyDB", defaults, true)
394,6 → 421,15
end
 
function NeedyGreedy:PARTY_MEMBERS_CHANGED()
if GetNumPartyMembers() > 0 and not IS_IN_PARTY then
IS_IN_PARTY = true
if self.db.profile.resetInNewParty and #items > 0 then
confirmResetDialog()
end
elseif GetNumPartyMembers() == 0 then
IS_IN_PARTY = false
end
 
wipe(nameList)
self:RefreshTooltip()
end
687,6 → 723,7
wipe(items)
wipe(nameList)
self:RefreshTooltip()
self:Print(L["All items have been cleared."])
end
 
 
977,8 → 1014,16
self:RefreshTooltip()
end
 
function NeedyGreedy:GetResetInNewParty(info)
return self.db.profile.resetInNewParty
end
 
function NeedyGreedy:SetResetInNewParty(info, resetInNewParty)
self.db.profile.resetInNewParty = resetInNewParty
end
 
 
 
-- QTip Frames
local LibQTip = LibStub('LibQTip-1.0')
local COL_MIN_WIDTH = 60
Localization/enUS.lua
41,5 → 41,9
L["Nothing to report"] = true
L["Popup when rolling"] = true
L["Automatically show the detached tooltip when an item is being rolled on"] = true
L["Reset on Join Party"] = true
L["Clear the item list when joining a new group"] = true
L["Do you wish to reset NeedyGreedy?"] = true
L["All items have been cleared."] = true
 
end