Ticket #2370: media_alert_icon.patch
File media_alert_icon.patch, 1.2 KB (added by , 16 years ago) |
---|
-
src/preferences/media/Jamfile
6 6 SubDirC++Flags -fmultiple-symbol-spaces ; 7 7 } 8 8 9 UseLibraryHeaders icon ; 9 10 UsePrivateHeaders media ; 10 11 11 12 Preference Media : -
src/preferences/media/MediaAlert.cpp
22 22 #include <Screen.h> 23 23 #include <View.h> 24 24 25 #include <IconUtils.h> 25 26 #include <File.h> 26 27 #include <FindDirectory.h> 27 28 #include <Path.h> … … 130 131 // Load the raw icon data 131 132 size_t size; 132 133 const void* rawIcon = 133 Resources.LoadResource(B_ LARGE_ICON_TYPE, iconName, &size);134 Resources.LoadResource(B_VECTOR_ICON_TYPE, iconName, &size); 134 135 135 136 if (rawIcon) 136 137 { 137 138 // Now build the bitmap 138 139 Icon = new BBitmap(BRect(0, 0, 31, 31), B_CMAP8); 139 Icon->SetBits(rawIcon, size, 0, B_CMAP8); 140 if (BIconUtils::GetVectorIcon((const uint8*)rawIcon, size, Icon) != B_OK) { 141 delete Icon; 142 Icon = NULL; 143 } 140 144 } 141 145 } 142 146 }