* DataEditor::SetTo() now checks if the reported block size is zero and then sets
it to the 512 byte default - this fixes bug #960. * IconView::UpdateIcon() now uses 8-bit icon for get_device_icon(), as B_RGB32 cannot work in this case. * Also, in case it couldn't get an icon, it now tries to show the generic icon instead. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19940 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9760e52d0c
commit
a9dfa85e4e
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -505,6 +505,9 @@ DataEditor::SetTo(BEntry &entry, const char *attribute)
|
||||
}
|
||||
}
|
||||
|
||||
if (fBlockSize == 0)
|
||||
fBlockSize = 512;
|
||||
|
||||
fRealViewSize = fViewSize = fBlockSize;
|
||||
fNeedsUpdate = true;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -454,7 +454,7 @@ DiskProbe::AboutRequested()
|
||||
{
|
||||
BAlert *alert = new BAlert("about", "DiskProbe\n"
|
||||
"\twritten by Axel Dörfler\n"
|
||||
"\tCopyright 2004-2006, Haiku.\n\n"
|
||||
"\tCopyright 2004-2007, Haiku.\n\n"
|
||||
"original Be version by Robert Polic\n", "Ok");
|
||||
BTextView *view = alert->TextView();
|
||||
BFont font;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -256,13 +256,26 @@ 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(), fBitmap->Bits(), B_LARGE_ICON);
|
||||
status = get_device_icon(path.Path(), icon->Bits(), B_LARGE_ICON);
|
||||
if (status == B_OK) {
|
||||
delete fBitmap;
|
||||
fBitmap = icon;
|
||||
} else
|
||||
delete icon;
|
||||
} else
|
||||
status = BNodeInfo::GetTrackerIcon(&fRef, fBitmap);
|
||||
|
||||
if (status != B_OK) {
|
||||
// ToDo: get a standard generic icon here?
|
||||
// Try to get generic icon
|
||||
BMimeType type(B_FILE_MIME_TYPE);
|
||||
status = type.GetIcon(fBitmap, B_LARGE_ICON);
|
||||
}
|
||||
|
||||
if (status != B_OK) {
|
||||
delete fBitmap;
|
||||
fBitmap = NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user