Index: simpleMinimap.lua
===================================================================
--- simpleMinimap.lua	(revision 24240)
+++ simpleMinimap.lua	(working copy)
@@ -10,7 +10,7 @@
 		bgs = MiniMapBattlefieldFrame,
 		map = MiniMapWorldMapButton,
 		mail = MiniMapMailFrame,
-		meet = MiniMapMeetingStoneFrame,
+		meet = MiniMapMeetingStoneFrame,
 		time = GameTimeFrame,
 		track = MiniMapTrackingFrame,
 		zoomin = MinimapZoomIn,
@@ -37,17 +37,17 @@
 				min=0, max=1, step=0.05, isPercent=true,
 				get=function() return(self.db.profile.alpha) end,
 				set=function(x) self.db.profile.alpha=x self:UpdateScreen() end
-			},
-			resize={
-				type= "toggle", order=4, name=L.resize, desc=L.resize_desc,
-				get=function() return(self.db.profile.resize) end,
-				set=function(x) self.db.profile.resize=x self:UpdateScreen() end
 			},
+			resize={
+				type= "toggle", order=4, name=L.resize, desc=L.resize_desc,
+				get=function() return(self.db.profile.resize) end,
+				set=function(x) self.db.profile.resize=x self:UpdateScreen() end
+			},
 			scale={
 				type="range", order=5, name=L.scale, desc=L.scale_desc,
 				min=0.5, max=2, step=0.05,
 				get=function() return(self.db.profile.scale) end,
-				set=function(x)
+				set=function(x)
 					local p = self.db.profile
 					if(p.mapPosition) then
 						p.mapPosition[1] = (p.scale / x) * p.mapPosition[1]
@@ -132,11 +132,11 @@
 				get=function() return(self.db.profile.lock) end,
 				set=function(x) self.db.profile.lock=x self:UpdateScreen() end
 			},
