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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to