]> code.delx.au - refind/commitdiff
Added new "badge" option for the "hideui" configuration file token.
authorsrs5694 <srs5694@users.sourceforge.net>
Tue, 3 Feb 2015 02:18:07 +0000 (21:18 -0500)
committersrs5694 <srs5694@users.sourceforge.net>
Tue, 3 Feb 2015 02:18:07 +0000 (21:18 -0500)
This option removes the device-type badge from the boot menu icons.

docs/refind/getting.html
refind.conf-sample
refind/config.c
refind/config.h
refind/lib.c
refind/main.c

index ba882da993acbf911474691cf13db37f782e305f..4352412f20bae3deec008b62203c9de174ff64fb 100644 (file)
@@ -284,6 +284,11 @@ computer.</p>
     href="http://packages.altlinux.org/en/Sisyphus/srpms/refind">this
     page</a> for details.</li>
 
+<li><b>Slackware</b>&mdash;As far as I know, an official rEFInd package is
+    not available as part of Slackware; however, a <a
+    href="http://slackbuilds.org/repository/14.1/system/refind/?search=refind">Slackware
+    package from SlackBuilds</a> is available.</li>
+
 <li><b><a href="http://distro.ibiblio.org/fatdog/web/">Fat
     Dog</a></b>&mdash;This variant of Puppy Linux uses a combination of
     rEFInd and GRUB 2 to boot its installation medium in EFI mode and
index 193a75d05360afaa5597182861254914a8afe68b..92b15cb3c5d518c72634ae0fa8c7b6910b9e34f0 100644 (file)
@@ -221,7 +221,7 @@ timeout 20
 # modification of NVRAM variables on each boot. Adding "0", "off", or
 # "false" resets to the default value. This token has no effect on Macs or
 # when no BIOS-mode options are set via scanfor.
-# Default is unset (or "uefi_deep_legacy_scan true")
+# Default is unset (or "uefi_deep_legacy_scan false")
 #
 #uefi_deep_legacy_scan
 
index 1d3e927c1a65da6455dc68d2c08d2893b4178f0b..f534841c3e7e88cdc2e20ad7f3fdc96592667ee4 100644 (file)
@@ -514,6 +514,8 @@ VOID ReadConfig(CHAR16 *FileName)
                    GlobalConfig.HideUIFlags |= HIDEUI_FLAG_EDITOR;
                 } else if (StriCmp(FlagName, L"safemode") == 0) {
                    GlobalConfig.HideUIFlags |= HIDEUI_FLAG_SAFEMODE;
+                } else if (StriCmp(FlagName, L"badges") == 0) {
+                   GlobalConfig.HideUIFlags |= HIDEUI_FLAG_BADGES;
                 } else if (StriCmp(FlagName, L"all") == 0) {
                    GlobalConfig.HideUIFlags = HIDEUI_FLAG_ALL;
                 } else {
index 1aedd5d0fa13f1405813c3953772b1565bd20882..2e39f50d434b272a4bcec08ce3d83093819be403 100644 (file)
@@ -77,6 +77,7 @@ typedef struct {
 #define HIDEUI_FLAG_HINTS      (0x0020)
 #define HIDEUI_FLAG_EDITOR     (0x0040)
 #define HIDEUI_FLAG_SAFEMODE   (0x0080)
+#define HIDEUI_FLAG_BADGES     (0x0100)
 #define HIDEUI_FLAG_ALL       ((0xffff))
 
 #define CONFIG_FILE_NAME         L"refind.conf"
index d3347c787a7ed17068c4f1a7034b591e004cf2e7..50e7cc6a41dd099da78faf260fabd9595899e587 100644 (file)
@@ -49,6 +49,7 @@
 #include "../include/refit_call_wrapper.h"
 #include "../include/RemovableMedia.h"
 #include "gpt.h"
+#include "config.h"
 
 #ifdef __MAKEWITH_GNUEFI
 #define EfiReallocatePool ReallocatePool
@@ -698,6 +699,9 @@ static VOID ScanVolumeBootcode(REFIT_VOLUME *Volume, BOOLEAN *Bootable)
 // Set default volume badge icon based on /.VolumeBadge.{icns|png} file or disk kind
 VOID SetVolumeBadgeIcon(REFIT_VOLUME *Volume)
 {
+   if (GlobalConfig.HideUIFlags & HIDEUI_FLAG_BADGES)
+      return;
+
    if (Volume->VolBadgeImage == NULL) {
       Volume->VolBadgeImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeBadge", GlobalConfig.IconSizes[ICON_SIZE_BADGE]);
    }
@@ -933,32 +937,32 @@ VOID ScanVolume(REFIT_VOLUME *Volume)
         DevicePath = NextDevicePath;
     } // while
 
-    if (!Bootable) {
+   if (!Bootable) {
 #if REFIT_DEBUG > 0
-        if (Volume->HasBootCode)
-            Print(L"  Volume considered non-bootable, but boot code is present\n");
+      if (Volume->HasBootCode)
+         Print(L"  Volume considered non-bootable, but boot code is present\n");
 #endif
-        Volume->HasBootCode = FALSE;
-    }
+      Volume->HasBootCode = FALSE;
+   }
 
-    // open the root directory of the volume
-    Volume->RootDir = LibOpenRoot(Volume->DeviceHandle);
+   // open the root directory of the volume
+   Volume->RootDir = LibOpenRoot(Volume->DeviceHandle);
 
-    // Set volume icon based on .VolumeBadge icon or disk kind
-    SetVolumeBadgeIcon(Volume);
+   // Set volume icon based on .VolumeBadge icon or disk kind
+   SetVolumeBadgeIcon(Volume);
 
-    Volume->VolName = GetVolumeName(Volume);
+   Volume->VolName = GetVolumeName(Volume);
 
-    if (Volume->RootDir == NULL) {
-        Volume->IsReadable = FALSE;
-        return;
-    } else {
-        Volume->IsReadable = TRUE;
-    }
+   if (Volume->RootDir == NULL) {
+      Volume->IsReadable = FALSE;
+      return;
+   } else {
+      Volume->IsReadable = TRUE;
+   }
 
-    // get custom volume icons if present
-    if (!Volume->VolIconImage)
-       Volume->VolIconImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeIcon", GlobalConfig.IconSizes[ICON_SIZE_BIG]);
+   // get custom volume icons if present
+   if (!Volume->VolIconImage)
+     Volume->VolIconImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeIcon", GlobalConfig.IconSizes[ICON_SIZE_BIG]);
 } // ScanVolume()
 
 static VOID ScanExtendedPartition(REFIT_VOLUME *WholeDiskVolume, MBR_PARTITION_INFO *MbrEntry)
index 267bf2de6e6f4e265a9c19017fe11fcefab0bad5..f78020be7f494340c2cbacd6a88af00744941876 100644 (file)
@@ -176,10 +176,10 @@ static VOID AboutrEFInd(VOID)
 
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.8.5.1");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.8.5.2");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
-        AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2014 Roderick W. Smith");
+        AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2015 Roderick W. Smith");
         AddMenuInfoLine(&AboutMenu, L"Portions Copyright (c) Intel Corporation and others");
         AddMenuInfoLine(&AboutMenu, L"Distributed under the terms of the GNU GPLv3 license");
         AddMenuInfoLine(&AboutMenu, L"");