Tracker: Style fixes

indentation, spaces, explicitly compare to B_OK
This commit is contained in:
John Scipione
2016-07-31 19:42:39 -07:00
parent d8c4f7b54a
commit 717b47e75d
2 changed files with 6 additions and 7 deletions
+5 -6
View File
@@ -940,10 +940,10 @@ FindPanel::AttachedToWindow()
fVolMenu->SetTargetForItems(this);
// 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();
if (submenu != NULL)
submenu->SetTargetForItems(this);
submenu->SetTargetForItems(this);
}
fMimeTypeMenu->SetTargetForItems(this);
@@ -1813,13 +1813,12 @@ FindPanel::AddOneMimeTypeToMenu(const ShortMimeInfo* info, void* castToMenu)
BMenu* menu = superItem->Submenu();
BMenuItem* previous = menu->ItemAt(menu->CountItems() - 1);
BString text = info->ShortDescription();
if (previous != NULL && strcasecmp(previous->Label(),
info->ShortDescription()) == 0) {
if (previous != NULL
&& strcasecmp(previous->Label(), info->ShortDescription()) == 0) {
AddSubtype(text, type);
// update the previous item as well
BMimeType type(previous->Message()->GetString("mimetype",
NULL));
BMimeType type(previous->Message()->GetString("mimetype", NULL));
BString label = ShortMimeInfo(type).ShortDescription();
AddSubtype(label, type);
previous->SetLabel(label);
+1 -1
View File
@@ -279,7 +279,7 @@ IconMenuItem::IconMenuItem(const char* label, BMessage* message,
fDeviceIcon = new BBitmap(BRect(0, 0, which - 1, which - 1),
kDefaultIconDepth);
if (nodeInfo->GetTrackerIcon(fDeviceIcon, B_MINI_ICON)) {
if (nodeInfo->GetTrackerIcon(fDeviceIcon, B_MINI_ICON) != B_OK) {
delete fDeviceIcon;
fDeviceIcon = NULL;
}