* Use the new get_device_icon() call under Haiku. This fixes bug #3325.
* Whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28972 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2004-2008, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2004-2009, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -271,16 +271,12 @@ IconView::UpdateIcon()
|
|||||||
status_t status = B_ERROR;
|
status_t status = B_ERROR;
|
||||||
|
|
||||||
if (fIsDevice) {
|
if (fIsDevice) {
|
||||||
BBitmap* icon = new BBitmap(BRect(0, 0, 31, 31), B_CMAP8);
|
|
||||||
// TODO: as long as we'll use get_device_icon() for this
|
|
||||||
|
|
||||||
BPath path(&fRef);
|
BPath path(&fRef);
|
||||||
status = get_device_icon(path.Path(), icon->Bits(), B_LARGE_ICON);
|
#ifdef __HAIKU__
|
||||||
if (status == B_OK) {
|
status = get_device_icon(path.Path(), fBitmap, B_LARGE_ICON);
|
||||||
delete fBitmap;
|
#else
|
||||||
fBitmap = icon;
|
status = get_device_icon(path.Path(), fBitmap->Bits(), B_LARGE_ICON);
|
||||||
} else
|
#endif
|
||||||
delete icon;
|
|
||||||
} else
|
} else
|
||||||
status = BNodeInfo::GetTrackerIcon(&fRef, fBitmap);
|
status = BNodeInfo::GetTrackerIcon(&fRef, fBitmap);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user