* 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:
parent
206c62f036
commit
d125d984a6
|
@ -297,9 +297,13 @@ IconMenuItem::IconMenuItem(const char *label, BMessage *message,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mime.GetIcon(fDeviceIcon, which) != B_OK) {
|
if (mime.GetIcon(fDeviceIcon, which) != B_OK) {
|
||||||
|
BMimeType super;
|
||||||
|
mime.GetSupertype(&super);
|
||||||
|
if (super.GetIcon(fDeviceIcon, which) != B_OK) {
|
||||||
delete fDeviceIcon;
|
delete fDeviceIcon;
|
||||||
fDeviceIcon = NULL;
|
fDeviceIcon = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// IconMenuItem is used in synchronously invoked menus, make sure
|
// IconMenuItem is used in synchronously invoked menus, make sure
|
||||||
// we invoke with a timeout
|
// we invoke with a timeout
|
||||||
|
@ -321,9 +325,13 @@ IconMenuItem::IconMenuItem(BMenu *submenu, BMessage *message,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mime.GetIcon(fDeviceIcon, which) != B_OK) {
|
if (mime.GetIcon(fDeviceIcon, which) != B_OK) {
|
||||||
|
BMimeType super;
|
||||||
|
mime.GetSupertype(&super);
|
||||||
|
if (super.GetIcon(fDeviceIcon, which) != B_OK) {
|
||||||
delete fDeviceIcon;
|
delete fDeviceIcon;
|
||||||
fDeviceIcon = NULL;
|
fDeviceIcon = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// IconMenuItem is used in synchronously invoked menus, make sure
|
// IconMenuItem is used in synchronously invoked menus, make sure
|
||||||
// we invoke with a timeout
|
// we invoke with a timeout
|
||||||
|
|
Loading…
Reference in New Issue