]> code.delx.au - refind/commitdiff
A few tweaks to make it a 0.3.3 release
authorsrs5694 <srs5694@users.sourceforge.net>
Mon, 7 May 2012 02:55:37 +0000 (22:55 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Mon, 7 May 2012 02:55:37 +0000 (22:55 -0400)
15 files changed:
NEWS.txt
docs/refind/bootmode.html
docs/refind/configfile.html
docs/refind/drivers.html
docs/refind/features.html
docs/refind/getting.html
docs/refind/index.html
docs/refind/installing.html
docs/refind/linux.html
docs/refind/revisions.html
docs/refind/themes.html
docs/refind/todo.html
docs/refind/using.html
refind/main.c
refind/menu.c

index 4a91f8cb9942deca55ff022fc69c164cbf1153f6..a8fed26603c1ffe8452ec0a68d35d823839e6491 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,4 +1,4 @@
-0.3.3 (?/?/2012):
+0.3.3 (5/6/2012):
 -----------------
 
 - Improved menu navigation:
@@ -9,9 +9,9 @@
     the edge of the row. In text mode, the "rows" are broken down as in
     graphics mode, but they aren't visibly distinguished on the screen.
 
-- Improved text-mode use: Now displays the proper number of entries when
-  first started and scrolling is done sensibly when too many entries exist
-  to fit on the screen.
+- Improved text-mode use: rEFInd now displays the proper number of entries
+  when first started in text mode and scrolling is done sensibly when too
+  many entries exist to fit on the screen.
 
 0.3.2 (5/4/2012):
 -----------------
index b2acedb8d5621b4b933e61735ada7877dc5d92a2..165d0c3a04216d1960d9fd5e1713a6a1fd97b7fd 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>\r
 \r
 <p>Originally written: 3/14/2012; last Web page update:\r
-5/4/2012, referencing rEFInd 0.3.2</p>\r
+5/6/2012, referencing rEFInd 0.3.3</p>\r
 \r
 \r
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>\r
index 56c3813f57b50308989a1d529982ffbacf8253ac..3e145bb93ca0d7aadbb79cd634a81012147fe30e 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2</p>
+5/6/2012, referencing rEFInd 0.3.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index 0e2504446c5f06831b1f8813018e883c5500a450..22a8fe0c45c1bef3a5414dbdfe5eaa6e732bf6a3 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 4/19/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2</p>
+5/6/2012, referencing rEFInd 0.3.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index 9c4552238f97f4d7c0cdfa1ff2b8bf700ad00c57..e47ae1db80f6d58e3d634ab4551bcd3c121ba5c6 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2</p>
+5/6/2012, referencing rEFInd 0.3.3</p>
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
 
index 991458853cd1ba8e01eb8abeee04e5c2a128ee56..2dc86fb41f438ea5f286c5b2534444f28cf4b892 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2</p>
+5/6/2012, referencing rEFInd 0.3.3</p>
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
 
@@ -97,7 +97,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
-<li><b><a href="http://sourceforge.net/projects/refind/files/0.3.2/refind-src-0.3.2.zip/download">A
+<li><b><a href="http://sourceforge.net/projects/refind/files/0.3.3/refind-src-0.3.3.zip/download">A
     source code zip file</a></b>&mdash;This is useful if you want to
     compile the software locally. Note that I use Linux with the <a
     href="http://sourceforge.net/projects/gnu-efi">GNU-EFI</a> development
@@ -106,7 +106,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     it.</li>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.3.2/refind-bin-0.3.2.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.3.3/refind-bin-0.3.3.zip/download">A
     binary zip file</a></b>&mdash;Download this if you want to install
     rEFInd on an <i>x</i>86 or <i>x</i>86-64 computer and have no need to
     test rEFInd first by booting it on an optical disc. This zip file
@@ -116,7 +116,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     href="installing.html">Installing rEFInd</a> page.</li>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.3.2/refind-cd-0.3.2.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.3.3/refind-cd-0.3.3.zip/download">A
     CD-R image file</a></b>&mdash;This download contains the same files as
     the zip file, but you can burn it to a CD-R to test rEFInd without
     installing it first. (It boots on UEFI PCs, but fails on some older
index 5fc4abd4d5114fe5bf0cb2150066b3b5a1b502b0..a00829078e32e30a53467086c00480c92313e778 100644 (file)
@@ -14,7 +14,8 @@
   <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-  <p>Originally written: 3/14/2012; last Web page update: 5/4/2012, referencing rEFInd 0.3.2</p>
+<p>Originally written: 3/14/2012; last Web page update:
+5/6/2012, referencing rEFInd 0.3.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index b6bce26f63af8a81f5cba5962f8cdb3c5858c470..ab9c120006dc6578683724fbd48a6c5a9f7ab884 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2</p>
+5/6/2012, referencing rEFInd 0.3.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index fec78d46979035e8babcc4eb0c8321293410ee72..e6dbcbf1ee164a50281f9c0bd46db41c38d4f2b9 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/19/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2</p>
+5/6/2012, referencing rEFInd 0.3.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index 3b514486e7c629667a2e0155845d8450dc1fa409..1ea8d935a3ff32fbd201fe9f0d6f90f9e6622380 100644 (file)
@@ -14,7 +14,7 @@
 <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-<p>Last Web page update: 5/4/2012</p>
+<p>Last Web page update: 5/6/2012</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
@@ -93,6 +93,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
+<li><b>0.3.3 (5/6/2012)</b>&mdash;I've focused on user interface improvements for this release. The biggest improvement is in the text-mode interface, which suffered from assorted display glitches in previous releases. These have now been fixed, so the text-mode interface should be more usable. I've also fine-tuned the use of keyboard keys, particularly in graphical mode. The up and down arrow keys now move between the two rows of the display, and Page Up and Page Down scroll the first row if it's too big for the display. (They'll also move between rows, but only when at the end of the first row or the start of the second.) Returning from a failed loader or a tool or built-in function now renders that tag as the currently-selected item, rather than setting the default loader as active, as happened with previous versions.</li>
+
 <li><b>0.3.2 (5/4/2012)</b>&mdash;rEFInd's core functionality changes very little with this version; I've tweaked the detection of BIOS-mode boot loaders to keep unbootable FAT partitions created under Linux and Windows out of the boot list, while adding detection of GRUB BIOS Boot Partitions to the list. I've also made a change that improves screen-clearing when launching EFI utilities and OSes in text mode. The major change to this version is the addition of a new Linux/OS X installation script, <tt>install.sh</tt>. In most cases, this makes it possible to install rEFInd simply by typing <tt class="userinput">./install.sh</tt> from the rEFInd package directory; however, you should see the <a href="installing.html">Installing rEFInd</a> page for details. In some cases, manual installation may still be required. Also, you may prefer to copy over the old rEFInd program file with the new one when upgrading.</li>
 
 <li><b>0.3.1 (4/27/2012)</b>&mdash;You'll find a few minor enhancements and bug fixes in this version, none of which affect the configuration files. rEFInd now sorts its boot loader entries <i>within each directory</i> by date, with the newest items first. The intent is that you can specify a directory name as the <tt>default_selection</tt> and the most recent boot loader in that directory will become the default. This may obviate the need to adjust the default after adding a new Linux kernel with EFI stub loader support. I've also improved the handling of <tt>.icns</tt> files for Linux kernels that lack <tt>.efi</tt> extensions; loader-specific icons for these kernels should now take the name of the kernel plus <tt>.icns</tt>&mdash;for instance, <tt>vmlinuz-0.3.2.icns</tt> for <tt>vmlinuz-0.3.2</tt>. rEFInd also now hides all <tt>.icns</tt> files from the boot loader list. Finally, this version fixes a bug, introduced in version 0.3.0, that could cause spurious <tt>Unsupported while scanning the root directory</tt> errors under some conditions on Macs.</li>
index a39fec487332016ba6f46f3375d3e26c24309b8d..66c60dccb3e66012bf1b462472c8e51f4324e8d5 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 4/19/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2</p>
+5/6/2012, referencing rEFInd 0.3.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index fbf250c2633f5786f7a94be66583b9ddc743083f..b482f26eae73218d1da981efc364ba3eec0fb0ba 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2</p>
+5/6/2012, referencing rEFInd 0.3.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
@@ -187,11 +187,6 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     whole-disk encryption scheme that's new with OS X 10.7. Unfortunately,
     I lack the hardware to test this.</li>
 
-<li>The Page Up and Page Down keys work in a rather strange way&mdash;a
-    result of an admittedly quick fix on my part to a problem with a data
-    structure that makes implementation of scrolling harder than it ought
-    to be.</li>
-
 <li>The Shutdown option works correctly on Macs, but not on UEFI-based PCs.
     On such systems, Shutdown reboots the computer. This should be
     fixed.</li>
index 64836a387702fc34dbbfc92bfd5d6a1a96130233..1e0ccfc8c72a6b0848b69c9f609020b0de4f8f2b 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2</p>
+5/6/2012, referencing rEFInd 0.3.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
@@ -102,9 +102,9 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>If you don't press any key before the timeout (shown on the last line) expires, the default boot loader will launch. This is normally the first item in the menu, but you can adjust the default by editing the configuration file. (In this example, it's the SUSE loader, which is further identified by text above the timeout as <i>Linux 3.3.0-rc7 from ESP.</i>)</p>
 
