diff options
author | est31 <MTest31@outlook.com> | 2015-09-21 20:03:35 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-09-21 20:05:17 +0200 |
commit | 1adc7bf5c60830cc8dcbab34c682f7fddde55558 (patch) | |
tree | 91f8e24283ba310c3cb14e28f76a28dbf67b8acc /builtin/fstk/tabview.lua | |
parent | d130c36e140f949bd2385a8398018f49e1b9032a (diff) | |
download | minetest-1adc7bf5c60830cc8dcbab34c682f7fddde55558.tar.gz minetest-1adc7bf5c60830cc8dcbab34c682f7fddde55558.tar.bz2 minetest-1adc7bf5c60830cc8dcbab34c682f7fddde55558.zip |
Replace "self program" with "this program" in fstk boilerplates
... and remove trailing whitespace.
Diffstat (limited to 'builtin/fstk/tabview.lua')
-rw-r--r-- | builtin/fstk/tabview.lua | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/builtin/fstk/tabview.lua b/builtin/fstk/tabview.lua index 47603fb1b..c65f6dd7f 100644 --- a/builtin/fstk/tabview.lua +++ b/builtin/fstk/tabview.lua @@ -1,18 +1,18 @@ --Minetest --Copyright (C) 2014 sapier -- ---self program is free software; you can redistribute it and/or modify +--This program is free software; you can redistribute it and/or modify --it under the terms of the GNU Lesser General Public License as published by --the Free Software Foundation; either version 2.1 of the License, or --(at your option) any later version. -- ---self program is distributed in the hope that it will be useful, +--This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --GNU Lesser General Public License for more details. -- --You should have received a copy of the GNU Lesser General Public License along ---with self program; if not, write to the Free Software Foundation, Inc., +--with this program; if not, write to the Free Software Foundation, Inc., --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -61,7 +61,7 @@ local function get_formspec(self) local formspec = "" if not self.hidden and (self.parent == nil or not self.parent.hidden) then - + if self.parent == nil then local tsize = self.tablist[self.last_tab_index].tabsize or {width=self.width, height=self.height} @@ -87,11 +87,11 @@ local function handle_buttons(self,fields) if self.hidden then return false end - + if self:handle_tab_buttons(fields) then return true end - + if self.glb_btn_handler ~= nil and self.glb_btn_handler(self,fields) then return true @@ -112,16 +112,16 @@ end -------------------------------------------------------------------------------- local function handle_events(self,event) - + if self.hidden then return false end - + if self.glb_evt_handler ~= nil and self.glb_evt_handler(self,event) then return true end - + if self.tablist[self.last_tab_index].evt_handler ~= nil then return self.tablist[self.last_tab_index].evt_handler( @@ -131,7 +131,7 @@ local function handle_events(self,event) self.tablist[self.last_tab_index].tabdata ) end - + return false end @@ -160,16 +160,16 @@ local function switch_to_tab(self, index) self.tablist[self.last_tab_index].on_change("LEAVE", self.current_tab, self.tablist[index].name) end - + --update tabview data self.last_tab_index = index local old_tab = self.current_tab self.current_tab = self.tablist[index].name - + if (self.autosave_tab) then core.setting_set(self.name .. "_LAST",self.current_tab) end - + -- call for tab to enter if self.tablist[index].on_change ~= nil then self.tablist[index].on_change("ENTER", @@ -197,14 +197,14 @@ local function set_tab_by_name(self, name) return true end end - + return false end -------------------------------------------------------------------------------- local function hide_tabview(self) self.hidden=true - + --call on_change as we're not gonna show self tab any longer if self.tablist[self.last_tab_index].on_change ~= nil then self.tablist[self.last_tab_index].on_change("LEAVE", @@ -215,7 +215,7 @@ end -------------------------------------------------------------------------------- local function show_tabview(self) self.hidden=false - + -- call for tab to enter if self.tablist[self.last_tab_index].on_change ~= nil then self.tablist[self.last_tab_index].on_change("ENTER", @@ -265,7 +265,7 @@ function tabview_create(name, size, tabheaderpos) self.current_tab = nil self.last_tab_index = 1 self.tablist = {} - + self.autosave_tab = false ui.add(self) |