The resolution and image type now span over the whole width of the file
panel window (and thus the text is no longer cut off under Haiku). Instead of only writing "JPEG Image" for JPEG images, and nothing for all other image types, the MIME types short description is now displayed (or the MIME type itself if no such description exists). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15733 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
835a0aaf32
commit
2494fda73a
@ -63,7 +63,7 @@ ImageFilePanel::Show()
|
||||
background->AddChild(fImageView);
|
||||
|
||||
rect = BRect(background->Bounds().left + 132, background->Bounds().bottom - 85,
|
||||
background->Bounds().left + 250, background->Bounds().bottom - 65);
|
||||
background->Bounds().right, background->Bounds().bottom - 65);
|
||||
fResolutionView = new BStringView(rect, "ResolutionView", NULL,
|
||||
B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
|
||||
background->AddChild(fResolutionView);
|
||||
@ -116,13 +116,12 @@ ImageFilePanel::SelectionChanged()
|
||||
|
||||
BNode node(&ref);
|
||||
BNodeInfo nodeInfo(&node);
|
||||
char fileType[256];
|
||||
if (nodeInfo.GetType(fileType) == B_OK) {
|
||||
// TODO: this is broken!
|
||||
if (strncmp(fileType, "image/jpeg", 10) == 0)
|
||||
fImageTypeView->SetText("JPEG Image");
|
||||
else
|
||||
fImageTypeView->SetText("");
|
||||
char type[B_MIME_TYPE_LENGTH];
|
||||
if (nodeInfo.GetType(type) == B_OK) {
|
||||
BMimeType mimeType(type);
|
||||
mimeType.GetShortDescription(type);
|
||||
// if this fails, the MIME type will be displayed
|
||||
fImageTypeView->SetText(type);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user