changeset 88:c9f955f9a285

Update the TODO text. Handle additional slash arg to the tab-opening routine and dispatch accordingly (History done, EOI remains).
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Fri, 22 Jun 2012 02:39:22 +0000
parents 9fea75b0927b
children 939569ded66f
files core.lua gui.lua verbage.lua
diffstat 3 files changed, 32 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/core.lua	Fri Jun 22 00:58:59 2012 +0000
+++ b/core.lua	Fri Jun 22 02:39:22 2012 +0000
@@ -1672,7 +1672,7 @@
 			self:Print("Window unlocked, best of luck.")
 
 		else
-			if self:OpenMainDisplayToTab(cmd) then
+			if self:OpenMainDisplayToTab(cmd,arg) then
 				return
 			end
 			self:Print("Unknown command '%s'. %s to see the help window.",
--- a/gui.lua	Fri Jun 22 00:58:59 2012 +0000
+++ b/gui.lua	Fri Jun 22 02:39:22 2012 +0000
@@ -87,6 +87,8 @@
 local tabs_OnGroupSelected_func, tabs_generated_text_OGS
 -- Similarly for the popup tips on the right side of the window.
 local noob_tips = {}
+-- And any special handling for additional CLI arguments.
+local tabs_CLI_special = {}
 
 do
 	local replacement_colors = {
@@ -1416,6 +1418,9 @@
 <Right>-click any row to display a dropdown menu.  The menu is different for
 the Player column than it is for the Item/Notes columns, and different for
 loot entries than it is for other rows.]]
+tabs_CLI_special["eoi"] = function (name)
+	-- try and scroll to a specific boss/player
+end
 
 
 -- Tab 2/3 (generated text)
@@ -1807,6 +1812,20 @@
 
 <Shift-Left> while over an item link to paste it into chat.  <Shift-Right>
 any row to display a dropdown menu.]]
+-- '/loot hi pla' -> set filter on Playername
+tabs_CLI_special["hist"] = function (name)
+	name = '^'..name   -- already tolower'd by onslash
+	for _,player in ipairs(addon.history) do
+		if player.name:lower():find(name) then
+			history_filter_who = player.name
+			--_d:GetUserData("histST"):SetFilter(history_filter_by_name)
+			histST:SetFilter(history_filter_by_name)
+			setstatus(hist_name_status)
+			break
+		end
+	end
+	-- If nothing found, reset to normal or just leave alone?
+end
 
 
 -- Tab 5:  Help (content in verbage.lua)
@@ -2694,11 +2713,14 @@
 	return display
 end
 
-function addon:OpenMainDisplayToTab (text)
+function addon:OpenMainDisplayToTab (text, opt_arg)
 	text = '^'..text:lower()
 	for tab,v in pairs(_tabtexts) do
 		if v.title:lower():find(text) then
 			self:BuildMainDisplay(tab)
+			if opt_arg and tabs_CLI_special[tab] then
+				tabs_CLI_special[tab](opt_arg)
+			end
 			return true
 		end
 	end
--- a/verbage.lua	Fri Jun 22 00:58:59 2012 +0000
+++ b/verbage.lua	Fri Jun 22 02:39:22 2012 +0000
@@ -1,16 +1,16 @@
 
 local todo = [[
-- [DONE,TEST,comm] releasing before DBM signals wipe results in outdoor location
+- When using slash command to go directly to a tab, accept additional arguments
+and let the tab decide how to interpret them.  (For starters, History should
+search for a player's name and do the current "magnify" action.)
+
+- Right-clicking the [ouroloot] chat link could do something different than
+the current left-clicking.  Popup small menu in place?
+
+- Break more methods out into private routines.
 
 - implement ack, then fallback to recording if not ack'd
 
-- special treatment for recipes / BoE items?  default to guild vault?  (DONE for user-configurable list of items defaulting to crafting drops)
-
-- [DONE,TEST,comm] rebroadcasting entire boss sections, entire days.  (TODO: maybe only whisper
-to specific people rather than broadcast.)
-
-- [DONE] signpost a potential boss kill, pipeline loot until the cache clears
-
 - Being able to drag rows up and down the main loot grid would be awesome.  Coding
 that would be likely to drive me batshiat insane.
 ]]