--
-- ion/mod_menu/mod_menu.lua -- Menu opening helper routines.
--
--- Copyright (c) Tuomo Valkonen 2004-2006.
+-- Copyright (c) Tuomo Valkonen 2004-2007.
--
-- Ion is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License as published by
local function menu_(reg, sub, menu_or_name, fn, check)
if check then
-- Check that no other menus are open in reg.
- local l=reg:managed_list()
- for i, r in pairs(l) do
- if obj_is(r, "WMenu") then
- return
- end
+ local ok=reg:managed_i(function(r)
+ return not obj_is(r, "WMenu")
+ end)
+ if not ok then
+ return
end
end