* 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:
Axel Dörfler
2009-01-20 20:38:44 +00:00
parent 530ce9aaab
commit c6790819de
+6 -10
View File
@@ -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.
*/
@@ -271,16 +271,12 @@ IconView::UpdateIcon()
status_t status = B_ERROR;
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);
status = get_device_icon(path.Path(), icon->Bits(), B_LARGE_ICON);
if (status == B_OK) {
delete fBitmap;
fBitmap = icon;
} else
delete icon;
#ifdef __HAIKU__
status = get_device_icon(path.Path(), fBitmap, B_LARGE_ICON);
#else
status = get_device_icon(path.Path(), fBitmap->Bits(), B_LARGE_ICON);
#endif
} else
status = BNodeInfo::GetTrackerIcon(&fRef, fBitmap);