diff gui.lua @ 51:857aea8ae33d

Also detect LFR happening and load then, before they zone in and potentially get into combat. Detect combat and avoid secure button creation in that case anyhow.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Wed, 01 Feb 2012 02:34:10 +0000
parents fd3dd12f96ce
children 94dacaeff463
line wrap: on
line diff
--- a/gui.lua	Mon Jan 30 14:43:24 2012 +0000
+++ b/gui.lua	Wed Feb 01 02:34:10 2012 +0000
@@ -155,6 +155,7 @@
 
 	-- LOD tab has been clicked on.
 	local function _handle_LOD (tabs_container,specials,tabtitle)
+		-- "tabtitle" here is the name in _taborder, not the colorized string
 		local what = _tabtexts[tabtitle]
 		local addon_index = what.LOD
 		local loaded_at = what.loaded_at
@@ -174,7 +175,7 @@
 			end
 			next_insertion_position = real_nip
 			dirty_tabs = true
-			addon:BuildMainDisplay()
+			return addon:OpenMainDisplayToTab(tabtitle) or addon:BuildMainDisplay()
 		end
 		addon.display:Hide()
 		if what.LOD_enabled then
@@ -206,8 +207,8 @@
 	-- routine handle it like any other plugin.
 	function addon:_gui_add_LOD_tab (tabtitle, folder, addon_index, enabled_p, why_not)
 		_tabtexts[tabtitle] = {
-			title = tabtitle,
-			desc = ("'%s' is not loaded yet.  Click the tab to load it now."):format(folder),
+			title = ("|cffff0000(%s)|r"):format(tabtitle),
+			desc = ("'|cffff0000%s|r' is not loaded yet.  Click the tab to load it now."):format(folder),
 			LOD = addon_index,
 			LOD_enabled = enabled_p,
 			LOD_why_not = why_not,