Add /omen show and /omen hide slash commands.

This commit is contained in:
Xinhuan
2009-03-02 16:11:58 +08:00
parent 26eeb1d240
commit 3f0379ca14
2 changed files with 14 additions and 1 deletions
+1
View File
@@ -201,6 +201,7 @@ L["Toggle Omen"] = true
L["Center Omen"] = true
L["Configure"] = true
L["Open the configuration dialog"] = true
L["Show Omen"] = true
-- Config strings, warning settings section
L["Warning Settings"] = true
+13 -1
View File
@@ -706,7 +706,7 @@ end
-- For public use
function Omen:Toggle(setting)
-- Don't set the manualToggle flag is "Hide Omen on 0 bars" option is active
-- Don't set the manualToggle flag if "Hide Omen on 0 bars" option is active
if not (db.Autocollapse and db.CollapseHide) then
manualToggle = true
end
@@ -1911,6 +1911,18 @@ Omen.OptionsSlash = {
func = function() Omen:ShowConfig() end,
guiHidden = true,
},
show = {
type = "execute",
name = L["Show Omen"],
desc = L["Show Omen"].." ( /omen show )",
func = function() Omen:Toggle(true) end,
},
hide = {
type = "execute",
name = L["Hide Omen"],
desc = L["Hide Omen"].." ( /omen hide )",
func = function() Omen:Toggle(false) end,
},
},
}