* When a new type is added during lifetime, the "show icon", "application mode",

and "flat" settings of the MimeTypeListView are now honoured.
* Fixed warning in AttributeWindow.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16543 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-02-28 02:04:50 +00:00
parent 208a6ce11b
commit 31de48b49d
2 changed files with 10 additions and 4 deletions

View File

@ -48,15 +48,15 @@ compare_attributes(const void* _a, const void* _b)
AttributeWindow::AttributeWindow(FileTypesWindow* target, BMimeType& mimeType,
AttributeItem* item)
AttributeItem* attributeItem)
: BWindow(BRect(100, 100, 350, 200), "Attribute", B_MODAL_WINDOW_LOOK,
B_MODAL_SUBSET_WINDOW_FEEL, B_NOT_ZOOMABLE | B_NOT_V_RESIZABLE
| B_ASYNCHRONOUS_CONTROLS),
fTarget(target),
fMimeType(mimeType.Type())
{
if (item != NULL)
fAttribute = *item;
if (attributeItem != NULL)
fAttribute = *attributeItem;
BRect rect = Bounds();
BView* topView = new BView(rect, NULL, B_FOLLOW_ALL, B_WILL_DRAW);

View File

@ -480,12 +480,18 @@ MimeTypeListView::MessageReceived(BMessage* message)
{
// create new item
BMimeType created(type);
bool isApp = mimetype_is_application_signature(created);
if (fApplicationMode ^ isApp)
break;
BMimeType superType;
MimeTypeItem* superItem = NULL;
if (created.GetSupertype(&superType) == B_OK)
superItem = FindItem(superType.Type());
MimeTypeItem* item = new MimeTypeItem(created);
MimeTypeItem* item = new MimeTypeItem(created, fShowIcons,
fSupertype.Type() != NULL);
item->SetApplicationMode(isApp);
if (superItem != NULL) {
AddUnder(item, superItem);