]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/ioncore_menudb.lua
Add 20081002-1.
[ion3.git] / ioncore / ioncore_menudb.lua
index fdb0e422bf8bfddc90e7b381461a3fe51385a250..62cf04a7622ca95d81861f43c3c313d00487e17d 100644 (file)
@@ -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
@@ -260,7 +261,7 @@ local function receive_styles(str)
     local styles={}
     local stylemenu={}
     
-    for look in string.gfind(data, "(look[-_][^\n]*)%.lua\n") do
+    for look in string.gmatch(data, "(look[-_][^\n]*)%.lua\n") do
         if not found[look] then
             found[look]=true
             table.insert(styles, look)