Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Mar 2018 02:04:26 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330138 - head/stand/lua
Message-ID:  <201803010204.w2124QkO019689@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu Mar  1 02:04:26 2018
New Revision: 330138
URL: https://svnweb.freebsd.org/changeset/base/330138

Log:
  lualoader: Dedup these "Return to main menu" entries

Modified:
  head/stand/lua/menu.lua

Modified: head/stand/lua/menu.lua
==============================================================================
--- head/stand/lua/menu.lua	Thu Mar  1 01:49:36 2018	(r330137)
+++ head/stand/lua/menu.lua	Thu Mar  1 02:04:26 2018	(r330138)
@@ -39,6 +39,10 @@ local drawer = require("drawer")
 local menu = {}
 
 local drawn_menu
+local return_menu_entry = {
+	entry_type = core.MENU_RETURN,
+	name = "Back to main menu" .. color.highlight(" [Backspace]"),
+}
 
 local function OnOff(str, value)
 	if value then
@@ -97,12 +101,8 @@ menu.handlers = {
 menu.boot_environments = {
 	entries = {
 		-- return to welcome menu
+		return_menu_entry,
 		{
-			entry_type = core.MENU_RETURN,
-			name = "Back to main menu" ..
-			    color.highlight(" [Backspace]"),
-		},
-		{
 			entry_type = core.MENU_CAROUSEL_ENTRY,
 			carousel_id = "be_active",
 			items = core.bootenvList,
@@ -149,11 +149,7 @@ menu.boot_environments = {
 menu.boot_options = {
 	entries = {
 		-- return to welcome menu
-		{
-			entry_type = core.MENU_RETURN,
-			name = "Back to main menu" ..
-			    color.highlight(" [Backspace]"),
-		},
+		return_menu_entry,
 		-- load defaults
 		{
 			entry_type = core.MENU_ENTRY,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803010204.w2124QkO019689>