]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/ioncore_menudb.lua
Imported Upstream version 20090110
[ion3.git] / ioncore / ioncore_menudb.lua
index 17b0c4af51e0b9274cef431eb05f273cbf04e78a..1d8100b7c3b9635f92fc522295f75eb2e752f15a 100644 (file)
@@ -1,7 +1,7 @@
 --
 -- ion/ioncore/ioncore_menudb.lua -- Routines for defining menus.
 -- 
--- Copyright (c) Tuomo Valkonen 2004-2008.
+-- Copyright (c) Tuomo Valkonen 2004-2009.
 --
 -- See the included file LICENSE for details.
 --
@@ -45,11 +45,12 @@ end
 -- of menu entries.
 function ioncore.defctxmenu(ctx, ...)
     local tab, add
-    if #arg>1 and type(arg[1])=="string" then
-        tab=arg[2]
-        tab.label=ioncore.gettext(arg[1])
+    local a1, a2 = ...
+    if a2 and type(a1)=="string" then
+        tab=a2
+        tab.label=ioncore.gettext(a1)
     else
-        tab=arg[1]
+        tab=a1
     end
     ioncore.defmenu("ctxmenu-"..ctx, tab)
 end