# HG changeset patch # User Farmbuyer of US-Kilrogg # Date 1308269615 0 # Node ID 30ba1f35e164f07ababddaff0b89d52710d02151 # Parent 9a37bd40eb5ee7d3a1c96072daf0dcd7e6078a61 Minor tweaks, fold in reload diff -r 9a37bd40eb5e -r 30ba1f35e164 core.lua --- a/core.lua Wed Jun 15 23:35:07 2011 +0000 +++ b/core.lua Fri Jun 17 00:13:35 2011 +0000 @@ -355,7 +355,6 @@ end function addon:OnEnable() - --if not OuroLootSV_hist.PLAYER_LOGOUT then print"did not safely logout?" end; OuroLootSV_hist.PLAYER_LOGOUT = nil self:RegisterEvent "PLAYER_LOGOUT" self:RegisterEvent "RAID_ROSTER_UPDATE" @@ -398,6 +397,7 @@ OuroLootSV = nil OuroLootSV_opts = nil OuroLootSV_hist = nil + ReloadUI() end function addon:PLAYER_LOGOUT() if (#g_loot > 0) or g_loot.saved @@ -412,12 +412,15 @@ OuroLootSV = g_loot end for r,t in pairs(self.history_all) do if type(t) == 'table' then - t.realm = nil - t.st = nil - t.byname = nil + if #t == 0 then + self.history_all[r] = nil + else + t.realm = nil + t.st = nil + t.byname = nil + end end end OuroLootSV_hist = self.history_all - --OuroLootSV_hist.PLAYER_LOGOUT = true end function addon:RAID_ROSTER_UPDATE (event) diff -r 9a37bd40eb5e -r 30ba1f35e164 gui.lua --- a/gui.lua Wed Jun 15 23:35:07 2011 +0000 +++ b/gui.lua Fri Jun 17 00:13:35 2011 +0000 @@ -1377,8 +1377,7 @@ [[No confirmation! |cffff1010Erases absolutely all> Ouro Loot saved variables and reloads the UI.]]) w:SetFullWidth(true) w:SetCallback("OnClick", function() - addon:_clear_SVs() - ReloadUI() + addon:_clear_SVs() -- reloads end) simple:AddChild(w) grp:AddChild(simple) diff -r 9a37bd40eb5e -r 30ba1f35e164 verbage.lua --- a/verbage.lua Wed Jun 15 23:35:07 2011 +0000 +++ b/verbage.lua Fri Jun 17 00:13:35 2011 +0000 @@ -357,9 +357,9 @@ has PlayerY gotten lately?" The history tab is, by design, not as configurable as the main tab; entries cannot be edited, individually deleted, and so forth. -Loot history is the only "live" data tab which persists across a +Clear> command. +Loot history is the only "live" data tab which persists across the +Clear Loot> command. For this reason, very little information is stored: only the recipient, the item, -and a textual timestamp. Boss names, offspecs and other notes, are not preserved. +and a textual timestamp. Boss names, offspecs, and other notes are not preserved. The default history window shows the most recent item received by each person. It is sorted with the most recent loot at the top, towards older loot at the bottom.