-<p>This display is dominated by the central set of icons, which in this example includes icons for OS X, Windows, Ubuntu, a generic Linux installation (ELILO, in fact), SUSE, and an unkown boot loader. All but the last of these are on hard disks, but the unknown boot loader is on an optical disc, as revealed by the small icons (known as <i>badges</i>) in the lower-right corner of the OS icons.</p>
+<p>This display is dominated by the central set of OS <i>tags</i> (icons), which in this example includes icons for OS X, Windows, Ubuntu, a generic Linux installation (ELILO, in fact), SUSE, and an unkown boot loader. All but the last of these are on hard disks, but the unknown boot loader is on an optical disc, as revealed by the small icons (known as <i>badges</i>) in the lower-right corner of the OS icons.</p>
 
-<p>In this example, the SUSE tag is selected. You can move the selection left by pressing the left or down arrow key and right by pressing the right or up arrow key. If your system has many boot loaders, an arrow icon will appear to the right of the boot loader list, indicating that the boot loader list will scroll when you move off the right edge. If you do this, an arrow icon will appear to the left of the icon list, indicating that you can scroll back in a similar manner. Moving past the final selection or using the Page Down key moves the selection to the second row of small icons, which launch ancillary programs or perform special actions. In this figure, these five icons are present:</p>
+<p>In this example, the SUSE tag is selected. You can move the selection left by pressing the left arrow key and right by pressing the right arrow key. If your system has many boot loaders, an arrow icon will appear to the right of the boot loader list, indicating that the boot loader list will scroll when you move off the right edge. If you do this, an arrow icon will appear to the left of the icon list, indicating that you can scroll back in a similar manner. You can scroll the list by one line full of icons by using the Page Up or Page Down keys to move left and right, respectively. Moving past the final selection or using the down arrow key moves the selection to the second row of small icons, which launch ancillary programs or perform special actions. If you've moved the selection cursor to the second row, pressing the up arrow key or scrolling past the left edge of the second row moves the cursor to the top row. In this figure, these five icons are present:</p>
 
 <ul>
 
