Ticket #2370: screen_alert_icon.patch
File screen_alert_icon.patch, 1.4 KB (added by , 16 years ago) |
---|
-
src/preferences/screen/AlertView.cpp
18 18 #include <StringView.h> 19 19 #include <String.h> 20 20 21 #include <IconUtils.h> 21 22 #include <FindDirectory.h> 22 23 #include <Resources.h> 23 24 #include <File.h> … … 142 143 BFile file; 143 144 if (file.SetTo(path.Path(), B_READ_ONLY) == B_OK 144 145 && resources.SetTo(&file) == B_OK) { 145 // Load the raw icon data146 146 size_t size; 147 const void* data = resources.LoadResource(B_ LARGE_ICON_TYPE, "warn", &size);147 const void* data = resources.LoadResource(B_VECTOR_ICON_TYPE, "warn", &size); 148 148 if (data) { 149 // Now build the bitmap150 149 icon = new BBitmap(BRect(0, 0, 31, 31), 0, B_CMAP8); 151 icon->SetBits(data, size, 0, B_CMAP8); 150 if (BIconUtils::GetVectorIcon((const uint8*)data, size, icon) != B_OK) { 151 delete icon; 152 icon = NULL; 153 } 152 154 } 153 155 } 154 156 } -
src/preferences/screen/Jamfile
3 3 SetSubDirSupportedPlatformsBeOSCompatible ; 4 4 AddSubDirSupportedPlatforms libbe_test ; 5 5 6 UseLibraryHeaders icon ; 6 7 UsePrivateHeaders [ FDirName graphics radeon ] ; 7 8 8 9 Preference Screen :