Tracker: Whitespace, alphabetize style fixes

No functional change intended.

Change-Id: Ib47f6b04e372923a5d2a1774ce4e3f56d8b05792
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6370
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
John Scipione
2023-04-24 02:47:43 +00:00
parent 3f06b49ad3
commit a63a67392b
12 changed files with 30 additions and 33 deletions
+3 -3
View File
@@ -2858,7 +2858,7 @@ BContainerWindow::ShowContextMenu(BPoint loc, const entry_ref* ref, BView*)
ejectableVolumeSelected = true; ejectableVolumeSelected = true;
EnableNamedMenuItem(fContextMenu, EnableNamedMenuItem(fContextMenu,
B_TRANSLATE("Unmount"), ejectableVolumeSelected); B_TRANSLATE("Unmount"), ejectableVolumeSelected);
} }
} }
@@ -2912,7 +2912,7 @@ BContainerWindow::AddFileContextMenus(BMenu* menu)
if (!IsTrash() && !InTrash()) { if (!IsTrash() && !InTrash()) {
menu->AddItem(new BMenuItem(TrackerSettings().DontMoveFilesToTrash() menu->AddItem(new BMenuItem(TrackerSettings().DontMoveFilesToTrash()
? B_TRANSLATE("Delete") : B_TRANSLATE("Move to Trash"), ? B_TRANSLATE("Delete") : B_TRANSLATE("Move to Trash"),
new BMessage(kMoveToTrash), 'T')); new BMessage(kMoveToTrash), 'T'));
if (!IsPrintersDir()) { if (!IsPrintersDir()) {
// add separator for copy to/move to items (navigation items) // add separator for copy to/move to items (navigation items)
@@ -3365,7 +3365,7 @@ BContainerWindow::LoadAddOn(BMessage* message)
buffer.ReplaceFirst("%error", strerror(result)); buffer.ReplaceFirst("%error", strerror(result));
buffer.ReplaceFirst("%name", addonRef.name); buffer.ReplaceFirst("%name", addonRef.name);
BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"),
0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go(); alert->Go();
+2 -2
View File
@@ -32,8 +32,8 @@ names are registered trademarks or trademarks of their respective holders.
All rights reserved. All rights reserved.
*/ */
// DesktopPoseView adds support for displaying integrated desktops // DesktopPoseView adds support for displaying integrated desktops
// from multiple volumes to BPoseView // from multiple volumes to BPoseView
#ifndef _DESKTOP_POSE_VIEW_H #ifndef _DESKTOP_POSE_VIEW_H
#define _DESKTOP_POSE_VIEW_H #define _DESKTOP_POSE_VIEW_H
+8 -8
View File
@@ -358,13 +358,13 @@ TrackerCopyLoopControl::FileError(const char* message, const char* name,
buffer.ReplaceFirst("%error", strerror(error)); buffer.ReplaceFirst("%error", strerror(error));
if (allowContinue) { if (allowContinue) {
BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"),
B_TRANSLATE("OK"), 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); B_TRANSLATE("OK"), 0, B_WIDTH_AS_USUAL, B_STOP_ALERT);
alert->SetShortcut(0, B_ESCAPE); alert->SetShortcut(0, B_ESCAPE);
return alert->Go() != 0; return alert->Go() != 0;
} }
BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), 0, 0, BAlert* alert = new BAlert("", buffer.String(), B_TRANSLATE("Cancel"), 0, 0,
B_WIDTH_AS_USUAL, B_STOP_ALERT); B_WIDTH_AS_USUAL, B_STOP_ALERT);
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go(); alert->Go();
@@ -1308,7 +1308,7 @@ LowLevelCopy(BEntry* srcEntry, StatStruct* srcStat, BDirectory* destDir,
size_t bufsize = kMinBufferSize; size_t bufsize = kMinBufferSize;
if ((off_t)bufsize < srcStat->st_size) { if ((off_t)bufsize < srcStat->st_size) {
// File bigger than the buffer size: determine an optimal buffer size // File bigger than the buffer size: determine an optimal buffer size
system_info sinfo; system_info sinfo;
get_system_info(&sinfo); get_system_info(&sinfo);
size_t freesize = static_cast<size_t>( size_t freesize = static_cast<size_t>(
@@ -1940,8 +1940,8 @@ MoveEntryToTrash(BEntry* entry, BPoint* loc, Undo &undo)
// if it's a volume, try to unmount // if it's a volume, try to unmount
if (dir.IsRootDirectory()) { if (dir.IsRootDirectory()) {
BVolume volume(nodeRef.device); BVolume volume(nodeRef.device);
BVolume boot; BVolume boot;
BVolumeRoster().GetBootVolume(&boot); BVolumeRoster().GetBootVolume(&boot);
if (volume == boot) { if (volume == boot) {
@@ -2060,7 +2060,7 @@ PreFlightNameCheck(BObjectList<entry_ref>* srcList, const BDirectory* destDir,
// single collision case will be handled as a "Prompt" case by CheckName // single collision case will be handled as a "Prompt" case by CheckName
if (*collisionCount > 1) { if (*collisionCount > 1) {
const char* verb = (moveMode == kMoveSelectionTo) const char* verb = (moveMode == kMoveSelectionTo)
? B_TRANSLATE("moving") : B_TRANSLATE("copying"); ? B_TRANSLATE("moving") : B_TRANSLATE("copying");
BString replaceMsg(B_TRANSLATE_NOCOLLECT(kReplaceManyStr)); BString replaceMsg(B_TRANSLATE_NOCOLLECT(kReplaceManyStr));
replaceMsg.ReplaceAll("%verb", verb); replaceMsg.ReplaceAll("%verb", verb);
@@ -2159,7 +2159,7 @@ CheckName(uint32 moveMode, const BEntry* sourceEntry,
return B_OK; return B_OK;
} }
if (moveMode == kCreateLink || moveMode == kCreateRelativeLink) { if (moveMode == kCreateLink || moveMode == kCreateRelativeLink) {
// if we are creating link in the same directory, the conflict will // if we are creating link in the same directory, the conflict will
// be handled later by giving the link a unique name // be handled later by giving the link a unique name
sourceEntry->GetParent(&srcDirectory); sourceEntry->GetParent(&srcDirectory);
@@ -2192,7 +2192,7 @@ CheckName(uint32 moveMode, const BEntry* sourceEntry,
? B_TRANSLATE("You cannot replace a file with a folder or a " ? B_TRANSLATE("You cannot replace a file with a folder or a "
"symbolic link.") "symbolic link.")
: B_TRANSLATE("You cannot replace a folder or a symbolic link " : B_TRANSLATE("You cannot replace a folder or a symbolic link "
"with a file."), B_TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL, "with a file."), B_TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL,
B_WARNING_ALERT); B_WARNING_ALERT);
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go(); alert->Go();
+1 -1
View File
@@ -329,7 +329,7 @@ BFilePanel::SetPanelDirectory(const BEntry* entry)
void void
BFilePanel::SetPanelDirectory(const BDirectory* dir) BFilePanel::SetPanelDirectory(const BDirectory* dir)
{ {
BEntry entry; BEntry entry;
if (dir && (dir->GetEntry(&entry) == B_OK)) if (dir && (dir->GetEntry(&entry) == B_OK))
SetPanelDirectory(&entry); SetPanelDirectory(&entry);
+3 -3
View File
@@ -426,8 +426,8 @@ Model::OpenNodeCommon(bool writable)
SetupBaseType(); SetupBaseType();
switch (fBaseType) { switch (fBaseType) {
case kPlainNode:
case kExecutableNode: case kExecutableNode:
case kPlainNode:
case kQueryNode: case kQueryNode:
case kQueryTemplateNode: case kQueryTemplateNode:
case kVirtualDirectoryNode: case kVirtualDirectoryNode:
@@ -437,11 +437,11 @@ Model::OpenNodeCommon(bool writable)
(uint32)(writable ? O_RDWR : O_RDONLY)); (uint32)(writable ? O_RDWR : O_RDONLY));
break; break;
case kDesktopNode:
case kDirectoryNode: case kDirectoryNode:
case kVolumeNode:
case kRootNode: case kRootNode:
case kTrashNode: case kTrashNode:
case kDesktopNode: case kVolumeNode:
if (!IsNodeOpen()) if (!IsNodeOpen())
fNode = new BDirectory(&fEntryRef); fNode = new BDirectory(&fEntryRef);
+6 -6
View File
@@ -229,18 +229,18 @@ private:
CanHandleResult CanHandleDrops() const; CanHandleResult CanHandleDrops() const;
enum NodeType { enum NodeType {
kPlainNode, kDesktopNode,
kExecutableNode,
kDirectoryNode, kDirectoryNode,
kExecutableNode,
kLinkNode, kLinkNode,
kPlainNode,
kQueryNode, kQueryNode,
kQueryTemplateNode, kQueryTemplateNode,
kVolumeNode,
kRootNode, kRootNode,
kVolumeNode,
kTrashNode, kTrashNode,
kDesktopNode, kUnknownNode,
kVirtualDirectoryNode, kVirtualDirectoryNode
kUnknownNode
}; };
entry_ref fEntryRef; entry_ref fEntryRef;
+1 -1
View File
@@ -192,7 +192,7 @@ BPose::Select(bool on)
inline bigtime_t inline bigtime_t
BPose::SelectionTime() const BPose::SelectionTime() const
{ {
return fSelectionTime; return fSelectionTime;
} }
+3 -3
View File
@@ -4465,11 +4465,11 @@ BPoseView::HandleMessageDropped(BMessage* message)
BContainerWindow* window = dynamic_cast<BContainerWindow*>(Window()); BContainerWindow* window = dynamic_cast<BContainerWindow*>(Window());
if (window != NULL && message->HasData("RGBColor", 'RGBC')) { if (window != NULL && message->HasData("RGBColor", 'RGBC')) {
// do not handle roColor-style drops here, pass them on to the desktop // do not handle roColor-style drops here, pass them on to the desktop
BMessenger((BHandler*)window).SendMessage(message); BMessenger((BHandler*)window).SendMessage(message);
return true; return true;
} }
if (fDropTarget && !DragSelectionContains(fDropTarget, message)) if (fDropTarget && !DragSelectionContains(fDropTarget, message))
HiliteDropTarget(false); HiliteDropTarget(false);
@@ -6186,7 +6186,7 @@ CheckVolumeReadOnly(const entry_ref* ref)
{ {
BVolume volume (ref->device); BVolume volume (ref->device);
if (volume.IsReadOnly()) { if (volume.IsReadOnly()) {
BAlert* alert = new BAlert ("", BAlert* alert = new BAlert("",
B_TRANSLATE("Files cannot be moved or deleted from a read-only " B_TRANSLATE("Files cannot be moved or deleted from a read-only "
"volume."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL, "volume."), B_TRANSLATE("Cancel"), NULL, NULL, B_WIDTH_AS_USUAL,
B_STOP_ALERT); B_STOP_ALERT);
@@ -60,8 +60,8 @@ VirtualDirectoryPoseView::MessageReceived(BMessage* message)
// ignore all edit operations // ignore all edit operations
case B_CUT: case B_CUT:
case kCutMoreSelectionToClipboard: case kCutMoreSelectionToClipboard:
case kDuplicateSelection:
case kDelete: case kDelete:
case kDuplicateSelection:
case kMoveToTrash: case kMoveToTrash:
case kNewEntryFromTemplate: case kNewEntryFromTemplate:
case kNewFolder: case kNewFolder:
@@ -406,7 +406,7 @@ AttributesView::AttributesView(Model* model)
break; break;
case B_RGB_32_BIT_TYPE: case B_RGB_32_BIT_TYPE:
row->SetField(new BStringField(B_TRANSLATE( row->SetField(new BStringField(B_TRANSLATE(
"True-color picture")), kTypeColumn); "True-color picture")), kTypeColumn);
break; break;
case B_RGB_COLOR_TYPE: case B_RGB_COLOR_TYPE:
row->SetField(new BStringField(B_TRANSLATE("Color")), row->SetField(new BStringField(B_TRANSLATE("Color")),
@@ -73,7 +73,7 @@ public:
BRect rectArray[1]; BRect rectArray[1];
escapement_delta delta = { 0.0, 0.0 }; escapement_delta delta = { 0.0, 0.0 };
currentFont.GetBoundingBoxesForStrings(stringArray, 1, B_SCREEN_METRIC, currentFont.GetBoundingBoxesForStrings(stringArray, 1, B_SCREEN_METRIC,
&delta, rectArray); &delta, rectArray);
// Adjust the size to avoid partial drawing of first and last chars // Adjust the size to avoid partial drawing of first and last chars
// due to the orientation // due to the orientation
@@ -113,7 +113,6 @@ HeaderView::HeaderView(Model* model)
else else
delete resolvedModel; delete resolvedModel;
} }
} }
@@ -713,5 +712,3 @@ HeaderView::CurrentFontHeight()
return fontHeight.ascent + fontHeight.descent + fontHeight.leading + 2; return fontHeight.ascent + fontHeight.descent + fontHeight.leading + 2;
} }