@@ -141,19 +141,35 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
    <th>Explanation</th>
 </tr>
 <tr>
-   <td><i>left arrow</i> or <i>up arrow</i></td>
+   <td><i>left arrow</i></td>
    <td>Moves the selection one icon to the left (or up the list in text mode)</td>
 </tr>
 <tr>
-   <td><i>right arrow</i> or <i>down arrow</i></td>
+   <td><i>right arrow</i></td>
    <td>Moves the selection one icon to the right (or down the list in text mode)</td>
 </tr>
 <tr>
-   <td><i>Page Up</i> or <i>Home</i></td>
+   <td><i>up arrow</i></td>
+   <td>Moves the selection from the utilities row to the OS row (in text mode, moves up one entry)</td>
+</tr>
+<tr>
+   <td><i>down arrow</i></td>
+   <td>Moves the selection from the OS row to the utilities row (in text mode, moves down one entry)</td>
+</tr>
+<tr>
+   <td><i>Page Up</i></td>
+   <td>Scrolls the visible set of tags to the left (or up in text mode)</td>
+</tr>
+<tr>
+   <td><i>Page Down</i></td>
+   <td>Scrolls the visible set of tags to the right (or down in text mode)</td>
+</tr>
+<tr>
+   <td><i>Home</i></td>
    <td>Moves the selection to the first item on the OS row</td>
 </tr>
 <tr>
-   <td><i>Page Down</i> or <i>End</i></td>
+   <td><i>End</i></td>
    <td>Moves the selection to the last item on the utilities row</td>
 </tr>
 <tr>
@@ -172,30 +188,38 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
    <td><i>Enter</i> or <i>spacebar</i></td>
    <td>Launches the currently-selected OS, utility, or built-in feature</td>
 </tr>
-<tr>
-   <td><i>0</i></td>
-   <td>Launches the Linux rescue entry</td>
-</tr>
 <tr>
    <td><i>1</i> through <i>9</i></td>
    <td>Launches the specified boot loader by number</td>
 </tr>
