From owner-svn-src-head@freebsd.org Tue Feb 20 05:10:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A70FEF025EB; Tue, 20 Feb 2018 05:10:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C48F82719; Tue, 20 Feb 2018 05:10:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B49324D1E; Tue, 20 Feb 2018 05:10:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1K5ARCF083913; Tue, 20 Feb 2018 05:10:27 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1K5ARiY083912; Tue, 20 Feb 2018 05:10:27 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201802200510.w1K5ARiY083912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 20 Feb 2018 05:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329629 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 329629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Feb 2018 05:10:28 -0000 Author: kevans Date: Tue Feb 20 05:10:26 2018 New Revision: 329629 URL: https://svnweb.freebsd.org/changeset/base/329629 Log: stand/lua: Use 'graphic' instead of 'logo' for table depicting graphics This is a more sensible name that offers less redundancy when referring to it (vs. logodef.logo). Switch to it while the getting is good. Modified: head/stand/lua/drawer.lua Modified: head/stand/lua/drawer.lua ============================================================================== --- head/stand/lua/drawer.lua Tue Feb 20 05:07:21 2018 (r329628) +++ head/stand/lua/drawer.lua Tue Feb 20 05:10:26 2018 (r329629) @@ -182,36 +182,36 @@ drawer.branddefs = { drawer.logodefs = { -- Indexed by valid values for loader_logo in loader.conf(5). Valid keys - -- are: requires_color (boolean), logo (table depicting graphic), and + -- are: requires_color (boolean), graphic (table depicting graphic), and -- shift (table containing x and y). ["beastie"] = { requires_color = true, - logo = beastie_color, + graphic = beastie_color, }, ["beastiebw"] = { - logo = beastie, + graphic = beastie, }, ["fbsdbw"] = { - logo = fbsd_logo_v, + graphic = fbsd_logo_v, shift = {x = 5, y = 4}, }, ["orb"] = { requires_color = true, - logo = orb_color, + graphic = orb_color, shift = {x = 2, y = 4}, }, ["orbbw"] = { - logo = orb, + graphic = orb, shift = {x = 2, y = 4}, }, ["tribute"] = { - logo = fbsd_logo, + graphic = fbsd_logo, }, ["tributebw"] = { - logo = fbsd_logo, + graphic = fbsd_logo, }, ["none"] = { - logo = none, + graphic = none, shift = {x = 17, y = 0}, }, }; @@ -352,13 +352,13 @@ function drawer.drawlogo() -- Lookup local logodef = drawer.logodefs[logo]; - if (logodef ~= nil) and (logodef.logo == none) then + if (logodef ~= nil) and (logodef.graphic == none) then -- centre brand and text if no logo if (not none_shifted) then shift_brand_text(logodef.shift); none_shifted = true; end - elseif (logodef == nil) or (logodef.logo == nil) or + elseif (logodef == nil) or (logodef.graphic == nil) or ((not colored) and logodef.requires_color) then -- Choose a sensible default if (colored) then @@ -367,12 +367,11 @@ function drawer.drawlogo() logodef = drawer.logodefs["orbbw"]; end end - logo = logodef.logo; if (logodef.shift ~= nil) then x = x + logodef.shift.x; y = y + logodef.shift.y; end - drawer.draw(x, y, logo); + drawer.draw(x, y, logodef.graphic); end return drawer;