All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use submenus for 10_linux
@ 2010-11-24 17:21 Colin Watson
  2010-11-25  2:54 ` Jordan Uggla
  0 siblings, 1 reply; 5+ messages in thread
From: Colin Watson @ 2010-11-24 17:21 UTC (permalink / raw)
  To: grub-devel

What do people think of this?  It's a remarkably small change now that
Vladimir's implemented submenus, and I've had a number of requests for
it.

I wonder if it would be worth having some visual indication that a menu
entry is a submenu; but that probably ought to be done centrally.

I don't know whether this is 1.99 material or not, and would appreciate
comments.

2010-11-24  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub.d/10_linux.in: Put second and subsequent menu entries in
	a submenu.

=== modified file 'util/grub.d/10_linux.in'
--- util/grub.d/10_linux.in	2010-11-01 11:49:40 +0000
+++ util/grub.d/10_linux.in	2010-11-24 17:15:27 +0000
@@ -114,6 +114,7 @@ list=`for i in /boot/vmlinuz-* /boot/vml
       done`
 prepare_boot_cache=
 
+in_submenu=false
 while [ "x$list" != "x" ] ; do
   linux=`version_find_latest $list`
   echo "Found linux image: $linux" >&2
@@ -159,4 +160,13 @@ while [ "x$list" != "x" ] ; do
   fi
 
   list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
+
+  if [ "$list" ] && ! $in_submenu; then
+    echo "submenu \"Previous Linux versions\" {"
+    in_submenu=:
+  fi
 done
+
+if $in_submenu; then
+  echo "}"
+fi

-- 
Colin Watson                                       [cjwatson@ubuntu.com]


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-05  8:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-24 17:21 [PATCH] Use submenus for 10_linux Colin Watson
2010-11-25  2:54 ` Jordan Uggla
2010-11-30 13:36   ` Žika
2010-12-05  0:54     ` Colin Watson
2010-12-05  8:11       ` Jordan Uggla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.