Tracker: Style fixes
indentation, spaces, explicitly compare to B_OK
This commit is contained in:
@@ -940,10 +940,10 @@ FindPanel::AttachedToWindow()
|
|||||||
fVolMenu->SetTargetForItems(this);
|
fVolMenu->SetTargetForItems(this);
|
||||||
|
|
||||||
// set target for MIME type items
|
// set target for MIME type items
|
||||||
for (int32 index = MimeTypeMenu()->CountItems();index-- > 2;) {
|
for (int32 index = MimeTypeMenu()->CountItems(); index-- > 2;) {
|
||||||
BMenu* submenu = MimeTypeMenu()->ItemAt(index)->Submenu();
|
BMenu* submenu = MimeTypeMenu()->ItemAt(index)->Submenu();
|
||||||
if (submenu != NULL)
|
if (submenu != NULL)
|
||||||
submenu->SetTargetForItems(this);
|
submenu->SetTargetForItems(this);
|
||||||
}
|
}
|
||||||
fMimeTypeMenu->SetTargetForItems(this);
|
fMimeTypeMenu->SetTargetForItems(this);
|
||||||
|
|
||||||
@@ -1813,13 +1813,12 @@ FindPanel::AddOneMimeTypeToMenu(const ShortMimeInfo* info, void* castToMenu)
|
|||||||
BMenu* menu = superItem->Submenu();
|
BMenu* menu = superItem->Submenu();
|
||||||
BMenuItem* previous = menu->ItemAt(menu->CountItems() - 1);
|
BMenuItem* previous = menu->ItemAt(menu->CountItems() - 1);
|
||||||
BString text = info->ShortDescription();
|
BString text = info->ShortDescription();
|
||||||
if (previous != NULL && strcasecmp(previous->Label(),
|
if (previous != NULL
|
||||||
info->ShortDescription()) == 0) {
|
&& strcasecmp(previous->Label(), info->ShortDescription()) == 0) {
|
||||||
AddSubtype(text, type);
|
AddSubtype(text, type);
|
||||||
|
|
||||||
// update the previous item as well
|
// update the previous item as well
|
||||||
BMimeType type(previous->Message()->GetString("mimetype",
|
BMimeType type(previous->Message()->GetString("mimetype", NULL));
|
||||||
NULL));
|
|
||||||
BString label = ShortMimeInfo(type).ShortDescription();
|
BString label = ShortMimeInfo(type).ShortDescription();
|
||||||
AddSubtype(label, type);
|
AddSubtype(label, type);
|
||||||
previous->SetLabel(label);
|
previous->SetLabel(label);
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ IconMenuItem::IconMenuItem(const char* label, BMessage* message,
|
|||||||
fDeviceIcon = new BBitmap(BRect(0, 0, which - 1, which - 1),
|
fDeviceIcon = new BBitmap(BRect(0, 0, which - 1, which - 1),
|
||||||
kDefaultIconDepth);
|
kDefaultIconDepth);
|
||||||
|
|
||||||
if (nodeInfo->GetTrackerIcon(fDeviceIcon, B_MINI_ICON)) {
|
if (nodeInfo->GetTrackerIcon(fDeviceIcon, B_MINI_ICON) != B_OK) {
|
||||||
delete fDeviceIcon;
|
delete fDeviceIcon;
|
||||||
fDeviceIcon = NULL;
|
fDeviceIcon = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user