Index: trunk/artwork/themes/default/device_hfsplus_tiger.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsplus_tiger.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_befs.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_befs.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/text_scroll_prev.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/text_scroll_prev.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsraid.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_hfsraid.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/logo.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/logo.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsplus_sl.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsplus_sl.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_hfsplus_lion_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsplus_lion_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_ext3.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_ext3.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsplus_leo.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsplus_leo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/boot.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/boot.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/menu_single_user.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_single_user.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_fat_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_fat_o.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_freebsd_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_freebsd_o.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsraid_tiger_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsraid_tiger_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_ntfs_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_ntfs_o.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_scroll_prev.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_scroll_prev.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_openbsd.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_openbsd.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsraid_sl_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsraid_sl_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_hfsraid_leo_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsraid_leo_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/menu_ignore_caches.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_ignore_caches.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/menu_verbose_disabled.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_verbose_disabled.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsplus_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_hfsplus_o.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsplus_lion.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsplus_lion.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/menu_boot.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_boot.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/font_console.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/font_console.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_ntfs.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_ntfs.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsraid_tiger.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsraid_tiger.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_freebsd.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_freebsd.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_fat.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_fat.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/menu_single_user_disabled.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_single_user_disabled.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsraid_sl.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsraid_sl.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_hfsraid_lion_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsraid_lion_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_hfsraid_leo.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsraid_leo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/font_small.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/font_small.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/text_scroll_next.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/text_scroll_next.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_cdrom_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_cdrom_o.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsplus.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_hfsplus.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_selection.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_selection.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/menu_ignore_caches_disabled.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_ignore_caches_disabled.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/menu_video_info.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_video_info.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/menu_memory_info.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_memory_info.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_generic_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_generic_o.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/menu_selection.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_selection.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/theme.plist =================================================================== --- trunk/artwork/themes/default/theme.plist (revision 1737) +++ trunk/artwork/themes/default/theme.plist (revision 1738) @@ -5,11 +5,9 @@ Author Blackosx Version - 1.0 - + 1.1 Enabled no - screen_width 1024 screen_height @@ -20,12 +18,10 @@ 10 screen_bgcolor #767f73 - background_pos_x 50% background_pos_y 0 - logo_pos_x logo_pos_y @@ -34,7 +30,6 @@ #000000 logo_transparency 255 - devices_pos_x devices_pos_y @@ -49,7 +44,6 @@ 45 devices_layout horizontal - bootprompt_pos_x bootprompt_pos_y @@ -66,7 +60,6 @@ #3e3e3e bootprompt_transparency 1 - infobox_pos_x infobox_pos_y @@ -83,7 +76,6 @@ #3e3e3e infobox_transparency 35 - menu_pos_x menu_pos_y @@ -96,7 +88,6 @@ #3e3e3e menu_transparency 1 - progressbar_pos_x progressbar_pos_y @@ -105,12 +96,10 @@ 100 progressbar_height 40 - countdown_pos_x countdown_pos_y -20% - boot_width 1024 boot_height Index: trunk/artwork/themes/default/device_hfsplus_tiger_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsplus_tiger_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_scroll_next.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_scroll_next.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_befs_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_befs_o.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/menu_help.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_help.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsraid_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_hfsraid_o.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsplus_sl_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsplus_sl_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/background.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/background.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/thumb.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/thumb.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_hfsraid_lion.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsraid_lion.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_hfsplus_leo_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: trunk/artwork/themes/default/device_hfsplus_leo_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: trunk/artwork/themes/default/device_ext3_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_ext3_o.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_cdrom.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_cdrom.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_openbsd_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_openbsd_o.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/progress_bar_background.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/progress_bar_background.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/progress_bar.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/progress_bar.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/menu_verbose.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/menu_verbose.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/artwork/themes/default/device_generic.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = (image/png, application/octet-stream) Property changes on: trunk/artwork/themes/default/device_generic.png ___________________________________________________________________ Modified: svn:mime-type - image/png + application/octet-stream Index: trunk/i386/libsaio/disk.c =================================================================== --- trunk/i386/libsaio/disk.c (revision 1737) +++ trunk/i386/libsaio/disk.c (revision 1738) @@ -131,6 +131,7 @@ unsigned int byteCount, void * buffer ) = NULL; int (*p_get_ramdisk_info)(int biosdev, struct driveInfo *dip) = NULL; +static bool getOSVersion(BVRef bvr, char *str); extern void spinActivityIndicator(int sectors); @@ -1427,6 +1428,48 @@ } } +static bool getOSVersion(BVRef bvr, char *str) +{ + bool valid = false; + config_file_t systemVersion; + char dirSpec[512]; + + sprintf(dirSpec, "hd(%d,%d)/System/Library/CoreServices/SystemVersion.plist", BIOS_DEV_UNIT(bvr), bvr->part_no); + + if (!loadConfigFile(dirSpec, &systemVersion)) + { + valid = true; + } + else + { + sprintf(dirSpec, "hd(%d,%d)/System/Library/CoreServices/ServerVersion.plist", BIOS_DEV_UNIT(bvr), bvr->part_no); + + if (!loadConfigFile(dirSpec, &systemVersion)) + { + bvr->OSisServer = true; + valid = true; + } + } + + if (valid) + { + const char *val; + int len; + + if (getValueForKey(kProductVersion, &val, &len, &systemVersion)) + { + // getValueForKey uses const char for val + // so copy it and trim + *str = '\0'; + strncat(str, val, MIN(len, 4)); + } + else + valid = false; + } + + return valid; +} + //========================================================================== static void scanFSLevelBVRSettings(BVRef chain) @@ -1479,18 +1522,10 @@ // if (bvr->flags & kBVFlagNativeBoot) { - sprintf(dirSpec, "hd(%d,%d)/System/Library/CoreServices/", BIOS_DEV_UNIT(bvr), bvr->part_no); - strcpy(fileSpec, "SystemVersion.plist"); - ret = GetFileInfo(dirSpec, fileSpec, &flags, &time); - - if (ret == -1) - { - strcpy(fileSpec, "ServerVersion.plist"); - ret = GetFileInfo(dirSpec, fileSpec, &flags, &time); - } - - if (!ret) - bvr->flags |= kBVFlagSystemVolume; + if (getOSVersion(bvr,bvr->OSVersion) == true) + { + bvr->flags |= kBVFlagSystemVolume; + } } } Index: trunk/i386/libsaio/saio_types.h =================================================================== --- trunk/i386/libsaio/saio_types.h (revision 1737) +++ trunk/i386/libsaio/saio_types.h (revision 1738) @@ -191,6 +191,8 @@ char altlabel[BVSTRLEN]; /* partition volume label */ bool filtered; /* newFilteredBVChain() will set to TRUE */ bool visible; /* will shown in the device list */ + char OSVersion[8]; + bool OSisServer; /* 1 = OS X server , 0 = OS X client */ }; enum { Index: trunk/i386/boot2/boot.c =================================================================== --- trunk/i386/boot2/boot.c (revision 1737) +++ trunk/i386/boot2/boot.c (revision 1738) @@ -81,7 +81,7 @@ BVRef bvr, menuBVR, bvChain; static bool checkOSVersion(const char * version); -static bool getOSVersion(); +static void getOSVersion(); static unsigned long Adler32(unsigned char *buffer, long length); //static void selectBiosDevice(void); @@ -761,36 +761,9 @@ && (gMacOSVersion[2] == version[2]) && (gMacOSVersion[3] == version[3])); } -bool getOSVersion() +static void getOSVersion() { - bool valid = false; - const char *val; - int len; - config_file_t systemVersion; - - if (!loadConfigFile("System/Library/CoreServices/SystemVersion.plist", &systemVersion)) - { - valid = true; - } - else if (!loadConfigFile("System/Library/CoreServices/ServerVersion.plist", &systemVersion)) - { - valid = true; - } - - if (valid) - { - if (getValueForKey(kProductVersion, &val, &len, &systemVersion)) - { - // getValueForKey uses const char for val - // so copy it and trim - *gMacOSVersion = '\0'; - strncat(gMacOSVersion, val, MIN(len, 4)); - } - else - valid = false; - } - - return valid; + strlcpy(gMacOSVersion,gBootVolume->OSVersion,sizeof(gMacOSVersion)+1); } #define BASE 65521L /* largest prime smaller than 65536 */ Index: trunk/i386/boot2/gui.c =================================================================== --- trunk/i386/boot2/gui.c (revision 1737) +++ trunk/i386/boot2/gui.c (revision 1738) @@ -43,8 +43,24 @@ iDeviceGeneric_o, iDeviceHFS, iDeviceHFS_o, + iDeviceHFS_Lion, + iDeviceHFS_Lion_o, + iDeviceHFS_SL, + iDeviceHFS_SL_o, + iDeviceHFS_Leo, + iDeviceHFS_Leo_o, + iDeviceHFS_Tiger, + iDeviceHFS_Tiger_o, iDeviceHFSRAID, iDeviceHFSRAID_o, + iDeviceHFSRAID_Lion, + iDeviceHFSRAID_Lion_o, + iDeviceHFSRAID_SL, + iDeviceHFSRAID_SL_o, + iDeviceHFSRAID_Leo, + iDeviceHFSRAID_Leo_o, + iDeviceHFSRAID_Tiger, + iDeviceHFSRAID_Tiger_o, iDeviceEXT3, iDeviceEXT3_o, iDeviceFreeBSD, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */ @@ -97,9 +113,26 @@ {.name = "device_generic", .image = NULL}, {.name = "device_generic_o", .image = NULL}, {.name = "device_hfsplus", .image = NULL}, - {.name = "device_hfsplus_o", .image = NULL}, + {.name = "device_hfsplus_o", .image = NULL}, + {.name = "device_hfsplus_lion", .image = NULL}, + {.name = "device_hfsplus_lion_o", .image = NULL}, + {.name = "device_hfsplus_sl", .image = NULL}, + {.name = "device_hfsplus_sl_o", .image = NULL}, + {.name = "device_hfsplus_leo", .image = NULL}, + {.name = "device_hfsplus_leo_o", .image = NULL}, + {.name = "device_hfsplus_tiger", .image = NULL}, + {.name = "device_hfsplus_tiger_o", .image = NULL}, + {.name = "device_hfsraid", .image = NULL}, {.name = "device_hfsraid_o", .image = NULL}, + {.name = "device_hfsplus_raid_lion", .image = NULL}, + {.name = "device_hfsplus_raid_lion_o", .image = NULL}, + {.name = "device_hfsplus_raid_sl", .image = NULL}, + {.name = "device_hfsplus_raid_sl_o", .image = NULL}, + {.name = "device_hfsplus_raid_leo", .image = NULL}, + {.name = "device_hfsplus_raid_leo_o", .image = NULL}, + {.name = "device_hfsplus_raid_tiger", .image = NULL}, + {.name = "device_hfsplus_raid_tiger_o", .image = NULL}, {.name = "device_ext3", .image = NULL}, {.name = "device_ext3_o", .image = NULL}, {.name = "device_freebsd", .image = NULL}, /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */ @@ -285,13 +318,24 @@ return 0; } #endif - else if (alt_image != IMG_REQUIRED && images[alt_image].image->pixels != NULL) + else if (alt_image != IMG_REQUIRED) { - // Using the passed alternate image for non-mandatory images. - // We don't clone the already existing pixmap, but using its properties instead! - images[i].image->width = images[alt_image].image->width; - images[i].image->height = images[alt_image].image->height; - images[i].image->pixels = images[alt_image].image->pixels; + if (images[alt_image].image->pixels != NULL) { + + // Using the passed alternate image for non-mandatory images. + // We don't clone the already existing pixmap, but using its properties instead! + images[i].image->width = images[alt_image].image->width; + images[i].image->height = images[alt_image].image->height; + images[i].image->pixels = images[alt_image].image->pixels; + + } else { + + // Unable to load or to find the image, this image not vital anyway, reseting and returning success !! + + free(images[i].image); + images[i].image = NULL; + } + return 0; } else @@ -300,8 +344,12 @@ printf("ERROR: GUI: could not open '%s/%s.png'!\n", theme_name, image); sleep(2); #endif - return 1; - } + free(images[i].image); + images[i].image = NULL; + return 1; + + } + } return 1; } @@ -315,8 +363,25 @@ LOADPNG(device_generic_o, iDeviceGeneric); LOADPNG(device_hfsplus, iDeviceGeneric); LOADPNG(device_hfsplus_o, iDeviceHFS); + LOADPNG(device_hfsplus_lion, iDeviceHFS_Lion); + LOADPNG(device_hfsplus_lion_o, iDeviceHFS_Lion_o); + LOADPNG(device_hfsplus_sl, iDeviceHFS_SL); + LOADPNG(device_hfsplus_sl_o, iDeviceHFS_SL_o); + LOADPNG(device_hfsplus_leo, iDeviceHFS_Leo); + LOADPNG(device_hfsplus_leo_o, iDeviceHFS_Leo_o); + LOADPNG(device_hfsplus_tiger, iDeviceHFS_Tiger); + LOADPNG(device_hfsplus_tiger_o, iDeviceHFS_Tiger_o); + LOADPNG(device_hfsraid, iDeviceGeneric); LOADPNG(device_hfsraid_o, iDeviceHFSRAID); + LOADPNG(device_hfsplus_raid_lion, iDeviceHFSRAID_Lion); + LOADPNG(device_hfsplus_raid_lion_o, iDeviceHFSRAID_Lion_o); + LOADPNG(device_hfsplus_raid_sl, iDeviceHFSRAID_SL); + LOADPNG(device_hfsplus_raid_sl_o, iDeviceHFSRAID_SL_o); + LOADPNG(device_hfsplus_raid_leo, iDeviceHFSRAID_Leo); + LOADPNG(device_hfsplus_raid_leo_o, iDeviceHFSRAID_Leo_o); + LOADPNG(device_hfsplus_raid_tiger, iDeviceHFSRAID_Tiger); + LOADPNG(device_hfsplus_raid_tiger_o, iDeviceHFSRAID_Tiger_o); LOADPNG(device_ext3, iDeviceGeneric); LOADPNG(device_ext3_o, iDeviceEXT3); LOADPNG(device_freebsd, iDeviceGeneric); /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */ @@ -764,6 +829,11 @@ return 1; } +bool is_image_loaded(int i) +{ + return (images[i].image != NULL) ? true : false; +} + void drawDeviceIcon(BVRef device, pixmap_t *buffer, position_t p, bool isSelected) { int devicetype; @@ -775,39 +845,84 @@ switch (device->part_type) { case kPartitionTypeHFS: + { // Use HFS or HFSRAID icon depending on bvr flags. - devicetype = (device->flags & kBVFlagBooter) ? iDeviceHFSRAID : iDeviceHFS; + if (device->flags & kBVFlagBooter) { + + switch (device->OSVersion[3]) { + case '7': + devicetype = is_image_loaded(iDeviceHFSRAID_Lion) ? iDeviceHFSRAID_Lion : is_image_loaded(iDeviceHFSRAID) ? iDeviceHFSRAID : iDeviceGeneric; + break; + case '6': + devicetype = is_image_loaded(iDeviceHFSRAID_SL) ? iDeviceHFSRAID_SL : is_image_loaded(iDeviceHFSRAID) ? iDeviceHFSRAID : iDeviceGeneric; + break; + case '5': + devicetype = is_image_loaded(iDeviceHFSRAID_Leo) ? iDeviceHFSRAID_Leo : is_image_loaded(iDeviceHFSRAID) ? iDeviceHFSRAID : iDeviceGeneric; + break; + case '4': + devicetype = is_image_loaded(iDeviceHFSRAID_Tiger) ? iDeviceHFSRAID_Tiger : is_image_loaded(iDeviceHFSRAID) ? iDeviceHFSRAID : iDeviceGeneric; + break; + default: + devicetype = is_image_loaded(iDeviceHFSRAID) ? iDeviceHFSRAID : iDeviceGeneric; + break; + } + + } + else + { + + switch (device->OSVersion[3]) { + case '7': + devicetype = is_image_loaded(iDeviceHFS_Lion) ? iDeviceHFS_Lion : is_image_loaded(iDeviceHFS) ? iDeviceHFS : iDeviceGeneric; + break; + case '6': + devicetype = is_image_loaded(iDeviceHFS_SL) ? iDeviceHFS_SL : is_image_loaded(iDeviceHFS) ? iDeviceHFS : iDeviceGeneric; + break; + case '5': + devicetype = is_image_loaded(iDeviceHFS_Leo) ? iDeviceHFS_Leo : is_image_loaded(iDeviceHFS) ? iDeviceHFS : iDeviceGeneric; + break; + case '4': + devicetype = is_image_loaded(iDeviceHFS_Tiger) ? iDeviceHFS_Tiger : is_image_loaded(iDeviceHFS) ? iDeviceHFS : iDeviceGeneric; + break; + default: + devicetype = is_image_loaded(iDeviceHFS) ? iDeviceHFS : iDeviceGeneric; + break; + } + + } + break; - + + } case kPartitionTypeHPFS: - devicetype = iDeviceNTFS; // Use HPFS / NTFS icon + devicetype = is_image_loaded(iDeviceNTFS) ? iDeviceNTFS : iDeviceGeneric; // Use HPFS / NTFS icon break; - - case kPartitionTypeBEFS: /* Haiku detection and Icon credits to scorpius */ - devicetype = iDeviceBEFS; // Use BEFS / Haiku icon + + case kPartitionTypeFAT16: + devicetype = is_image_loaded(iDeviceFAT16) ? iDeviceFAT16 : iDeviceGeneric; // Use FAT16 icon break; - - case kPartitionTypeFreeBSD: /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */ - devicetype = iDeviceFreeBSD; // Use FreeBSD icon + + case kPartitionTypeFAT32: + devicetype = is_image_loaded(iDeviceFAT32) ? iDeviceFAT32 : iDeviceGeneric; // Use FAT32 icon break; - case kPartitionTypeOpenBSD: /* FreeBSD/OpenBSD detection,nawcom's code by valv, Icon credits to blackosx */ - devicetype = iDeviceOpenBSD; // Use OpenBSD icon + case kPartitionTypeEXT3: + devicetype = is_image_loaded(iDeviceEXT3) ? iDeviceEXT3 : iDeviceGeneric; // Use EXT2/3 icon break; - case kPartitionTypeFAT16: - devicetype = iDeviceFAT16; // Use FAT16 icon + case kPartitionTypeFreeBSD: + devicetype = is_image_loaded(iDeviceFreeBSD) ? iDeviceFreeBSD : iDeviceGeneric; // Use FreeBSD icon break; - - case kPartitionTypeFAT32: - devicetype = iDeviceFAT32; // Use FAT32 icon + + case kPartitionTypeOpenBSD: + devicetype = is_image_loaded(iDeviceOpenBSD) ? iDeviceOpenBSD : iDeviceGeneric; // Use OpenBSD icon break; - - case kPartitionTypeEXT3: - devicetype = iDeviceEXT3; // Use EXT2/3 icon + + case kPartitionTypeBEFS: /* Haiku detection and Icon credits to scorpius */ + devicetype = is_image_loaded(iDeviceBEFS) ? iDeviceBEFS : iDeviceGeneric;// Use BEFS / Haiku icon break; - + default: devicetype = iDeviceGeneric; // Use Generic icon break; Index: trunk/i386/boot2/gui.h =================================================================== --- trunk/i386/boot2/gui.h (revision 1737) +++ trunk/i386/boot2/gui.h (revision 1738) @@ -124,6 +124,7 @@ void drawBackground(); void setupDeviceList(config_file_t *theme); +bool is_image_loaded(int i); void drawDeviceIcon(BVRef device, pixmap_t *buffer, position_t p, bool isSelected); void drawDeviceList(int start, int end, int selection); void drawProgressBar(pixmap_t *blendInto, uint16_t width, position_t p, uint8_t progress); Index: trunk/CHANGES =================================================================== --- trunk/CHANGES (revision 1737) +++ trunk/CHANGES (revision 1738) @@ -1,3 +1,5 @@ +- cparm : Ported the OS detection to the trunk, updated the default theme to v 1.1 (credit to blackosx) + - Added AtiPorts option to GraphicsEnabler, so users can override the default number of ports. It proved to be useful when used to limit the number of ports that a framebuffer registers, which seems to be a requirement on laptops that can only use 2 ports at the same time.