From 1471a96937de8b538de11271e2e991b6c56bc23c Mon Sep 17 00:00:00 2001 From: Parnic Date: Sun, 10 Oct 2010 01:05:09 +0000 Subject: [PATCH] - fixed /icehudcl to actually work again as a command-line interface to the options table (surprised this wasn't reported) - made the OpenConfig method able to close the dialog if it's already open. this restores old behavior that was lost in the move to ace3 --- IceHUD.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/IceHUD.lua b/IceHUD.lua index f64a678..ef32a1e 100644 --- a/IceHUD.lua +++ b/IceHUD.lua @@ -873,7 +873,7 @@ function IceHUD:OnInitialize() self:SetupProfileImportButtons() --@end-debug@ - LibStub("AceConfig-3.0"):RegisterOptionsTable("IceHUD", self.options, "/icehudcl") + LibStub("AceConfig-3.0"):RegisterOptionsTable("IceHUD", self.options, "icehudcl") ConfigDialog:SetDefaultSize("IceHUD", 750, 650) self:RegisterChatCommand("icehud", function() @@ -1076,7 +1076,11 @@ InterfaceOptions_AddCategory(blizOptionsPanel) function IceHUD:OpenConfig() if not ConfigDialog then return end - ConfigDialog:Open("IceHUD") + if ConfigDialog.OpenFrames["IceHUD"] ~= nil then + ConfigDialog:Close("IceHUD") + else + ConfigDialog:Open("IceHUD") + end end function IceHUD:Debug(msg)