changeset 8:30ba1f35e164

Minor tweaks, fold in reload
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Fri, 17 Jun 2011 00:13:35 +0000
parents 9a37bd40eb5e
children 4fba9c6b5d3d
files core.lua gui.lua verbage.lua
diffstat 3 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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)
--- 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 <Loot> 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.