Mercurial > wow > ouroloot
comparison core.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 | f75329fe5758 |
| children | cd745a18d7c7 |
comparison
equal
deleted
inserted
replaced
| 35:f75329fe5758 | 36:f62d582c5c52 |
|---|---|
| 1770 self.hist_clean = nil | 1770 self.hist_clean = nil |
| 1771 | 1771 |
| 1772 self:Print("Reassigned entry %d/%s from '%s' to '%s'.", index, e.itemlink, from_name, to_name) | 1772 self:Print("Reassigned entry %d/%s from '%s' to '%s'.", index, e.itemlink, from_name, to_name) |
| 1773 end | 1773 end |
| 1774 | 1774 |
| 1775 -- Similar to _addHistoryEntry. The second arg may be a loot entry | |
| 1776 -- (which used to be at LOOTINDEX), or nil (and the loot entry will | |
| 1777 -- be pulled from LOOTINDEX instead). | |
| 1778 function addon:_delHistoryEntry (lootindex, opt_e) | |
| 1779 local e = opt_e or g_loot[lootindex] | |
| 1780 if e.kind ~= 'loot' then return end | |
| 1781 | |
| 1782 local from_i, from_h, hist_i = self:_history_by_loot_id (e, "delete") | |
| 1783 if not from_i then | |
| 1784 -- from_h is the formatted error text | |
| 1785 self:Print(from_h .. " Loot will be deleted, but history will NOT be updated.", e.itemlink) | |
| 1786 return | |
| 1787 end | |
| 1788 | |
| 1789 --[[local hist_h = ]]tremove (from_h, hist_i) | |
| 1790 tsort (from_h, comp) | |
| 1791 self.hist_clean = nil | |
| 1792 | |
| 1793 self:Print("Removed history entry %d/%s from '%s'.", lootindex, e.itemlink, e.person) | |
| 1794 end | |
| 1795 | |
| 1775 -- Any extra work for the "Mark as <x>" dropdown actions. The | 1796 -- Any extra work for the "Mark as <x>" dropdown actions. The |
| 1776 -- corresponding <x> will already have been assigned in the loot entry. | 1797 -- corresponding <x> will already have been assigned in the loot entry. |
| 1777 local deleted_cache = {} --setmetatable({}, {__mode='k'}) | 1798 local deleted_cache = {} --setmetatable({}, {__mode='k'}) |
| 1778 function addon:history_handle_disposition (index, olddisp) | 1799 function addon:history_handle_disposition (index, olddisp) |
| 1779 local e = g_loot[index] | 1800 local e = g_loot[index] |
