Notifications: default to application icon.
It is possible to SetIcon(NULL) to remove it. But in msot cases we want the application icon to be the default. as discussed in #13590.
This commit is contained in:
parent
1d6af34b9a
commit
1416521f10
@ -19,6 +19,8 @@
|
||||
|
||||
#include <Bitmap.h>
|
||||
#include <Message.h>
|
||||
#include <NodeInfo.h>
|
||||
#include <Roster.h>
|
||||
|
||||
|
||||
BNotification::BNotification(notification_type type)
|
||||
@ -30,6 +32,19 @@ BNotification::BNotification(notification_type type)
|
||||
fFile(NULL),
|
||||
fBitmap(NULL)
|
||||
{
|
||||
int32 iconSize = B_LARGE_ICON;
|
||||
fBitmap = new BBitmap(BRect(0, 0, iconSize - 1, iconSize - 1), 0, B_RGBA32);
|
||||
if (fBitmap) {
|
||||
team_info teamInfo;
|
||||
get_team_info(B_CURRENT_TEAM, &teamInfo);
|
||||
app_info appInfo;
|
||||
be_roster->GetRunningAppInfo(teamInfo.team, &appInfo);
|
||||
if (BNodeInfo::GetTrackerIcon(&appInfo.ref, fBitmap,
|
||||
icon_size(iconSize)) != B_OK) {
|
||||
delete fBitmap;
|
||||
fBitmap = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user