+<tr>
+   <td><i>A</i></td>
+   <td>Displays the "About rEFInd" information</td>
+</tr>
 <tr>
    <td><i>E</i></td>
-   <td>Launches the EFI shell</td>
+   <td>Launches the first instance of ELILO in the boot list</td>
+</tr>
+<tr>
+   <td><i>G</i></td>
+   <td>Launches the first instance of GRUB in the boot list</td>
 </tr>
 <tr>
    <td><i>L</i></td>
-   <td>Launches the first Linux ELILO boot loader</td>
+   <td>Launches the first Linux kernel in the boot list</td>
 </tr>
 <tr>
    <td><i>M</i></td>
-   <td>Launches the first Mac OS boot loader</td>
+   <td>Launches the first Mac OS boot loader in the boot list</td>
 </tr>
 <tr>
    <td><i>P</i></td>
    <td>Launches <tt>gptsync</tt></td>
 </tr>
+<tr>
+   <td><i>S</i></td>
+   <td>Launches an EFI shell, if available</td>
+</tr>
 <tr>
    <td><i>U</i></td>
    <td>Shuts down the computer (but note that this is buggy and reboots most UEFI-based PCs)</td>
@@ -210,7 +234,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 </tr>
 </table>
 
-<p>rEFInd assigns shortcut letters to most OS entries based on the first letter of the directory in which the OS's boot loader is stored. For instance, if you have a boot loader called <tt>/EFI/debian/elilo.efi</tt>, rEFInd attempts to assign it a shortcut letter of <i>D</i>. rEFInd overrides this default for Mac OS X, Windows, and for Linux ELILO boot loaders if the distribution can't be more precisely identified, as noted in the preceding table. This method works well for many installations, but it can produce conflicts. For instance, if you have a Macintosh that holds both Mac OS X and Mandriva, both OSes would normally use the <tt>M</tt> shortcut key. In practice, which works depends on the order in which rEFInd detects the OSes.</p>
+<p>rEFInd assigns shortcut letters to most OS entries based on the first letter of the directory in which the OS's boot loader is stored. For instance, if you have a boot loader called <tt>/EFI/debian/elilo.efi</tt>, rEFInd attempts to assign it a shortcut letter of <i>D</i>. rEFInd overrides this default for Mac OS X, Windows, and for Linux's GRUB, ELILO, and EFI stub boot loaders if the distribution can't be more precisely identified, as noted in the preceding table. This method works well for many installations, but it can produce conflicts. For instance, if you have a Macintosh that holds both Mac OS X and Mandriva, both OSes would normally use the <tt>M</tt> shortcut key. In practice, which works depends on the order in which rEFInd detects the OSes.</p>
 
 <hr />
 