-			lockdown={
-				type="toggle", order=98, name=L.lockdown, desc=L.lockdown_desc,
-				get=function() return(self.db.profile.lockdown) end,
-				set=function(x) self.db.profile.lockdown=x self:UpdateScreen() end
-			},
+			lockdown={
+				type="toggle", order=98, name=L.lockdown, desc=L.lockdown_desc,
+				get=function() return(self.db.profile.lockdown) end,
+				set=function(x) self.db.profile.lockdown=x self:UpdateScreen() end
+			},
 			reset={
 				type="execute", order=99, name=L.reset, desc=L.reset_desc,
 				func=function() StaticPopup_Show("smmRESET") end
@@ -149,29 +149,29 @@
 	StaticPopupDialogs["smmRESET"] = {
 		text = L.reset_popup, button1 = TEXT(ACCEPT), button2 = TEXT(CANCEL),
 		timeout = 30, whileDead = 1, hideOnEscape = 1,
-		OnAccept = function()
-			self:ResetDB("profile")
-			self:UpdateScreen()
+		OnAccept = function()
+			self:ResetDB("profile")
+			self:UpdateScreen()
 		end
 	}
 end
 --
 function simpleMinimap:OnEnable()
-	if(not self.frame) then
-		local f = self.frame
-		f = CreateFrame("Frame", nil, Minimap)
+	if(not self.frame) then
+		local f = CreateFrame("Frame", nil, Minimap)
 		f:SetWidth(112)
 		f:SetHeight(112)
 		f:SetPoint("CENTER")
 		f:SetToplevel(true)
 		f:EnableMouseWheel(true)
-		f:SetScript("OnMouseWheel", function()
-			if(arg1>0) then
-				Minimap_ZoomIn()
-			else
-				Minimap_ZoomOut()
-			end
+		f:SetScript("OnMouseWheel", function()
+			if(arg1>0) then
+				Minimap_ZoomIn()
+			else
+				Minimap_ZoomOut()
+			end
 		end)
+		self.frame = f
 	end
 	MinimapCluster:SetMovable(true)
 	Minimap:RegisterForDrag("LeftButton")
@@ -192,7 +192,7 @@
 end
 --
 function simpleMinimap:OnDisable()
-	for n in self:IterateModules() do self:ToggleModuleActive(self:GetModule(n), false) end
+	for n in self:IterateModules() do self:ToggleModuleActive(self:GetModule(n), false) end
 	self.doReset = true
 	self:UpdateScreen()
 	MinimapCluster:SetMovable(false)
@@ -245,7 +245,7 @@
 		if (z>0) then frame:SetZoom(0) else frame:SetZoom(1) end
 		frame:SetZoom(z)
 	end
-	if (not self.expandedFrame) then
+	if (not self.expandedFrame) then
 		local f = CreateFrame("Minimap", nil, UIParent)
 		f:SetHeight(UIParent:GetHeight() * 0.6)
 		f:SetWidth(self.expandedFrame:GetHeight())
@@ -253,7 +253,7 @@
 		f:SetFrameStrata("TOOLTIP")
 		f:EnableMouse(false)
 		f:EnableMouseWheel(false)
-		f:EnableKeyboard(false)
+		f:EnableKeyboard(false)
 		self.expandedFrame = f
 	end
 	if (keystate == "down") then
@@ -267,7 +267,7 @@
 	end
 end
 --
-function simpleMinimap:MapDrag(kick)
+function simpleMinimap:MapDrag(kick)
 	local p = self.db.profile
 	if(kick and not p.lock) then
 		MinimapCluster.isMoving = true
@@ -304,99 +304,99 @@
 	end
 end
 
---[[ screen updates ]]--
---
-function simpleMinimap:UpdateScreen()
-	local p = self.db.profile
-	if(not self:IsActive()) then
-		if(self.doReset) then
-			p = self.defaults
-			self.doReset = nil
-		else
-			return
-		end
-	end
--- set minimap
-	self:Lockdown(MinimapCluster, "SetScale", p.scale)
-	self:Lockdown(MinimapCluster, "SetFrameStrata", self.stratas[p.strata])
-	self:Lockdown(MinimapCluster, "SetAlpha", p.alpha)
-	self:Lockdown(MinimapCluster, "ClearAllPoints")
-	if(p.mapPosition) then
-		self:Lockdown(MinimapCluster, "SetPoint", "CENTER", UIParent, "BOTTOMLEFT", p.mapPosition[1], p.mapPosition[2])
-	else
-		self:Lockdown(MinimapCluster, "SetPoint", "TOPRIGHT", UIParent)
-	end
--- set minimap location bar
-	if(p.locationBar.show) then
-		self:Lockdown(MinimapToggleButton, "Show")
-		self:Lockdown(MinimapBorderTop, "Show")
-		self:Lockdown(MinimapZoneTextButton, "Show")
-	else
-		self:Lockdown(MinimapToggleButton, "Hide")
-		self:Lockdown(MinimapBorderTop, "Hide")
-		if(p.locationBar.text) then
-			self:Lockdown(MinimapZoneTextButton, "Show")
-		else
-			self:Lockdown(MinimapZoneTextButton, "Hide")
-		end
-	end
--- set minimap buttons
-	for n, f in pairs(self.buttons) do
-		if(n == "zoomin" or n=="zoomout") then
-			if(p.show.zoom) then
-				f:Show()
-			else
-				f:Hide()
-			end
-		else
-			if(not p.show[n]) then
-				if(not f.smmHide) then
-					f.smmHide = f.Hide
-					f.smmShow = f.Show
-					if(f:IsShown()) then f.smmDoShow = true end
-					f.Hide = function() this.smmDoShow = nil end
-					f.Show = function() this.smmDoShow = true end
-				end
-				f:smmHide()
-			elseif(f.smmHide) then
-				f.Hide = f.smmHide
-				f.Show = f.smmShow
-				f.smmHide, f.smmShow = nil, nil
-				if(f.smmDoShow) then
-					f.smmDoShow = nil
-					f:Show()
-				end
-			end
-		end
-		if(p.resize) then
-			f:SetWidth(33)
-			f:SetHeight(33)
-		end
-		f:ClearAllPoints()
-		f:SetPoint("TOPLEFT", Minimap, "TOPLEFT", self:GetButtonPos(p.buttonPos[n]))
-	end
--- let any modules update the screen also
-	for n in self:IterateModules() do self:GetModule(n):UpdateScreen() end
-end
+--[[ screen updates ]]--
+--
+function simpleMinimap:UpdateScreen()
+	local p = self.db.profile
+	if(not self:IsActive()) then
+		if(self.doReset) then
+			p = self.defaults
+			self.doReset = nil
+		else
+			return
+		end
+	end
+-- set minimap
+	self:Lockdown(MinimapCluster, "SetScale", p.scale)
+	self:Lockdown(MinimapCluster, "SetFrameStrata", self.stratas[p.strata])
+	self:Lockdown(MinimapCluster, "SetAlpha", p.alpha)
+	self:Lockdown(MinimapCluster, "ClearAllPoints")
+	if(p.mapPosition) then
+		self:Lockdown(MinimapCluster, "SetPoint", "CENTER", UIParent, "BOTTOMLEFT", p.mapPosition[1], p.mapPosition[2])
+	else
+		self:Lockdown(MinimapCluster, "SetPoint", "TOPRIGHT", UIParent)
+	end
+-- set minimap location bar
+	if(p.locationBar.show) then
+		self:Lockdown(MinimapToggleButton, "Show")
+		self:Lockdown(MinimapBorderTop, "Show")
+		self:Lockdown(MinimapZoneTextButton, "Show")
+	else
+		self:Lockdown(MinimapToggleButton, "Hide")
+		self:Lockdown(MinimapBorderTop, "Hide")
+		if(p.locationBar.text) then
+			self:Lockdown(MinimapZoneTextButton, "Show")
+		else
+			self:Lockdown(MinimapZoneTextButton, "Hide")
+		end
+	end
+-- set minimap buttons
+	for n, f in pairs(self.buttons) do
+		if(n == "zoomin" or n=="zoomout") then
+			if(p.show.zoom) then
+				f:Show()
+			else
+				f:Hide()
+			end
+		else
+			if(not p.show[n]) then
+				if(not f.smmHide) then
+					f.smmHide = f.Hide
+					f.smmShow = f.Show
+					if(f:IsShown()) then f.smmDoShow = true end
+					f.Hide = function() this.smmDoShow = nil end
+					f.Show = function() this.smmDoShow = true end
+				end
+				f:smmHide()
+			elseif(f.smmHide) then
+				f.Hide = f.smmHide
+				f.Show = f.smmShow
+				f.smmHide, f.smmShow = nil, nil
+				if(f.smmDoShow) then
+					f.smmDoShow = nil
+					f:Show()
+				end
+			end
+		end
+		if(p.resize) then
+			f:SetWidth(33)
+			f:SetHeight(33)
+		end
+		f:ClearAllPoints()
+		f:SetPoint("TOPLEFT", Minimap, "TOPLEFT", self:GetButtonPos(p.buttonPos[n]))
+	end
+-- let any modules update the screen also
+	for n in self:IterateModules() do self:GetModule(n):UpdateScreen() end
+end
 
 --[[ internal functions ]]--
---
-function simpleMinimap:Lockdown(frame, method, ...)
-	if(self:IsActive() and self.db.profile.lockdown) then
-		if(not frame["smm"..method]) then
-			frame["smm"..method] = frame[method]
-			frame[method] = function() end
-		end
-		return frame["smm"..method](frame, ...)
-	else
-		if(frame["smm"..method]) then
-			frame[method] = frame["smm"..method]
-			frame["smm"..method] = nil
-		end
-		return frame[method](frame, ...)
-	end
-end
 --
+function simpleMinimap:Lockdown(frame, method, ...)
+	if(self:IsActive() and self.db.profile.lockdown) then
+		if(not frame["smm"..method]) then
+			frame["smm"..method] = frame[method]
+			frame[method] = function() end
+		end
+		return frame["smm"..method](frame, ...)
+	else
+		if(frame["smm"..method]) then
+			frame[method] = frame["smm"..method]
+			frame["smm"..method] = nil
+		end
+		return frame[method](frame, ...)
+	end
+end
+--
 function simpleMinimap:GetButtonPos(vector)
 	if(self:HasModule("skins")) then
 		return self:GetModule("skins"):GetButtonPos(vector)
