Quantcast

Added a "Display Exclusions" checkbox beneath the search box.

James D. Callahan III [04-20-10 - 07:48]
Added a "Display Exclusions" checkbox beneath the search box.
Filename
Frame.lua
Locales/devel-enUS.lua
diff --git a/Frame.lua b/Frame.lua
index 7ed1155..71b7991 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -1677,6 +1677,37 @@ do
 end	-- do

 -------------------------------------------------------------------------------
+-- "Display Exclusions" checkbox.
+-------------------------------------------------------------------------------
+local ExcludeToggle = CreateFrame("CheckButton", nil, MainPanel, "UICheckButtonTemplate")
+ExcludeToggle:SetPoint("TOPLEFT", SearchBox, "BOTTOMLEFT", -5, -5)
+ExcludeToggle:SetHeight(16)
+ExcludeToggle:SetWidth(16)
+
+ExcludeToggle.text = ExcludeToggle:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
+ExcludeToggle.text:SetPoint("LEFT", ExcludeToggle, "RIGHT", 0, 0)
+
+ExcludeToggle:SetScript("OnClick",
+			function(self, button, down)
+				addon.db.profile.ignoreexclusionlist = not addon.db.profile.ignoreexclusionlist
+				ListFrame:Update(nil, false)
+			end)
+
+ExcludeToggle:SetScript("OnShow",
+			function(self)
+				self:SetChecked(addon.db.profile.ignoreexclusionlist)
+			end)
+
+ExcludeToggle:SetNormalTexture("Interface\\Buttons\\UI-CheckBox-Up")
+ExcludeToggle:SetPushedTexture("Interface\\Buttons\\UI-CheckBox-Down")
+ExcludeToggle:SetHighlightTexture("Interface\\Buttons\\UI-CheckBox-Highlight")
+ExcludeToggle:SetDisabledCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check-Disabled")
+ExcludeToggle:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check")
+
+ExcludeToggle.text:SetText(L["Display Exclusions"])
+SetTooltipScripts(ExcludeToggle, L["DISPLAY_EXCLUSION_DESC"], 1)
+
+-------------------------------------------------------------------------------
 -- Create the X-close button, and set its scripts.
 -------------------------------------------------------------------------------
 MainPanel.xclose_button = CreateFrame("Button", nil, MainPanel, "UIPanelCloseButton")
@@ -1691,7 +1722,6 @@ MainPanel.xclose_button:SetScript("OnClick",
 -- Create MainPanel.filter_toggle, and set its scripts.
 -------------------------------------------------------------------------------
 MainPanel.filter_toggle = GenericCreateButton(nil, MainPanel, 25, 74, "GameFontNormalSmall", "GameFontHighlightSmall", L["FILTER_OPEN"], "CENTER", L["FILTER_OPEN_DESC"], 1)
--- MainPanel.filter_toggle:SetPoint("TOPRIGHT", MainPanel, "TOPRIGHT", -8, -40)
 MainPanel.filter_toggle:SetPoint("TOPRIGHT", WidgetContainer, "TOPRIGHT", 0, 0)

 MainPanel.filter_toggle:SetScript("OnClick",
diff --git a/Locales/devel-enUS.lua b/Locales/devel-enUS.lua
index 88d7bb0..c1ec2dc 100644
--- a/Locales/devel-enUS.lua
+++ b/Locales/devel-enUS.lua
@@ -347,7 +347,8 @@ L["FILTER_OPEN_DESC"]		= "Open filter option panel."
 L["FILTER_CLOSE"]			= "<<< Filter"
 L["FILTER_CLOSE_DESC"]		= "Close filter option panel."
 L["EXPANDALL"]				= "+ All"
-L["EXPANDALL_DESC"]			= "Expand all recipes listed below. Hold the Shift key to expand sub-entries."
+L["EXPANDALL_DESC"]			= [[Expand all recipes listed below.
+Hold the Shift key to expand sub-entries.]]
 L["CONTRACTALL"]			= "- All"
 L["CONTRACTALL_DESC"]		= "Minimize all recipes listed below."
 L["SEARCH_DESC"]			= "Filter to recipes that contain text at left."