* IconMenuItem now falls back to the icon of the super type, if a MIME type

didn't have one.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27144 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-08-22 12:06:50 +00:00
parent 206c62f036
commit d125d984a6
1 changed files with 21 additions and 13 deletions

View File

@ -297,9 +297,13 @@ IconMenuItem::IconMenuItem(const char *label, BMessage *message,
#endif
if (mime.GetIcon(fDeviceIcon, which) != B_OK) {
BMimeType super;
mime.GetSupertype(&super);
if (super.GetIcon(fDeviceIcon, which) != B_OK) {
delete fDeviceIcon;
fDeviceIcon = NULL;
}
}
// IconMenuItem is used in synchronously invoked menus, make sure
// we invoke with a timeout
@ -321,9 +325,13 @@ IconMenuItem::IconMenuItem(BMenu *submenu, BMessage *message,
#endif
if (mime.GetIcon(fDeviceIcon, which) != B_OK) {
BMimeType super;
mime.GetSupertype(&super);
if (super.GetIcon(fDeviceIcon, which) != B_OK) {
delete fDeviceIcon;
fDeviceIcon = NULL;
}
}
// IconMenuItem is used in synchronously invoked menus, make sure
// we invoke with a timeout