From eee0c8bd747bce343f86cb8a00a334d23a958e0f Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Sun, 27 Mar 2011 06:19:09 -0500 Subject: [PATCH] Minor cleanup. --- Interface/Panel.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Interface/Panel.lua b/Interface/Panel.lua index b910311..d27998a 100644 --- a/Interface/Panel.lua +++ b/Interface/Panel.lua @@ -962,7 +962,10 @@ function private.InitializeFrame() -- Create MainPanel.filter_toggle, and set its scripts. ------------------------------------------------------------------------------- do - local function Toggle_OnClick(self, button, down) + local filter_toggle = GenericCreateButton(nil, MainPanel, 24, 24, nil, nil, nil, L["FILTER_OPEN_DESC"], 2) + filter_toggle:SetPoint("TOPLEFT", MainPanel, "TOPLEFT", 323, -41) + + filter_toggle:SetScript("OnClick", function(self, button, down) -- The first time this button is clicked, everything in the expanded section of the MainPanel must be created. if private.InitializeFilterPanel then private.InitializeFilterPanel() @@ -971,12 +974,7 @@ function private.InitializeFrame() MainPanel:ToggleState() self:SetTextures() - end - - local filter_toggle = GenericCreateButton(nil, MainPanel, 24, 24, nil, nil, nil, L["FILTER_OPEN_DESC"], 2) - filter_toggle:SetPoint("TOPLEFT", MainPanel, "TOPLEFT", 323, -41) - - filter_toggle:SetScript("OnClick", Toggle_OnClick) + end) filter_toggle:SetHighlightTexture([[Interface\CHATFRAME\UI-ChatIcon-BlinkHilight]]) -- 1.7.9.5