From 90ec3d7ad4f8bc3b78f46f37eaee3b06acbfe962 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Thu, 15 Jul 2010 16:25:02 -0400 Subject: [PATCH] this --> self --- Interface/Common.lua | 44 ++++++++++++++++++++++---------------------- Interface/FilterMenus.lua | 8 ++++---- core.lua | 4 ++-- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Interface/Common.lua b/Interface/Common.lua index e1481d1..28952a3 100644 --- a/Interface/Common.lua +++ b/Interface/Common.lua @@ -129,37 +129,37 @@ do -- (found in RockConfig) -- when pressed, the button should look pressed - local function button_OnMouseDown(this) - if this:IsEnabled() then - this.left:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]) - this.middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]) - this.right:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]) + local function button_OnMouseDown(self) + if self:IsEnabled() then + self.left:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]) + self.middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]) + self.right:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]) end end -- when depressed, return to normal - local function button_OnMouseUp(this) - if this:IsEnabled() then - this.left:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) - this.middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) - this.right:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) + local function button_OnMouseUp(self) + if self:IsEnabled() then + self.left:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) + self.middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) + self.right:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) end end - local function button_Disable(this) - this.left:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]) - this.middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]) - this.right:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]) - this:__Disable() - this:EnableMouse(false) + local function button_Disable(self) + self.left:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]) + self.middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]) + self.right:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]) + self:__Disable() + self:EnableMouse(false) end - local function button_Enable(this) - this.left:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) - this.middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) - this.right:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) - this:__Enable() - this:EnableMouse(true) + local function button_Enable(self) + self.left:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) + self.middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) + self.right:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]) + self:__Enable() + self:EnableMouse(true) end function private.GenericCreateButton(name, parent, height, width, font_object, label, justify_h, tip_text, noTextures) diff --git a/Interface/FilterMenus.lua b/Interface/FilterMenus.lua index 5a39317..d8382c0 100644 --- a/Interface/FilterMenus.lua +++ b/Interface/FilterMenus.lua @@ -1128,14 +1128,14 @@ function private.InitializeFilterPanel() end ARL_MiscAltBtn:SetScript("OnClick", - function(this, button) + function(self, button) if clicktip then if not click_info.modified then clicktip = QTip:Release(clicktip) table.wipe(click_info) else table.wipe(click_info) - GenerateClickableTT(this) + GenerateClickableTT(self) end else clicktip = QTip:Acquire("ARL_Clickable", 1, "CENTER") @@ -1144,12 +1144,12 @@ function private.InitializeFilterPanel() if _G.TipTac and _G.TipTac.AddModifiedTip then _G.TipTac:AddModifiedTip(clicktip, true) end - GenerateClickableTT(this) + GenerateClickableTT(self) end end) ARL_MiscAltBtn:SetScript("OnHide", - function(this, button) + function(self, button) clicktip = QTip:Release(clicktip) table.wipe(click_info) end) diff --git a/core.lua b/core.lua index fe10690..907ee3f 100644 --- a/core.lua +++ b/core.lua @@ -520,8 +520,8 @@ function addon:OnInitialize() end) scan_button:SetScript("OnEnter", - function(this) - GameTooltip_SetDefaultAnchor(GameTooltip, this) + function(self) + GameTooltip_SetDefaultAnchor(GameTooltip, self) GameTooltip:SetText(L["SCAN_RECIPES_DESC"]) GameTooltip:Show() end) -- 1.7.9.5