diff modules/ReAction_ConfigUI/ReAction_ConfigUI.lua @ 76:c8c8610fd864

Bar menu now opens directly to bar config page (thanks for the AceConfigDialog update, nevcairiel!)
author Flick <flickerstreak@gmail.com>
date Thu, 19 Jun 2008 17:48:57 +0000
parents 768be7eb22a0
children da8ba8783924
line wrap: on
line diff
--- a/modules/ReAction_ConfigUI/ReAction_ConfigUI.lua	Mon Jun 16 18:46:08 2008 +0000
+++ b/modules/ReAction_ConfigUI/ReAction_ConfigUI.lua	Thu Jun 19 17:48:57 2008 +0000
@@ -138,9 +138,11 @@
   AceConfigDialog:SetDefaultSize(editorName, 700, 540)
   
 
+  local name = ("ReAction - %s"):format(L["Bar Editor"])
+  editor:SetTitle(name)
   local options = {
     type = "group",
-    name = ("ReAction - %s"):format(L["Bar Editor"]),
+    name = name,
     handler = editor,
     childGroups = "tree",
     args = {
@@ -280,7 +282,10 @@
   }
   AceConfigReg:RegisterOptionsTable(editorName, options)
 
-  function editor:Open()
+  function editor:Open(bar)
+    if bar then
+      AceConfigDialog:SelectGroup(editorName, barOptMap[bar:GetName()])
+    end
     AceConfigDialog:Open(editorName,self)
   end
 
@@ -485,8 +490,7 @@
     if not self.editor then
       self.editor = NewEditor()
     end
-    -- TODO: figure out how to open to a particular bar: currently AceConfigDialogue doesn't support this
-    self.editor:Open()
+    self.editor:Open(bar)
     ReAction:SetConfigMode(true)
   end
 end