menu.lua (9a0904b0e07cdfaa21c35fe8f2a9571c518b1352) menu.lua (4b6da14cfa1ee9b815f80ca8077839f65bb6b3be)
1--
2-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
3-- Copyright (C) 2018 Kyle Evans <kevans@FreeBSD.org>
4-- All rights reserved.
5--
6-- Redistribution and use in source and binary forms, with or without
7-- modification, are permitted provided that the following conditions
8-- are met:

--- 132 unchanged lines hidden (view full) ---

141 -- We'll cache the swapped menu, for performance
142 if (menu.welcome.swapped_menu ~= nil) then
143 return menu.welcome.swapped_menu;
144 end
145 -- Shallow copy the table
146 menu_entries = core.shallowCopyTable(menu_entries);
147
148 -- Swap the first two menu entries
1--
2-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
3-- Copyright (C) 2018 Kyle Evans <kevans@FreeBSD.org>
4-- All rights reserved.
5--
6-- Redistribution and use in source and binary forms, with or without
7-- modification, are permitted provided that the following conditions
8-- are met:

--- 132 unchanged lines hidden (view full) ---

141 -- We'll cache the swapped menu, for performance
142 if (menu.welcome.swapped_menu ~= nil) then
143 return menu.welcome.swapped_menu;
144 end
145 -- Shallow copy the table
146 menu_entries = core.shallowCopyTable(menu_entries);
147
148 -- Swap the first two menu entries
149 menu_entries[1], menu_entries[2] = menu_entries[2],
150 menu_entries[1];
149 menu_entries[1], menu_entries[2] =
150 menu_entries[2], menu_entries[1];
151
152 -- Then set their names to their alternate names
153 menu_entries[1].name, menu_entries[2].name =
154 menu_entries[1].alternate_name,
155 menu_entries[2].alternate_name;
156 menu.welcome.swapped_menu = menu_entries;
157 end
158 return menu_entries;

--- 297 unchanged lines hidden ---
151
152 -- Then set their names to their alternate names
153 menu_entries[1].name, menu_entries[2].name =
154 menu_entries[1].alternate_name,
155 menu_entries[2].alternate_name;
156 menu.welcome.swapped_menu = menu_entries;
157 end
158 return menu_entries;

--- 297 unchanged lines hidden ---