| 1837 | } |
| 1838 | |
| 1839 | BOOLEAN |
| 1840 | FillingCustomLegacy ( |
| 1841 | IN OUT CUSTOM_LEGACY_ENTRY *Entry, |
| 1842 | const TagDict* DictPointer |
| 1843 | ) |
| 1844 | { |
| 1845 | const TagStruct* Prop; |
| 1846 | if ((Entry == NULL) || (DictPointer == NULL)) { |
| 1847 | return FALSE; |
| 1848 | } |
| 1849 | |
| 1850 | Prop = DictPointer->propertyForKey("Disabled"); |
| 1851 | if (IsPropertyNotNullAndTrue(Prop)) { |
| 1852 | return FALSE; |
| 1853 | } |
| 1854 | |
| 1855 | Prop = DictPointer->propertyForKey("Volume"); |
| 1856 | if (Prop != NULL && (Prop->isString())) { |
| 1857 | Entry->Volume = Prop->getString()->stringValue(); |
| 1858 | } |
| 1859 | |
| 1860 | Prop = DictPointer->propertyForKey("FullTitle"); |
| 1861 | if (Prop != NULL && (Prop->isString())) { |
| 1862 | Entry->FullTitle = Prop->getString()->stringValue(); |
| 1863 | } |
| 1864 | |
| 1865 | Prop = DictPointer->propertyForKey("Title"); |
| 1866 | if (Prop != NULL && (Prop->isString())) { |
| 1867 | Entry->Title = Prop->getString()->stringValue(); |
| 1868 | } |
| 1869 | Prop = DictPointer->propertyForKey("Image"); |
| 1870 | if (Prop != NULL) { |
| 1871 | if (Prop->isString()) { |
| 1872 | Entry->Image.LoadXImage(ThemeX.ThemeDir, Prop->getString()->stringValue()); |
| 1873 | } |
| 1874 | } else { |
| 1875 | UINTN DataLen = 0; |
| 1876 | UINT8 *TmpData = GetDataSetting (DictPointer, "ImageData", &DataLen); |
| 1877 | if (TmpData) { |
| 1878 | if (!EFI_ERROR(Entry->Image.Image.FromPNG(TmpData, DataLen))) { |
| 1879 | Entry->Image.setFilled(); |
| 1880 | } |
| 1881 | FreePool(TmpData); |
| 1882 | } |
| 1883 | } |
| 1884 | |
| 1885 | Prop = DictPointer->propertyForKey("DriveImage"); |
| 1886 | if (Prop != NULL) { |
| 1887 | if (Prop->isString()) { |
| 1888 | Entry->Image.LoadXImage(ThemeX.ThemeDir, Prop->getString()->stringValue()); |
| 1889 | } |
| 1890 | } else { |
| 1891 | UINTN DataLen = 0; |
| 1892 | UINT8 *TmpData = GetDataSetting (DictPointer, "DriveImageData", &DataLen); |
| 1893 | if (TmpData) { |
| 1894 | if (!EFI_ERROR(Entry->DriveImage.Image.FromPNG(TmpData, DataLen))) { |
| 1895 | Entry->DriveImage.setFilled(); |
| 1896 | } |
no test coverage detected