diff gui.lua @ 36:f62d582c5c52

Use new Frame widget method EnableResize. Allow deleting loot item's history entry along with the main loot entry.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Fri, 09 Dec 2011 03:16:59 +0000
parents a7376e6de73c
children cd745a18d7c7
line wrap: on
line diff
--- a/gui.lua	Thu Dec 08 08:24:59 2011 +0000
+++ b/gui.lua	Fri Dec 09 03:16:59 2011 +0000
@@ -429,6 +429,9 @@
 		local gone = tremove(g_loot,rowi)
 		addon:Print("Removed %s.",
 			gone.itemlink or gone.bosskill or gone.startday.text)
+		if gone.kind == 'loot' and IsShiftKeyDown() then
+			addon:_delHistoryEntry (rowi, gone)
+		end
 	end,
 
 	["Delete this history event"] = function(rowi)
@@ -545,7 +548,7 @@
 		"Mark as normal|This is the default.  Selecting any 'Mark as <x>' action blanks out extra notes about who broadcast this entry, etc.",
 		"--",
 		"Rebroadcast this loot entry|Sends this loot event, including special notes, as if it just happened.",
-		"Delete this loot event|Permanent, no going back!",
+		"Delete this loot event|Permanent, no going back!\n\nHold down the Shift key to also delete the player's corresponding History entry.",
 		"Delete remaining entries for this boss%boss|Erases everything from here down until a new boss/day.",
 		"Insert new loot entry%loot|Inserts new loot above this one, prompting you for information.",
 		"Insert new boss kill event%boss|Inserts new event above this one, prompting you for information.",
@@ -1779,16 +1782,9 @@
 	display:SetStatusText(self.status_text)
 	display:SetLayout("Flow")
 	display:SetStatusTable{width=900,height=550}   -- default height is 500
-	-- prevent resizing, also see ace3 tickets 80 and 214
-	-- grrrr, no longer works after frame rewrite
-	--[[
-	display.sizer_se:SetScript("OnMouseDown",nil)
-	display.sizer_se:SetScript("OnMouseUp",nil)
-	display.sizer_s:SetScript("OnMouseDown",nil)
-	display.sizer_s:SetScript("OnMouseUp",nil)
-	display.sizer_e:SetScript("OnMouseDown",nil)
-	display.sizer_e:SetScript("OnMouseUp",nil)
-	]]
+	if display.EnableResize then -- FIXME after next Ace3 release, this can be assumed
+		display:EnableResize(false)
+	end
 	display:SetCallback("OnClose", function(_display)
 		UIDROPDOWNMENU_SHOW_TIME = prev_fade_time 
 		_d = _display:GetUserData("eoiST")