Initial Haiku support (#6568)
[oweals/minetest.git] / builtin / fstk / tabview.lua
index c65f6dd7f985bf323b04df8d38f4e69d20672d4a..3715e231b96d2a7764ddbaee02d23a3cbd7a8096 100644 (file)
@@ -46,7 +46,7 @@ local function add_tab(self,tab)
                tabdata = {},
        }
 
-       table.insert(self.tablist,newtab)
+       self.tablist[#self.tablist + 1] = newtab
 
        if self.last_tab_index == #self.tablist then
                self.current_tab = tab.name
@@ -167,7 +167,7 @@ local function switch_to_tab(self, index)
        self.current_tab = self.tablist[index].name
 
        if (self.autosave_tab) then
-               core.setting_set(self.name .. "_LAST",self.current_tab)
+               core.settings:set(self.name .. "_LAST",self.current_tab)
        end
 
        -- call for tab to enter