From 9939485c5fafeda3b7c86ddf5633b1bd5087676e Mon Sep 17 00:00:00 2001 From: Xruptor Date: Mon, 16 Apr 2012 17:24:40 -0400 Subject: [PATCH] -another darn fix for positioning sheesh --- XanChat.lua | 24 +++++------------------- XanChat.toc | 2 +- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/XanChat.lua b/XanChat.lua index 7418422..737c352 100644 --- a/XanChat.lua +++ b/XanChat.lua @@ -332,22 +332,6 @@ for i = 1, NUM_CHAT_WINDOWS do end end -function eFrame:ADDON_LOADED(self, arg1) - if string.lower(arg1) == "xanchat" then - - for i = 1, NUM_CHAT_WINDOWS do - local n = ("ChatFrame%d"):format(i) - local f = _G[n] - if f then - RestoreLayout(f) - end - end - - eFrame:UnregisterEvent("ADDON_LOADED") - eFrame.ADDON_LOADED = nil - end -end - function eFrame:PLAYER_LOGIN() --do the DB stuff @@ -381,6 +365,10 @@ function eFrame:PLAYER_LOGIN() local f = _G[n] if f then + + --restore saved layout + RestoreLayout(f) + local editBox = _G[n.."EditBox"] if not editBox.left then @@ -442,7 +430,7 @@ function eFrame:PLAYER_LOGIN() if XCHT_DB.newLayout == nil and f:IsUserPlaced() then SaveLayout(f) end - + end if XCHT_DB.newLayout == nil then XCHT_DB.newLayout = true end @@ -567,6 +555,4 @@ function eFrame:PLAYER_LOGIN() eFrame.PLAYER_LOGIN = nil end -eFrame:RegisterEvent("ADDON_LOADED") - if IsLoggedIn() then eFrame:PLAYER_LOGIN() else eFrame:RegisterEvent("PLAYER_LOGIN") end diff --git a/XanChat.toc b/XanChat.toc index fab8178..31dd3d1 100644 --- a/XanChat.toc +++ b/XanChat.toc @@ -2,7 +2,7 @@ ## Title: xanChat ## Notes: A very minimalistic chat modification addon. ## Author: Xruptor -## Version: 3.1 +## Version: 3.2 ## SavedVariables: XCHT_DB xanChat.lua -- 1.7.9.5