index 3fd7df7fcb9e2ebd9f6b1455fb97067351b5ea79..b53190589ecfb495d7b9b3afb7dfcd03d2255ed6 100644 (file)
@@ -104,7 +104,7 @@ static VOID AboutrEFInd(VOID)
 {
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.3.2.2");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.3.3");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
@@ -604,6 +604,9 @@ VOID SetLoaderDefaults(LOADER_ENTRY *Entry, CHAR16 *LoaderPath, IN REFIT_VOLUME
       Entry->OSType = 'E';
       if (ShortcutLetter == 0)
          ShortcutLetter = 'L';
+   } else if (StriSubCmp(L"grub", FileName)) {
+      Entry->OSType = 'G';
+      ShortcutLetter = 'G';
    } else if (StriCmp(FileName, L"cdboot.efi") == 0 ||
               StriCmp(FileName, L"bootmgr.efi") == 0 ||
               StriCmp(FileName, L"Bootmgfw.efi") == 0) {
@@ -635,7 +638,6 @@ LOADER_ENTRY * AddLoaderEntry(IN CHAR16 *LoaderPath, IN CHAR16 *LoaderTitle, IN
    Entry = InitializeLoaderEntry(NULL);
    if (Entry != NULL) {
       Entry->Title = StrDuplicate((LoaderTitle != NULL) ? LoaderTitle : LoaderPath);
-//      Entry->Title = StrDuplicate(LoaderTitle);
       Entry->me.Title = PoolPrint(L"Boot %s from %s", (LoaderTitle != NULL) ? LoaderTitle : LoaderPath, Volume->VolName);
       Entry->me.Row = 0;
       Entry->me.BadgeImage = Volume->VolBadgeImage;
@@ -1407,7 +1409,7 @@ static VOID ScanForTools(VOID) {
             j = 0;
             while ((FileName = FindCommaDelimited(SHELL_NAMES, j++)) != NULL) {
                if (FileExists(SelfRootDir, FileName)) {
-                  AddToolEntry(FileName, L"EFI Shell", BuiltinIcon(BUILTIN_ICON_TOOL_SHELL), 'E', FALSE);
+                  AddToolEntry(FileName, L"EFI Shell", BuiltinIcon(BUILTIN_ICON_TOOL_SHELL), 'S', FALSE);
                }
             } // while
             break;
@@ -1437,6 +1439,7 @@ efi_main (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
     BOOLEAN MainLoopRunning = TRUE;
     REFIT_MENU_ENTRY *ChosenEntry;
     UINTN MenuExit;
+    CHAR16 *Selection;
 
     // bootstrap
     InitializeLib(ImageHandle, SystemTable);
@@ -1459,8 +1462,9 @@ efi_main (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
     ScanForBootloaders();
     ScanForTools();
 
+    Selection = StrDuplicate(GlobalConfig.DefaultSelection);
     while (MainLoopRunning) {
-        MenuExit = RunMainMenu(&MainMenu, GlobalConfig.DefaultSelection, &ChosenEntry);
+        MenuExit = RunMainMenu(&MainMenu, Selection, &ChosenEntry);
 
         // We don't allow exiting the main menu with the Escape key.
         if (MenuExit == MENU_EXIT_ESCAPE) {
@@ -1508,8 +1512,10 @@ efi_main (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
                 return EFI_SUCCESS;
                 break;
 
-        }
-    }
+        } // switch()
+        FreePool(Selection);
+        Selection = StrDuplicate(ChosenEntry->Title);
+    } // while()
 
     // If we end up here, things have gone wrong. Try to reboot, and if that
     // fails, go into an endless loop.
index 3ff16b1804cefb1c5a25a9c234bab7a73ab3ffc2..2b63d05a719e8a55ea16c7004c5c649fb4b04fa3 100644 (file)
@@ -754,16 +754,12 @@ static VOID PaintAll(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN
       AdjustScrollState(State);
    for (i = State->FirstVisible; i <= State->MaxIndex; i++) {
       if (Screen->Entries[i]->Row == 0) {
-         State->FinalRow0 = i;
          if (i <= State->LastVisible) {
             DrawMainMenuEntry(Screen->Entries[i], (i == State->CurrentSelection) ? TRUE : FALSE,
                               itemPosX[i - State->FirstVisible], row0PosY);
          } // if
       } else {
-         if (State->InitialRow1 > i)
-            State->InitialRow1 = i;
-         DrawMainMenuEntry(Screen->Entries[i], (i == State->CurrentSelection) ? TRUE : FALSE,
-                           itemPosX[i], row1PosY);
+         DrawMainMenuEntry(Screen->Entries[i], (i == State->CurrentSelection) ? TRUE : FALSE, itemPosX[i], row1PosY);
       }
    }
    if (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_LABEL))
@@ -774,10 +770,17 @@ static VOID PaintAll(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN
 // Move the selection to State->CurrentSelection, adjusting icon row if necessary...
 static VOID PaintSelection(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN *itemPosX,
                            UINTN row0PosY, UINTN row1PosY, UINTN textPosY) {
+   UINTN XSelect, YPos;
+
    if ((State->CurrentSelection < State->LastVisible) && (State->CurrentSelection >= State->FirstVisible)) {
-      DrawMainMenuEntry(Screen->Entries[State->PreviousSelection], FALSE,
-                        itemPosX[State->PreviousSelection - State->FirstVisible],
-                        (Screen->Entries[State->PreviousSelection]->Row == 0) ? row0PosY : row1PosY);
+      if (Screen->Entries[State->PreviousSelection]->Row == 0) {
+         XSelect = State->PreviousSelection - State->FirstVisible;
+         YPos = row0PosY;
+      } else {
+         XSelect = State->PreviousSelection;
+         YPos = row1PosY;
+      } // if/else
+      DrawMainMenuEntry(Screen->Entries[State->PreviousSelection], FALSE, itemPosX[XSelect], YPos);
       DrawMainMenuEntry(Screen->Entries[State->CurrentSelection], TRUE,
                         itemPosX[State->CurrentSelection - State->FirstVisible],
                         (Screen->Entries[State->CurrentSelection]->Row == 0) ? row0PosY : row1PosY);