Mercurial > wow > inventory
comparison Modules/Config.lua @ 157:e136c99fe5bb
You can now select which guilds to include in the item count when selecting an item count supporting this.
Renamed DataStore (with guilds) to ?all accounts?.
Removed DataStore (without guilds) option.
author | Zerotorescue |
---|---|
date | Sat, 22 Jan 2011 19:24:48 +0100 |
parents | 314943963155 |
children | fcc95c62d232 |
comparison
equal
deleted
inserted
replaced
156:314943963155 | 157:e136c99fe5bb |
---|---|
1708 if addon.supportedAddons.crafting[v].OnSelect then | 1708 if addon.supportedAddons.crafting[v].OnSelect then |
1709 addon.supportedAddons.crafting[v].OnSelect(); | 1709 addon.supportedAddons.crafting[v].OnSelect(); |
1710 end | 1710 end |
1711 end, | 1711 end, |
1712 }, | 1712 }, |
1713 guildSelection = { | |
1714 order = 40, | |
1715 type = "multiselect", | |
1716 name = "Include guild bank data", | |
1717 desc = "Select which guild data should be included in the item counts.", | |
1718 values = function() | |
1719 local temp = {}; | |
1720 | |
1721 local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); | |
1722 | |
1723 if currentAddon.GetGuildNames then | |
1724 local guilds = currentAddon.GetGuildNames(); | |
1725 | |
1726 if guilds and type(guilds) == "table" then | |
1727 for guildName, state in pairs(guilds) do | |
1728 temp[guildName] = guildName; | |
1729 | |
1730 if addon.db.profile.defaults.itemCountGuildsExcluded[guildName] then | |
1731 currentAddon.SetGuildState(guildName, false); | |
1732 else | |
1733 currentAddon.SetGuildState(guildName, true); | |
1734 end | |
1735 end | |
1736 end | |
1737 end | |
1738 | |
1739 return temp; | |
1740 end, | |
1741 get = function(i, v) | |
1742 local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); | |
1743 | |
1744 return currentAddon.GetGuildNames and currentAddon.GetGuildNames()[v]; | |
1745 end, | |
1746 set = function(i, v, e) | |
1747 local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); | |
1748 | |
1749 if e then | |
1750 -- Guild is enabled, so not excluded | |
1751 addon.db.profile.defaults.itemCountGuildsExcluded[v] = nil; | |
1752 else | |
1753 addon.db.profile.defaults.itemCountGuildsExcluded[v] = true; -- this is excluded, excluded is indicated by true | |
1754 end | |
1755 | |
1756 if currentAddon.SetGuildState then | |
1757 currentAddon.SetGuildState(v, e); | |
1758 end | |
1759 end, -- can't be nil or the defaults will be used | |
1760 dialogControl = "Dropdown", -- this is not standard, normal multiselect control gives us a list of all chars with toggle-boxes. UGLY! We want a multiselect-box instead. | |
1761 }, | |
1713 }, | 1762 }, |
1714 }, | 1763 }, |
1715 }, | 1764 }, |
1716 }; | 1765 }; |
1717 end | 1766 end |
1777 values.trackAtCharacters[name] = nil; | 1826 values.trackAtCharacters[name] = nil; |
1778 end | 1827 end |
1779 end | 1828 end |
1780 end | 1829 end |
1781 end, | 1830 end, |
1782 }, | |
1783 }, | |
1784 }, | |
1785 guildSelection = { | |
1786 order = 15, | |
1787 type = "group", | |
1788 inline = true, | |
1789 name = "Filter item count data", | |
1790 args = { | |
1791 description = { | |
1792 order = 0, | |
1793 type = "description", | |
1794 name = "Change which data sources are used in the item counts.", | |
1795 hidden = function() return addon.db.profile.defaults.hideHelp; end, | |
1796 }, | |
1797 header = { | |
1798 order = 5, | |
1799 type = "header", | |
1800 name = "", | |
1801 hidden = function() return addon.db.profile.defaults.hideHelp; end, | |
1802 }, | |
1803 guilds = { | |
1804 order = 20, | |
1805 type = "multiselect", | |
1806 width = "double", | |
1807 name = "Include guild bank data", | |
1808 desc = "Select which guild data should be included in the item counts.", | |
1809 values = function() | |
1810 local temp = {}; | |
1811 | |
1812 local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); | |
1813 | |
1814 if currentAddon.GetGuildNames then | |
1815 local guilds = currentAddon.GetGuildNames(); | |
1816 | |
1817 if guilds and type(guilds) == "table" then | |
1818 for guildName, state in pairs(guilds) do | |
1819 temp[guildName] = guildName; | |
1820 end | |
1821 end | |
1822 end | |
1823 | |
1824 return temp; | |
1825 end, | |
1826 get = function(i, v) | |
1827 local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); | |
1828 | |
1829 return currentAddon.GetGuildNames and currentAddon.GetGuildNames()[v]; | |
1830 end, | |
1831 set = function(i, v, e) | |
1832 local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); | |
1833 | |
1834 if currentAddon.SetGuildState then | |
1835 currentAddon:SetGuildState(v, e); | |
1836 end | |
1837 end, -- can't be nil or the defaults will be used | |
1838 dialogControl = "Dropdown", -- this is not standard, normal multiselect control gives us a list of all chars with toggle-boxes. UGLY! We want a multiselect-box instead. | |
1839 }, | 1831 }, |
1840 }, | 1832 }, |
1841 }, | 1833 }, |
1842 export = { | 1834 export = { |
1843 order = 20, | 1835 order = 20, |