Mercurial > wow > ouroloot
diff gui.lua @ 19:f560cf82e7d3
Smarter handling of missed item cache entries. Basic persistent logging of
debug messages (options panel or /loot debug alsolog) and script to print same.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Mon, 29 Aug 2011 01:29:13 +0000 |
parents | d929c40cdb09 |
children | d89aeb6b9f9e |
line wrap: on
line diff
--- a/gui.lua Fri Aug 26 02:52:33 2011 +0000 +++ b/gui.lua Mon Aug 29 01:29:13 2011 +0000 @@ -302,7 +302,7 @@ ITEM_QUALITY_COLORS[iquality].hex, iname, loot.count or "") else textured = eoi_st_textured_item_format:format ([[ICONS\INV_Misc_QuestionMark]], - ITEM_QUALITY_COLORS[ITEM_QUALITY_COMMON].hex, 'UNKNOWN - TRY AGAIN', "") + ITEM_QUALITY_COLORS[ITEM_QUALITY_COMMON].hex, 'UNKNOWN - REDISPLAY LATER', "") cache_okay = false end col2.value = textured @@ -612,8 +612,15 @@ local kind = e.kind if (kind == 'loot' and column == 1) or (kind == 'history' and column == 2) then - if e.itemlink then - GameTooltip:SetOwner (cellFrame, "ANCHOR_RIGHT", -20, 0) + GameTooltip:SetOwner (cellFrame, "ANCHOR_RIGHT", -20, 0) + if e.cache_miss then + GameTooltip:ClearLines() + GameTooltip:AddLine("Missing Cache Data") + GameTooltip:AddLine([[Wait a few seconds, then type]], 0.8, 0.8, 0.8, 1) + GameTooltip:AddLine([[/ouroloot fixcache]], 0, 1, 64/255, nil) + GameTooltip:AddLine([[and redisplay this window.]], 0.8, 0.8, 0.8, 1) + GameTooltip:Show() + elseif e.itemlink then GameTooltip:SetHyperlink (e.itemlink) end @@ -1411,9 +1418,19 @@ w = GUI:Create("CheckBoxSmallLabel") w:SetFullWidth(true) w:SetType("checkbox") - w:SetLabel("master dtoggle") + w:SetLabel("debug toggle") w:SetValue(addon.DEBUG_PRINT) - w:SetCallback("OnValueChanged", function(_w,event,value) addon.DEBUG_PRINT = value end) + w:SetCallback("OnValueChanged", function(_w,event,value) + addon.DEBUG_PRINT = value + addon:redisplay() + end) + simple:AddChild(w) + w = GUI:Create("CheckBoxSmallLabel") + w:SetFullWidth(true) + w:SetType("checkbox") + w:SetLabel("GOP history mode") + w:SetValue(false) + w:SetCallback("OnValueChanged", function(_w,event,value) addon.history_suppress = value end) simple:AddChild(w) w = mkbutton("Clear All & Reload", [[No confirmation! |cffff1010Erases absolutely all> Ouro Loot saved variables and reloads the UI.]]) @@ -1434,6 +1451,8 @@ w:SetLabel(d) if d == "notraid" then w:SetDescription("Tick this before enabling to make the addon work outside of raid groups") + else + w:SetDisabled(not addon.DEBUG_PRINT) end w:SetValue(v) w:SetCallback("OnValueChanged", function(_w,event,value) addon.debug[d] = value end)