* 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:
@@ -48,15 +48,15 @@ compare_attributes(const void* _a, const void* _b)
|
|||||||
|
|
||||||
|
|
||||||
AttributeWindow::AttributeWindow(FileTypesWindow* target, BMimeType& mimeType,
|
AttributeWindow::AttributeWindow(FileTypesWindow* target, BMimeType& mimeType,
|
||||||
AttributeItem* item)
|
AttributeItem* attributeItem)
|
||||||
: BWindow(BRect(100, 100, 350, 200), "Attribute", B_MODAL_WINDOW_LOOK,
|
: BWindow(BRect(100, 100, 350, 200), "Attribute", B_MODAL_WINDOW_LOOK,
|
||||||
B_MODAL_SUBSET_WINDOW_FEEL, B_NOT_ZOOMABLE | B_NOT_V_RESIZABLE
|
B_MODAL_SUBSET_WINDOW_FEEL, B_NOT_ZOOMABLE | B_NOT_V_RESIZABLE
|
||||||
| B_ASYNCHRONOUS_CONTROLS),
|
| B_ASYNCHRONOUS_CONTROLS),
|
||||||
fTarget(target),
|
fTarget(target),
|
||||||
fMimeType(mimeType.Type())
|
fMimeType(mimeType.Type())
|
||||||
{
|
{
|
||||||
if (item != NULL)
|
if (attributeItem != NULL)
|
||||||
fAttribute = *item;
|
fAttribute = *attributeItem;
|
||||||
|
|
||||||
BRect rect = Bounds();
|
BRect rect = Bounds();
|
||||||
BView* topView = new BView(rect, NULL, B_FOLLOW_ALL, B_WILL_DRAW);
|
BView* topView = new BView(rect, NULL, B_FOLLOW_ALL, B_WILL_DRAW);
|
||||||
|
|||||||
@@ -480,12 +480,18 @@ MimeTypeListView::MessageReceived(BMessage* message)
|
|||||||
{
|
{
|
||||||
// create new item
|
// create new item
|
||||||
BMimeType created(type);
|
BMimeType created(type);
|
||||||
|
bool isApp = mimetype_is_application_signature(created);
|
||||||
|
if (fApplicationMode ^ isApp)
|
||||||
|
break;
|
||||||
|
|
||||||
BMimeType superType;
|
BMimeType superType;
|
||||||
MimeTypeItem* superItem = NULL;
|
MimeTypeItem* superItem = NULL;
|
||||||
if (created.GetSupertype(&superType) == B_OK)
|
if (created.GetSupertype(&superType) == B_OK)
|
||||||
superItem = FindItem(superType.Type());
|
superItem = FindItem(superType.Type());
|
||||||
|
|
||||||
MimeTypeItem* item = new MimeTypeItem(created);
|
MimeTypeItem* item = new MimeTypeItem(created, fShowIcons,
|
||||||
|
fSupertype.Type() != NULL);
|
||||||
|
item->SetApplicationMode(isApp);
|
||||||
|
|
||||||
if (superItem != NULL) {
|
if (superItem != NULL) {
|
||||||
AddUnder(item, superItem);
|
AddUnder(item, superItem);
|
||||||
|
|||||||
Reference in New Issue
Block a user