Mercurial > wow > ouroloot
changeset 122:fb4bda3ad05c
Various trivial cleanups.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Fri, 17 Aug 2012 01:04:38 -0400 |
parents | 4dd67f8116f4 |
children | ccca3d8d2b22 |
files | LibFarmbuyer.lua core.lua gui.lua options.lua verbage.lua |
diffstat | 5 files changed, 10 insertions(+), 47 deletions(-) [+] |
line wrap: on
line diff
--- a/LibFarmbuyer.lua Fri Aug 17 00:34:05 2012 -0400 +++ b/LibFarmbuyer.lua Fri Aug 17 01:04:38 2012 -0400 @@ -55,7 +55,7 @@ Ditto for table recycling. ]] -local MAJOR, MINOR = "LibFarmbuyer", 19 +local MAJOR, MINOR = "LibFarmbuyer", 20 assert(LibStub,MAJOR.." requires LibStub") local lib = LibStub:NewLibrary(MAJOR, MINOR) if not lib then return end @@ -184,7 +184,6 @@ end local function OnAccept_witheditbox (dialog, data, data2) local info = StaticPopupDialogs[dialog.which] - --dialog.usertext = dialog[info.hasWideEditBox and "wideEditBox" or "editBox"]:GetText():trim() dialog.usertext = dialog.editBox:GetText():trim() if info.farm_OnAccept then return info.farm_OnAccept (dialog, data, data2)
--- a/core.lua Fri Aug 17 00:34:05 2012 -0400 +++ b/core.lua Fri Aug 17 01:04:38 2012 -0400 @@ -3221,12 +3221,6 @@ } t.realm = realmname - --[[ - t.cols = setmetatable({ - { value = realmname }, - }, self.time_column1_used_mt) - ]] - if not t.byname then self:_build_history_names (t) end @@ -3694,14 +3688,6 @@ ------ Player communication do local select, tconcat, strsplit, unpack = select, table.concat, strsplit, unpack - --[[ old way: repeated string concatenations, BAD - new way: new table on every broadcast, BAD - local msg = ... - for i = 2, select('#',...) do - msg = msg .. '\a' .. (select(i,...) or "") - end - return msg - ]] local function assemble(t,...) local n = select('#',...) if n > 0 then @@ -3833,7 +3819,7 @@ end) local waferthin = addon.format_hypertext ([[the blue pill]], '|cff0070dd', function (self) - g_wafer_thin = true -- mint? it's wafer thin! + g_wafer_thin = true -- mint? it's wafer thin! self:broadcast('bcast_denied') -- fuck off, I'm full end) OCR_funcs.bcast_req = function (sender)
--- a/gui.lua Fri Aug 17 00:34:05 2012 -0400 +++ b/gui.lua Fri Aug 17 01:04:38 2012 -0400 @@ -467,21 +467,13 @@ opt_starting_index = nil end if not self.history.st then - --print"creating ST!" - self.history.st = { - --[[{ kind = "realm", - cols = setmetatable({ - { value = self.history.realm }, - }, time_column1_used_mt) - }]] - } + self.history.st = {} end -- for now if self.hist_clean == #self.history then return end local st = self.history.st - --print("starting history loop, #st ==", #st, "#history ==", #self.history) for i,t in ipairs(st) do del(t.cols[1]) del(t.cols[2]) @@ -539,7 +531,6 @@ end end - --print("finished history loop, #st ==", #st) self.hist_clean = cache_okay and #self.history or nil end end @@ -795,7 +786,7 @@ ]] do - --local next_insertion_position = 2 -- position in taborder + -- position in taborder local next_insertion_position = #gui.taborder + 1 local removed, saved_offset @@ -1422,7 +1413,7 @@ -- Calling SetData breaks (trying to call Refresh) if g_loot hasn't gone -- through this loop. addon:_fill_out_eoi_data(1) - -- safety check begin + --[[ safety check begin for i,e in ipairs(g_dloot) do if type(e.cols) ~= 'table' then addon:Print("ARGH, index",i,"bad in eoi_OGS, type",type(e.cols), @@ -1431,7 +1422,7 @@ tabledump(e) end end - -- safety check end + -- safety check end]] ST:SetData(g_dloot) ST:EnableSelection(true) ST:RegisterEvents{ @@ -1452,7 +1443,7 @@ end ST.OuroLoot_Refresh = function (self, opt_index) addon:_fill_out_eoi_data(opt_index) - -- safety check begin + --[[ safety check begin for i,e in ipairs(g_dloot) do if type(e.cols) ~= 'table' then addon:Print("ARGH, index",i,"bad in eoi refresh, refreshed at", opt_index, "type",type(e.cols), @@ -1461,7 +1452,7 @@ tabledump(e) end end - -- safety check end + -- safety check end]] self:SortData() -- calls hooked refresh end @@ -1733,7 +1724,6 @@ cellFrame.text:SetText(cell.value) cellFrame.text:SetTextColor(1,1,1,1) - --stable:SetHighLightColor (rowFrame, eoi_st_otherrow_bgcolortable[h.kind]) stable:SetHighLightColor (rowFrame, eoi_st_otherrow_bgcolortable_default) end
--- a/options.lua Fri Aug 17 00:34:05 2012 -0400 +++ b/options.lua Fri Aug 17 01:04:38 2012 -0400 @@ -206,21 +206,10 @@ pair:SetRelativeWidth(0.49) pair:SetTitle('Keybinding for "/ouroloot toggle"') local checkbox, button - --[=[ - editbox = mkbutton("EditBox", nil, opts.keybinding_text, - [[Keybinding text format is fragile! (All caps, ALT then CTRL then SHIFT.) Relog to take effect.]]) - editbox:SetFullWidth(true) - editbox:SetLabel("Keybinding text") - editbox:SetCallback("OnEnterPressed", function(_w,event,value) - opts.keybinding_text = value - end) - editbox:SetDisabled(not opts.keybinding) - ]=] checkbox = mktoggle('keybinding', "Register keybinding", 1, [[Whether to register a keybinding to toggle the loot display. Relog to take effect.]], function (_w,_,value) opts.keybinding = value - --editbox:SetDisabled(not opts.keybinding) button:SetDisabled(not opts.keybinding) end) checkbox:SetFullWidth(true) @@ -249,7 +238,7 @@ end end end) - pair:AddChildren (checkbox, button)--, editbox) + pair:AddChildren (checkbox, button) container:AddChild(pair) end @@ -462,7 +451,6 @@ --addon:Print("No longer filtering out", ilink) addon:Print("No longer filtering out", val_name) end) - --w:SetCallback("OnDropdownShown",do_warning) w:SetCallback("OnDropdownShown", function() do_warning(container) end)
--- a/verbage.lua Fri Aug 17 00:34:05 2012 -0400 +++ b/verbage.lua Fri Aug 17 01:04:38 2012 -0400 @@ -627,7 +627,7 @@ treeg:ReleaseChildren() local txt = AceGUI:Create("Label") txt:SetFullWidth(true) - txt:SetFontObject(GameFontNormal)--Highlight) + txt:SetFontObject(GameFontNormal) txt:SetText(helptext[category]) local sf = AceGUI:Create("ScrollFrame") sf:SetStatusTable(status_for_scroll)