hrev45121 adds 1 changeset to branch 'master' old head: 364389a05700b43f91065d906d846d73aaf60c5f new head: db41683495bfde817554415d14ae6f9cc91e77eb overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=db41683+%5E364389a ---------------------------------------------------------------------------- db41683: Automatic whitespace cleanup. No functional change. [ Matt Madia <mattmadia@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev45121 Commit: db41683495bfde817554415d14ae6f9cc91e77eb URL: http://cgit.haiku-os.org/haiku/commit/?id=db41683 Author: Matt Madia <mattmadia@xxxxxxxxx> Date: Wed Jan 2 10:11:56 2013 UTC ---------------------------------------------------------------------------- 54 files changed, 214 insertions(+), 214 deletions(-) src/kits/tracker/AUTHORS | 2 +- src/kits/tracker/AttributeStream.h | 6 ++-- src/kits/tracker/Bitmaps.h | 2 +- src/kits/tracker/DeskWindow.h | 8 +++--- src/kits/tracker/DesktopPoseView.cpp | 4 +-- src/kits/tracker/DesktopPoseView.h | 2 +- src/kits/tracker/DialogPane.cpp | 2 +- src/kits/tracker/DialogPane.h | 14 ++++----- src/kits/tracker/FBCPadding.cpp | 2 +- src/kits/tracker/FSClipboard.cpp | 10 +++---- src/kits/tracker/FavoritesMenu.cpp | 4 +-- src/kits/tracker/FavoritesMenu.h | 6 ++-- src/kits/tracker/FindPanel.cpp | 2 +- src/kits/tracker/FunctionObject.h | 2 +- src/kits/tracker/GroupedMenu.cpp | 2 +- src/kits/tracker/IconCache.cpp | 2 +- src/kits/tracker/IconCache.h | 28 +++++++++--------- src/kits/tracker/InfoWindow.cpp | 2 +- src/kits/tracker/MiniMenuField.cpp | 8 +++--- src/kits/tracker/Navigator.cpp | 10 +++---- src/kits/tracker/Navigator.h | 4 +-- src/kits/tracker/NodePreloader.cpp | 4 +-- src/kits/tracker/NodeWalker.cpp | 10 +++---- src/kits/tracker/NodeWalker.h | 12 ++++---- src/kits/tracker/OverrideAlert.cpp | 22 +++++++------- src/kits/tracker/Pose.cpp | 40 +++++++++++++------------- src/kits/tracker/PoseList.cpp | 4 +-- src/kits/tracker/PoseView.cpp | 2 +- src/kits/tracker/PoseViewScripting.cpp | 32 ++++++++++----------- src/kits/tracker/QueryPoseView.cpp | 16 +++++------ src/kits/tracker/RecentItems.h | 2 +- src/kits/tracker/RegExp.cpp | 2 +- src/kits/tracker/RegExp.h | 6 ++-- src/kits/tracker/Settings.cpp | 2 +- src/kits/tracker/SettingsHandler.cpp | 6 ++-- src/kits/tracker/SettingsHandler.h | 4 +-- src/kits/tracker/SlowContextPopup.cpp | 28 +++++++++--------- src/kits/tracker/SlowContextPopup.h | 4 +-- src/kits/tracker/SlowMenu.cpp | 2 +- src/kits/tracker/TaskLoop.h | 8 +++--- src/kits/tracker/TemplatesMenu.cpp | 2 +- src/kits/tracker/TextWidget.cpp | 4 +-- src/kits/tracker/TextWidget.h | 8 +++--- src/kits/tracker/TitleView.cpp | 16 +++++------ src/kits/tracker/TitleView.h | 6 ++-- src/kits/tracker/Tracker.cpp | 2 +- src/kits/tracker/TrackerScripting.cpp | 6 ++-- src/kits/tracker/TrackerSettings.h | 4 +-- src/kits/tracker/TrackerSettingsWindow.cpp | 10 +++---- src/kits/tracker/TrackerString.cpp | 22 +++++++------- src/kits/tracker/TrackerString.h | 10 +++---- src/kits/tracker/TrashWatcher.cpp | 4 +-- src/kits/tracker/TrashWatcher.h | 2 +- src/kits/tracker/ViewState.h | 4 +-- ---------------------------------------------------------------------------- diff --git a/src/kits/tracker/AUTHORS b/src/kits/tracker/AUTHORS index 183f215..a000c92 100644 --- a/src/kits/tracker/AUTHORS +++ b/src/kits/tracker/AUTHORS @@ -7,4 +7,4 @@ Jeff Bush, Robert Chinn, Doug Fulton, Kenny Carruthers, -Dianne Hackborn \ No newline at end of file +Dianne Hackborn diff --git a/src/kits/tracker/AttributeStream.h b/src/kits/tracker/AttributeStream.h index f029ad1..21dfab8 100644 --- a/src/kits/tracker/AttributeStream.h +++ b/src/kits/tracker/AttributeStream.h @@ -79,7 +79,7 @@ public: AttributeInfo(const AttributeInfo &); AttributeInfo(const char*, attr_info); AttributeInfo(const char*, uint32, off_t); - + void SetTo(const AttributeInfo &); void SetTo(const char*, attr_info); void SetTo(const char*, uint32, off_t); @@ -186,7 +186,7 @@ protected: private: AttributeInfo fCurrentAttr; BNode* fNode; - + typedef AttributeStreamNode _inherited; }; @@ -224,7 +224,7 @@ protected: { delete [] fData; } - + AttributeInfo fAttr; char* fData; }; diff --git a/src/kits/tracker/Bitmaps.h b/src/kits/tracker/Bitmaps.h index c04331f..b32698c 100644 --- a/src/kits/tracker/Bitmaps.h +++ b/src/kits/tracker/Bitmaps.h @@ -87,7 +87,7 @@ public: private: image_id find_image(void* memAddr) const; - + mutable BLocker fLock; BResources fResources; }; diff --git a/src/kits/tracker/DeskWindow.h b/src/kits/tracker/DeskWindow.h index f2099df..d83a55a 100644 --- a/src/kits/tracker/DeskWindow.h +++ b/src/kits/tracker/DeskWindow.h @@ -67,9 +67,9 @@ public: void UpdateDesktopBackgroundImages(); // Desktop window has special background image handling - + void SaveDesktopPoseLocations(); - + protected: virtual void AddWindowContextMenus(BMenu*); virtual BPoseView* NewPoseView(Model*, BRect, uint32); @@ -84,7 +84,7 @@ private: BPopUpMenu* fTrashContextMenu; BRect fOldFrame; - + // in the desktop window addon shortcuts have to be added by AddShortcut // and we don't always get the MenusBeginning call to check for new // addons/update the shortcuts -- instead we need to node monitor the @@ -93,7 +93,7 @@ private: bool fShouldUpdateAddonShortcuts; std::set<uint32> fCurrentAddonShortcuts; // keeps track of which shortcuts are installed for Tracker addons - + typedef BContainerWindow _inherited; }; diff --git a/src/kits/tracker/DesktopPoseView.cpp b/src/kits/tracker/DesktopPoseView.cpp index 4a34df9..de9828a 100644 --- a/src/kits/tracker/DesktopPoseView.cpp +++ b/src/kits/tracker/DesktopPoseView.cpp @@ -271,11 +271,11 @@ DesktopPoseView::AdaptToDesktopIntegrationChange(BMessage* message) { bool mountVolumesOnDesktop = true; bool mountSharedVolumesOntoDesktop = true; - + message->FindBool("MountVolumesOntoDesktop", &mountVolumesOnDesktop); message->FindBool("MountSharedVolumesOntoDesktop", &mountSharedVolumesOntoDesktop); - + ShowVolumes(false, mountSharedVolumesOntoDesktop); ShowVolumes(mountVolumesOnDesktop, mountSharedVolumesOntoDesktop); } diff --git a/src/kits/tracker/DesktopPoseView.h b/src/kits/tracker/DesktopPoseView.h index 8d7ffad..a6c8731 100644 --- a/src/kits/tracker/DesktopPoseView.h +++ b/src/kits/tracker/DesktopPoseView.h @@ -31,7 +31,7 @@ of Be Incorporated in the United States and other countries. Other brand product names are registered trademarks or trademarks of their respective holders. All rights reserved. */ - + // DesktopPoseView adds support for displaying integrated desktops // from multiple volumes to BPoseView #ifndef _DESKTOP_POSE_VIEW_H diff --git a/src/kits/tracker/DialogPane.cpp b/src/kits/tracker/DialogPane.cpp index 06b6036..ececc64 100644 --- a/src/kits/tracker/DialogPane.cpp +++ b/src/kits/tracker/DialogPane.cpp @@ -505,7 +505,7 @@ PaneSwitch::DrawInState(PaneSwitch::State state) switch (state) { case kCollapsed: BeginLineArray(6); - + if (fLeftAligned) { AddLine(BPoint(rect.left + 3, rect.top + 1), BPoint(rect.left + 3, rect.bottom - 1), outlineColor); diff --git a/src/kits/tracker/DialogPane.h b/src/kits/tracker/DialogPane.h index c9d12a0..495ad7c 100644 --- a/src/kits/tracker/DialogPane.h +++ b/src/kits/tracker/DialogPane.h @@ -68,15 +68,15 @@ public: uint32 flags = B_WILL_DRAW); virtual ~DialogPane(); - + BRect FrameForMode(int32); BRect BoundsForMode(int32); - + int32 Mode() const; virtual void SetMode(int32, bool initialSetup = false); - + void AddItem(BView*, int32 toMode); - + void SetSwitch(BControl*); virtual void AttachedToWindow(); @@ -87,18 +87,18 @@ protected: // called only by the constructor virtual void MessageReceived(BMessage* message); - + private: int32 fMode; BRect fMode1Frame; BRect fMode2Frame; BRect fMode3Frame; - + ViewList fMode2Items; ViewList fMode3Items; BControl* fLatch; - + typedef BView _inherited; }; diff --git a/src/kits/tracker/FBCPadding.cpp b/src/kits/tracker/FBCPadding.cpp index 9b1ac45..20aef9e 100644 --- a/src/kits/tracker/FBCPadding.cpp +++ b/src/kits/tracker/FBCPadding.cpp @@ -145,6 +145,6 @@ SetPanelDirectory__10BFilePanelFP9entry_ref { self->SetPanelDirectory(r); } - + } #endif diff --git a/src/kits/tracker/FSClipboard.cpp b/src/kits/tracker/FSClipboard.cpp index ce90756..851ce4a 100644 --- a/src/kits/tracker/FSClipboard.cpp +++ b/src/kits/tracker/FSClipboard.cpp @@ -266,7 +266,7 @@ FSClipboardAddPoses(const node_ref* directory, PoseList* list, refsAdded++; } else { clip->RemoveName(modeName); - + clipNode.node = *node; clipNode.moveMode = kDelete; // note removing node updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, @@ -280,7 +280,7 @@ FSClipboardAddPoses(const node_ref* directory, PoseList* list, if (clip->AddRef(refName, model->EntryRef()) == B_OK && clip->AddInt32(modeName, (int32)moveMode) == B_OK) { pose->SetClipboardMode(moveMode); - + clipNode.node = *node; updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, &clipNode, sizeof(TClipboardNodeRef), true, @@ -422,7 +422,7 @@ FSClipboardPaste(Model* model, uint32 linksMode) uint32 newMoveMode = 0; bool sameDirectory = destNodeRef->device == ref.device && destNodeRef->node == ref.directory; - + if (!entry.Exists()) { // The entry doesn't exist anymore, so we'll remove // that entry from the clipboard as well @@ -567,7 +567,7 @@ FSClipboardFindNodeMode(Model* model, bool autoLock, bool updateRefIfNeeded) } if (change) be_clipboard->Commit(); - + if (autoLock) be_clipboard->Unlock(); @@ -744,7 +744,7 @@ BClipboardRefsWatcher::UpdateNode(node_ref* node, entry_ref* ref) clip->RemoveName(name); MakeModeName(name); clip->RemoveName(name); - + RemoveNode(node); } be_clipboard->Commit(); diff --git a/src/kits/tracker/FavoritesMenu.cpp b/src/kits/tracker/FavoritesMenu.cpp index 294448a..ba169b1 100644 --- a/src/kits/tracker/FavoritesMenu.cpp +++ b/src/kits/tracker/FavoritesMenu.cpp @@ -166,7 +166,7 @@ FavoritesMenu::AddNextItem() BMenuItem* item = BNavMenu::NewModelItem(&model, model.IsDirectory() ? fOpenFolderMessage : fOpenFileMessage, fTarget); - + if (item == NULL) return true; @@ -314,7 +314,7 @@ FavoritesMenu::ShouldShowModel(const Model* model) if (!fRefFilter || model->Node() == NULL) return true; - + struct stat_beos statBeOS; convert_to_stat_beos(model->StatBuf(), &statBeOS); diff --git a/src/kits/tracker/FavoritesMenu.h b/src/kits/tracker/FavoritesMenu.h index 2863534..496d77a 100644 --- a/src/kits/tracker/FavoritesMenu.h +++ b/src/kits/tracker/FavoritesMenu.h @@ -58,7 +58,7 @@ class FavoritesMenu : public BSlowMenu { BMessage* openFileMessage, const BMessenger &, bool isSavePanel, BRefFilter* filter = NULL); virtual ~FavoritesMenu(); - + void SetRefFilter(BRefFilter* filter); private: @@ -67,9 +67,9 @@ class FavoritesMenu : public BSlowMenu { virtual bool AddNextItem(); virtual void DoneBuildingItemList(); virtual void ClearMenuBuildingState(); - + bool ShouldShowModel(const Model* model); - + BMessage* fOpenFolderMessage; BMessage* fOpenFileMessage; BMessenger fTarget; diff --git a/src/kits/tracker/FindPanel.cpp b/src/kits/tracker/FindPanel.cpp index 939fb19..258f39b 100644 --- a/src/kits/tracker/FindPanel.cpp +++ b/src/kits/tracker/FindPanel.cpp @@ -219,7 +219,7 @@ FindWindow::FindWindow(const entry_ref* newRef, bool editIfTemplateOnly) fFromTemplate = IsQueryTemplate(fFile); - fBackground = new FindPanel(Bounds(), fFile, this, fFromTemplate, + fBackground = new FindPanel(Bounds(), fFile, this, fFromTemplate, fEditTemplateOnly); AddChild(fBackground); } diff --git a/src/kits/tracker/FunctionObject.h b/src/kits/tracker/FunctionObject.h index 9b53ae7..d3a4061 100644 --- a/src/kits/tracker/FunctionObject.h +++ b/src/kits/tracker/FunctionObject.h @@ -240,7 +240,7 @@ public: p3(p3) { } - + virtual void operator()() { (function)(p1.Pass(), p2.Pass(), p3.Pass()); } private: diff --git a/src/kits/tracker/GroupedMenu.cpp b/src/kits/tracker/GroupedMenu.cpp index 7d73de2..4b3323c 100644 --- a/src/kits/tracker/GroupedMenu.cpp +++ b/src/kits/tracker/GroupedMenu.cpp @@ -24,7 +24,7 @@ TMenuItemGroup::TMenuItemGroup(const char* name) TMenuItemGroup::~TMenuItemGroup() { free((char*)fName); - + if (fMenu == NULL) { BMenuItem* item; while ((item = RemoveItem((int32)0)) != NULL) diff --git a/src/kits/tracker/IconCache.cpp b/src/kits/tracker/IconCache.cpp index 8cf9d8e..d64e140 100644 --- a/src/kits/tracker/IconCache.cpp +++ b/src/kits/tracker/IconCache.cpp @@ -526,7 +526,7 @@ IconCache::GetIconFromFileTypes(ModelNodeLazyOpener* modelOpener, (SharedCacheEntry*)entry); // OK to cast here, have a runtime check source = kPreferredAppForNode; - // set source as preferred for node, so that next time we + // set source as preferred for node, so that next time we // get a hit in the initial find that uses // GetIconForPreferredApp } else diff --git a/src/kits/tracker/IconCache.h b/src/kits/tracker/IconCache.h index 9ca10f2..571489a 100644 --- a/src/kits/tracker/IconCache.h +++ b/src/kits/tracker/IconCache.h @@ -126,15 +126,15 @@ class IconCacheEntry { public: IconCacheEntry(); ~IconCacheEntry(); - + void SetAliasFor(const SharedIconCache*, const SharedCacheEntry*); static IconCacheEntry* ResolveIfAlias(const SharedIconCache*, IconCacheEntry*); IconCacheEntry* ResolveIfAlias(const SharedIconCache*); - + void SetIcon(BBitmap* bitmap, IconDrawMode mode, icon_size size, bool create = false); - + bool HaveIconBitmap(IconDrawMode mode, icon_size size) const; bool CanConstructBitmap(IconDrawMode mode, icon_size size) const; static bool AlternateModeForIconConstructing(IconDrawMode requestedMode, @@ -169,9 +169,9 @@ protected: BBitmap* fHilitedLargeIcon; BBitmap* fHilitedMiniIcon; int32 fAliasForIndex; - + // list of other icon kinds would be added here - + friend class SharedIconCache; friend class NodeIconCache; }; @@ -191,7 +191,7 @@ public: bool Lock(); void Unlock(); bool IsLocked() const; - + private: Benaphore fLock; }; @@ -210,7 +210,7 @@ public: const char* FileType() const; const char* AppSignature() const; - + // hash table support uint32 Hash() const; static uint32 Hash(const char* fileType, const char* appSignature = 0); @@ -277,19 +277,19 @@ public: NodeCacheEntry(const node_ref*, bool permanent = false); void Draw(BView*, BPoint, IconDrawMode mode, icon_size size, bool async = false); - + void Draw(BView*, BPoint, IconDrawMode, icon_size, void (*)(BView*, BPoint, BBitmap*, void*), void* = NULL); const node_ref* Node() const; - + uint32 Hash() const; static uint32 Hash(const node_ref*); bool operator==(const NodeCacheEntry&) const; void SetTo(const node_ref*); void MakePermanent(); bool Permanent() const; - + int32 fNext; private: node_ref fRef; @@ -348,7 +348,7 @@ const int32 kColorTransformTableSize = 256; class IconCache { public: IconCache(); - + void Draw(Model*, BView*, BPoint where, IconDrawMode mode, icon_size size, bool async = false); // draw an icon for a model, load the icon from the appropriate @@ -376,13 +376,13 @@ public: void Deleting(const BView*); // hook to manage deleting draw view caches for views that are // going away - + // icon changed calls, used when a node or a file type has an icon changed // the icons for the node/file type will be flushed and re-cached during // the next draw void IconChanged(Model*); void IconChanged(const char* mimeType, const char* appSignature); - + bool IsIconFrom(const Model*, const char* mimeType, const char* appSignature) const; // called when metamime database changed to figure out which models @@ -510,7 +510,7 @@ SharedIconCache::ResolveIfAlias(IconCacheEntry* entry) const { if (entry->fAliasForIndex < 0) return entry; - + return fHashTable.ElementAt(entry->fAliasForIndex); } diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp index b5c9840..f07c503 100644 --- a/src/kits/tracker/InfoWindow.cpp +++ b/src/kits/tracker/InfoWindow.cpp @@ -2129,7 +2129,7 @@ AttributeView::BuildContextMenu(BMenu* parent) parent->AddItem(new BMenuItem(B_TRANSLATE("Edit name"), new BMessage(kEditItem), 'E')); parent->AddSeparatorItem(); - + if (fModel->IsVolume()) { BMenuItem* item = new BMenuItem(B_TRANSLATE("Unmount"), new BMessage(kUnmountVolume), 'U'); diff --git a/src/kits/tracker/MiniMenuField.cpp b/src/kits/tracker/MiniMenuField.cpp index c67af40..27ac518 100644 --- a/src/kits/tracker/MiniMenuField.cpp +++ b/src/kits/tracker/MiniMenuField.cpp @@ -100,14 +100,14 @@ MiniMenuField::Draw(BRect) BRect rect(bounds); rect.right--; rect.bottom--; - + rgb_color darkest = tint_color(kBlack, 0.6f); rgb_color dark = tint_color(kBlack, 0.4f); rgb_color medium = dark; rgb_color light = tint_color(kBlack, 0.03f); - + SetHighColor(medium); - + // draw frame and shadow BeginLineArray(10); AddLine(rect.RightTop(), rect.RightBottom(), darkest); @@ -123,7 +123,7 @@ MiniMenuField::Draw(BRect) AddLine(rect.LeftTop(), rect.RightTop(), light); EndLineArray(); - + // draw triangle rect = BRect(5, 5, 15, 15); const rgb_color outlineColor = kBlack; diff --git a/src/kits/tracker/Navigator.cpp b/src/kits/tracker/Navigator.cpp index 5aff959..9f29594 100644 --- a/src/kits/tracker/Navigator.cpp +++ b/src/kits/tracker/Navigator.cpp @@ -85,7 +85,7 @@ BNavigatorButton::AttachedToWindow() &bmpOn); SetPicture(bmpOn, true, true); delete bmpOn; - + BBitmap* bmpOff = 0; GetTrackerResources()->GetBitmapResource(B_MESSAGE_TYPE, fResIDOff, &bmpOff); @@ -139,7 +139,7 @@ BNavigator::BNavigator(const Model* model, BRect rect, uint32 resizeMask) { // Get initial path model->GetPath(&fPath); - + SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); float top = 2 + (be_plain_font->Size() - 8) / 2; @@ -298,14 +298,14 @@ BNavigator::SendNavigationMessage(NavigationAction action, BEntry* entry, BMessage message; message.AddRef("refs", &ref); message.AddInt32("action", action); - + // get the node of this folder for selecting it in the new location const node_ref* nodeRef; if (Window() && Window()->TargetModel()) nodeRef = Window()->TargetModel()->NodeRef(); else nodeRef = NULL; - + // if the option key was held down, open in new window (send message // to be_app) otherwise send message to this window. TTracker // (be_app) understands nodeRefToSlection, BContainerWindow doesn't, @@ -361,7 +361,7 @@ BNavigator::GoTo() Window()->PostMessage(&message); } else { BPath path; - + if (Window() && Window()->TargetModel()) { Window()->TargetModel()->GetPath(&path); fLocation->SetText(path.Path()); diff --git a/src/kits/tracker/Navigator.h b/src/kits/tracker/Navigator.h index be31770..56fe2d4 100644 --- a/src/kits/tracker/Navigator.h +++ b/src/kits/tracker/Navigator.h @@ -68,9 +68,9 @@ class BNavigatorButton : public BPictureButton { public: BNavigatorButton(BRect rect, const char* name, BMessage* message, int32 resIDon, int32 resIDoff, int32 resIDdisabled); - + ~BNavigatorButton(); - + virtual void AttachedToWindow(); void SetPicture(BBitmap*, bool enabled, bool on); diff --git a/src/kits/tracker/NodePreloader.cpp b/src/kits/tracker/NodePreloader.cpp index d013338..dbea419 100644 --- a/src/kits/tracker/NodePreloader.cpp +++ b/src/kits/tracker/NodePreloader.cpp @@ -106,7 +106,7 @@ void NodePreloader::MessageReceived(BMessage* message) { // respond to node monitor notifications - + node_ref itemNode; switch (message->what) { case B_NODE_MONITOR: @@ -173,7 +173,7 @@ NodePreloader::PreloadOne(const char* dirPath) entry_ref ref; if (dir.GetNextRef(&ref) != B_OK) break; - + BEntry entry(&ref); if (!entry.IsFile()) // only interrested in files diff --git a/src/kits/tracker/NodeWalker.cpp b/src/kits/tracker/NodeWalker.cpp index e95ef66..b539644 100644 --- a/src/kits/tracker/NodeWalker.cpp +++ b/src/kits/tracker/NodeWalker.cpp @@ -258,7 +258,7 @@ status_t TNodeWalker::PopDirCommon() { ASSERT(fTopIndex >= 0); - + // done with the old dir, pop it fDirs.RemoveItemAt(fTopIndex); fTopIndex--; @@ -303,7 +303,7 @@ TNodeWalker::GetNextEntry(BEntry* entry, bool traverse) fIncludeTopDir = false; return fTopDir->GetEntry(entry); } - + // Get the next entry. status_t err = fTopDir->GetNextEntry(entry, traverse); @@ -346,7 +346,7 @@ TNodeWalker::GetNextRef(entry_ref* ref) err = entry.GetRef(ref); return err; } - + // Get the next entry. status_t err = fTopDir->GetNextRef(ref); if (err != B_OK) { @@ -370,7 +370,7 @@ build_dirent(const BEntry* source, struct dirent* ent, { entry_ref ref; source->GetRef(&ref); - + size_t recordLength = strlen(ref.name) + sizeof(dirent); if (recordLength > size || count <= 0) // can't fit in buffer, bail @@ -424,7 +424,7 @@ TNodeWalker::GetNextDirents(struct dirent* ent, size_t size, int32 count) return build_dirent(fJustFile, ent, size, count); } - + // Get the next entry. int32 result = fTopDir->GetNextDirents(ent, size, count); diff --git a/src/kits/tracker/NodeWalker.h b/src/kits/tracker/NodeWalker.h index f13f65e..8cf7638 100644 --- a/src/kits/tracker/NodeWalker.h +++ b/src/kits/tracker/NodeWalker.h @@ -57,7 +57,7 @@ class TWalker : public BEntryList { public: virtual ~TWalker(); - + virtual status_t GetNextEntry(BEntry*, bool traverse = false) = 0; virtual status_t GetNextRef(entry_ref*) = 0; virtual int32 GetNextDirents(struct dirent*, size_t, @@ -83,7 +83,7 @@ public: TNodeWalker(const char* path); TNodeWalker(const entry_ref* ref); TNodeWalker(const BDirectory* dir); - + virtual status_t GetNextEntry(BEntry*, bool traverse = false); virtual status_t GetNextRef(entry_ref*); virtual int32 GetNextDirents(struct dirent*, size_t, @@ -126,7 +126,7 @@ public: virtual int32 GetNextDirents(struct dirent*, size_t, int32 count = INT_MAX); virtual status_t Rewind(); - + virtual status_t NextVolume(); // skips to the next volume // Note: it would be cool to return const BVolume* @@ -150,13 +150,13 @@ class TQueryWalker : public TWalker { public: TQueryWalker(const char* predicate); virtual ~TQueryWalker(); - + // Does an in-fix walk of all entries virtual status_t GetNextEntry(BEntry*, bool traverse = false); virtual status_t GetNextRef(entry_ref*); virtual int32 GetNextDirents(struct dirent*, size_t, int32 count = INT_MAX); - + virtual status_t NextVolume(); // skips to the next volume virtual status_t Rewind(); @@ -164,7 +164,7 @@ public: private: virtual int32 CountEntries(); // can't count - + BQuery fQuery; BVolumeRoster fVolRoster; BVolume fVol; diff --git a/src/kits/tracker/OverrideAlert.cpp b/src/kits/tracker/OverrideAlert.cpp index b282b80..6c74d45 100644 --- a/src/kits/tracker/OverrideAlert.cpp +++ b/src/kits/tracker/OverrideAlert.cpp @@ -53,7 +53,7 @@ OverrideAlert::OverrideAlert(const char* title, const char* text, fButtonModifiers[1] = modifiers2; fButtonModifiers[2] = modifiers3; UpdateButtons(modifiers(), true); - + BPoint where = OverPosition(Frame().Width(), Frame().Height()); MoveTo(where.x, where.y); } @@ -71,7 +71,7 @@ OverrideAlert::OverrideAlert(const char* title, const char* text, fButtonModifiers[1] = modifiers2; fButtonModifiers[2] = modifiers3; UpdateButtons(modifiers(), true); - + BPoint where = OverPosition(Frame().Width(), Frame().Height()); MoveTo(where.x, where.y); } @@ -89,7 +89,7 @@ OverrideAlert::DispatchMessage(BMessage* message, BHandler* handler) || message->what == B_UNMAPPED_KEY_DOWN || message->what == B_UNMAPPED_KEY_UP) { uint32 modifiers; - if (message->FindInt32("modifiers", (int32*)&modifiers) == B_OK) + if (message->FindInt32("modifiers", (int32*)&modifiers) == B_OK) UpdateButtons(modifiers); } BAlert::DispatchMessage(message, handler); @@ -107,36 +107,36 @@ OverrideAlert::OverPosition(float width, float height) BRect screenFrame; BRect desirableRect; screenFrame = BScreen(window).Frame(); - + if (window) { // If we found a window associated with this calling thread, // place alert over that window so that the first button is // on top of it. This allows name editing confirmations to // work with focus follows mouse -- when the alert goes away, // the underlying window will still have focus. - + desirableRect = window->Frame(); float midX = (desirableRect.left + desirableRect.right) / 2.0f; float midY = (desirableRect.top * 3.0f + desirableRect.bottom) / 4.0f; - + desirableRect.left = midX - ceilf(width / 2.0f); desirableRect.right = desirableRect.left+width; desirableRect.top = midY - ceilf(height / 3.0f); desirableRect.bottom = desirableRect.top + height; - + } else { // Otherwise, just place alert in center of screen. - + desirableRect = screenFrame; float midX = (desirableRect.left + desirableRect.right) / 2.0f; float midY = (desirableRect.top * 3.0f + desirableRect.bottom) / 4.0f; - + desirableRect.left = midX - ceilf(width / 2.0f); desirableRect.right = desirableRect.left + width; desirableRect.top = midY - ceilf(height / 3.0f); desirableRect.bottom = desirableRect.top + height; } - + return desirableRect.LeftTop(); } @@ -146,7 +146,7 @@ OverrideAlert::UpdateButtons(uint32 modifiers, bool force) { if (modifiers == fCurModifiers && !force) return; - + fCurModifiers = modifiers; for (int32 i = 0; i < 3; i++) { BButton* button = ButtonAt(i); diff --git a/src/kits/tracker/Pose.cpp b/src/kits/tracker/Pose.cpp index 7befef5..88ddbc0 100644 --- a/src/kits/tracker/Pose.cpp +++ b/src/kits/tracker/Pose.cpp @@ -143,7 +143,7 @@ BPose::AddWidget(BPoseView* poseView, BColumn* column) BModelOpener opener(fModel); if (fModel->InitCheck() != B_OK) return NULL; - + BTextWidget* widget = new BTextWidget(fModel, column, poseView); fWidgetList.AddItem(widget); return widget; @@ -157,7 +157,7 @@ BPose::AddWidget(BPoseView* poseView, BColumn* column, opener.OpenNode(); if (fModel->InitCheck() != B_OK) return NULL; - + BTextWidget* widget = new BTextWidget(fModel, column, poseView); fWidgetList.AddItem(widget); return widget; @@ -494,7 +494,7 @@ BPose::PointInPose(const BPoseView* poseView, BPoint where) const return rect.Contains(where); } - + // MINI_ICON_MODE rect calc BRect rect(location, location); rect.right += B_MINI_ICON + kMiniIconSeparator; @@ -502,7 +502,7 @@ BPose::PointInPose(const BPoseView* poseView, BPoint where) const BTextWidget* widget = WidgetFor(poseView->FirstColumn()->AttrHash()); if (widget) rect.right += ceil(widget->TextWidth(poseView) + 1); - + return rect.Contains(where); } @@ -552,14 +552,14 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, return; } else fBackgroundClean = false; - + bool directDraw = (drawView == poseView); bool windowActive = poseView->Window()->IsActive(); bool showSelectionWhenInactive = poseView->fShowSelectionWhenInactive; bool isDrawingSelectionRect = poseView->fIsDrawingSelectionRect; - + ModelNodeLazyOpener modelOpener(fModel); - + if (poseView->ViewMode() == kListMode) { uint32 size = poseView->IconSizeInt(); BRect iconRect(rect); @@ -571,37 +571,37 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, DrawIcon(iconRect.LeftTop(), drawView, poseView->IconSize(), directDraw, !windowActive && !showSelectionWhenInactive); } - + // draw text int32 columnsToDraw = 1; if (fullDraw) columnsToDraw = poseView->CountColumns(); - + for (int32 index = 0; index < columnsToDraw; index++) { BColumn* column = poseView->ColumnAt(index); if (!column) break; - + // if widget doesn't exist, create it BTextWidget* widget = WidgetFor(column, poseView, modelOpener); - + if (widget && widget->IsVisible()) { BRect widgetRect(widget->ColumnRect(rect.LeftTop(), column, poseView)); - + if (updateRect.Intersects(widgetRect)) { BRect widgetTextRect(widget->CalcRect(rect.LeftTop(), column, poseView)); - + bool selectDuringDraw = directDraw && selected && windowActive; - + if (index == 0 && selectDuringDraw) { //draw with dark background to select text drawView->PushState(); drawView->SetLowColor(0, 0, 0); } - + if (index == 0) { widget->Draw(widgetRect, widgetTextRect, column->Width(), poseView, drawView, selected, @@ -611,7 +611,7 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, poseView, drawView, false, fClipboardMode, offset, directDraw); } - + if (index == 0 && selectDuringDraw) drawView->PopState(); else if (index == 0 && selected) { @@ -640,11 +640,11 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, DrawIcon(iconOrigin, drawView, poseView->IconSize(), directDraw, !windowActive && !showSelectionWhenInactive); - + BColumn* column = poseView->FirstColumn(); if (!column) return; - + BTextWidget* widget = WidgetFor(column, poseView, modelOpener); if (!widget || !widget->IsVisible()) return; @@ -653,7 +653,7 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, bool selectDuringDraw = directDraw && selected && (poseView->IsDesktopWindow() || windowActive); - + if (selectDuringDraw) { // draw with dark background to select text drawView->PushState(); @@ -698,7 +698,7 @@ BPose::DeselectWithoutErasingBackground(BRect, BPoseView* poseView) BColumn* column = poseView->FirstColumn(); if (!column) return; - + BTextWidget* widget = WidgetFor(column->AttrHash()); if (!widget || !widget->IsVisible()) return; diff --git a/src/kits/tracker/PoseList.cpp b/src/kits/tracker/PoseList.cpp index d90e7b0..b805827 100644 --- a/src/kits/tracker/PoseList.cpp +++ b/src/kits/tracker/PoseList.cpp @@ -126,7 +126,7 @@ PoseList::FindAllPoses(const node_ref* node) const result->AddItem(pose, 0); continue; } - + if (!model->IsSymLink()) continue; @@ -135,7 +135,7 @@ PoseList::FindAllPoses(const node_ref* node) const result->AddItem(pose); continue; } - + if (model == NULL) { Model model(pose->TargetModel()->EntryRef(), true); if (*model.NodeRef() == *node) diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index 23e356b..cda2c0e 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -8366,7 +8366,7 @@ BPoseView::OpenParent() void BPoseView::IdentifySelection(bool force) -{ +{ int32 count = fSelectionList->CountItems(); for (int32 index = 0; index < count; index++) { BPose* pose = fSelectionList->ItemAt(index); diff --git a/src/kits/tracker/PoseViewScripting.cpp b/src/kits/tracker/PoseViewScripting.cpp index 0d87eb2..cb9d299 100644 --- a/src/kits/tracker/PoseViewScripting.cpp +++ b/src/kits/tracker/PoseViewScripting.cpp @@ -214,7 +214,7 @@ BPoseView::GetSupportedSuites(BMessage* _SCRIPTING_ONLY(data)) BPropertyInfo propertyInfo( const_cast<property_info*>(kPosesPropertyList)); data->AddFlat("messages", &propertyInfo); - + return _inherited::GetSupportedSuites(data); #else return B_UNSUPPORTED; @@ -247,9 +247,9 @@ BPoseView::HandleScriptingMessage(BMessage* _SCRIPTING_ONLY(message)) if (result != B_OK || index == -1) return false; - + ASSERT(property); - + switch (message->what) { case B_CREATE_PROPERTY: handled = CreateProperty(message, &specifier, form, property, @@ -259,12 +259,12 @@ BPoseView::HandleScriptingMessage(BMessage* _SCRIPTING_ONLY(message)) case B_GET_PROPERTY: handled = GetProperty(&specifier, form, property, &reply); break; - + case B_SET_PROPERTY: handled = SetProperty(message, &specifier, form, property, &reply); break; - + case B_COUNT_PROPERTIES: handled = CountProperty(&specifier, form, property, &reply); break; @@ -272,7 +272,7 @@ BPoseView::HandleScriptingMessage(BMessage* _SCRIPTING_ONLY(message)) case B_DELETE_PROPERTY: handled = DeleteProperty(&specifier, form, property, &reply); break; - + case B_EXECUTE_PROPERTY: handled = ExecuteProperty(&specifier, form, property, &reply); break; @@ -300,7 +300,7 @@ BPoseView::ExecuteProperty(BMessage* _SCRIPTING_ONLY(specifier), bool handled = false; if (strcmp(property, kPropertyEntry) == 0) { BMessage launchMessage(B_REFS_RECEIVED); - + if (form == (int32)B_ENTRY_SPECIFIER) { // move all poses specified by entry_ref to Trash entry_ref ref; @@ -574,21 +574,21 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), entry_ref ref; if (specifier->FindRef("data", &ref) != B_OK) break; - + int32 poseIndex; BPose* pose = FindPose(&ref, &poseIndex); - + for (;;) { if (form == (int32)kPreviousSpecifier) pose = PoseAtIndex(--poseIndex); else if (form == (int32)kNextSpecifier) pose = PoseAtIndex(++poseIndex); - + if (!pose) { error = B_ENTRY_NOT_FOUND; break; } - + if (pose->IsSelected()) { reply->AddRef("result", pose->TargetModel()->EntryRef()); @@ -596,7 +596,7 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), break; } } - + handled = true; break; } @@ -622,7 +622,7 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), int32 index; if (specifier->FindInt32("index", &index) != B_OK) break; - + if (!PoseAtIndex(index)) { error = B_BAD_INDEX; handled = true; @@ -643,7 +643,7 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), entry_ref ref; if (specifier->FindRef("data", &ref) != B_OK) break; - + int32 tmp; BPose* pose = FindPose(&ref, form, &tmp); @@ -652,7 +652,7 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), handled = true; break; } - + reply->AddRef("result", pose->TargetModel()->EntryRef()); reply->AddInt32("index", IndexOfPose(pose)); @@ -661,7 +661,7 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), } } } - + if (error != B_OK) reply->AddInt32("error", error); diff --git a/src/kits/tracker/QueryPoseView.cpp b/src/kits/tracker/QueryPoseView.cpp index b74a3a9..30723ce 100644 --- a/src/kits/tracker/QueryPoseView.cpp +++ b/src/kits/tracker/QueryPoseView.cpp @@ -264,20 +264,20 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref) fQueryListContainer = new QueryEntryListCollection(&sourceModel, this, oldPoseList); fCreateOldPoseList = false; - + if (fQueryListContainer->InitCheck() != B_OK) { delete fQueryListContainer; fQueryListContainer = NULL; return NULL; } - + fShowResultsFromTrash = fQueryListContainer->ShowResultsFromTrash(); TTracker::WatchNode(sourceModel.NodeRef(), B_WATCH_NAME | B_WATCH_STAT | B_WATCH_ATTR, this); fQueryList = fQueryListContainer->QueryList(); - + if (fQueryListContainer->DynamicDateQuery()) { // calculate the time to trigger the query refresh - next midnight @@ -328,7 +328,7 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref) PRINT(("%" B_PRId32 " hours, %" B_PRId32 " minutes, %" B_PRId32 " seconds till midnight\n", hoursTillMidnight, minutesTillMidnight, secondsTillMidnight)); - + int32 refreshInSeconds = delta % 60; int32 refreshInMinutes = delta / 60; int32 refreshInHours = refreshInMinutes / 60; @@ -348,7 +348,7 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref) NewLockingMemberFunctionObject(&BQueryPoseView::Refresh, this), delta); } - + return fQueryListContainer->Clone(); } @@ -603,7 +603,7 @@ status_t QueryEntryListCollection::GetNextEntry(BEntry* entry, bool traverse) { status_t result = B_ERROR; - + for (int32 count = fQueryListRep->fQueryList->CountItems(); fQueryListRep->fQueryListIndex < count; fQueryListRep->fQueryListIndex++) { @@ -641,7 +641,7 @@ status_t QueryEntryListCollection::GetNextRef(entry_ref* ref) { status_t result = B_ERROR; - + for (int32 count = fQueryListRep->fQueryList->CountItems(); fQueryListRep->fQueryListIndex < count; fQueryListRep->fQueryListIndex++) { @@ -660,7 +660,7 @@ status_t QueryEntryListCollection::Rewind() { fQueryListRep->fQueryListIndex = 0; - + return B_OK; } diff --git a/src/kits/tracker/RecentItems.h b/src/kits/tracker/RecentItems.h index 7bfb60c..b40655e 100644 --- a/src/kits/tracker/RecentItems.h +++ b/src/kits/tracker/RecentItems.h @@ -103,7 +103,7 @@ public: const char* ofType = NULL, const char* openedByAppSig = NULL); BRecentFilesList(int32 maxItems, bool navMenuFolders, const char* ofTypeList[], int32 ofTypeListCount, - const char* openedByAppSig = NULL); + const char* openedByAppSig = NULL); virtual ~BRecentFilesList(); // use one of the two NewFileListMenu calls to get an entire menu diff --git a/src/kits/tracker/RegExp.cpp b/src/kits/tracker/RegExp.cpp index bad5947..15cf7b8 100644 --- a/src/kits/tracker/RegExp.cpp +++ b/src/kits/tracker/RegExp.cpp @@ -108,7 +108,7 @@ const uint8 kRegExpMagic = 0234; // of node is a literal string; for others, it is a node leading into a // sub-FSM. In particular, the operand of a kRegExpBranch node is the first // node of the branch. (NB this is* not* a tree structure: the tail of the -// branch connects to the thing following the set of kRegExpBranches). +// branch connects to the thing following the set of kRegExpBranches). // The opcodes are: // diff --git a/src/kits/tracker/RegExp.h b/src/kits/tracker/RegExp.h index 699e0d6..f1021e1 100644 --- a/src/kits/tracker/RegExp.h +++ b/src/kits/tracker/RegExp.h @@ -108,12 +108,12 @@ public: RegExp(const char*); RegExp(const BString&); ~RegExp(); - + status_t InitCheck() const; - + status_t SetTo(const char*); status_t SetTo(const BString &); - + bool Matches(const char* string) const; bool Matches(const BString &) const; diff --git a/src/kits/tracker/Settings.cpp b/src/kits/tracker/Settings.cpp index 99df1bb..0c20b53 100644 --- a/src/kits/tracker/Settings.cpp +++ b/src/kits/tracker/Settings.cpp @@ -97,7 +97,7 @@ StringValueSetting::Handle(const char* const* argv) { if (!*++argv) return fValueExpectedErrorString; - + ValueChanged(*argv); return 0; } diff --git a/src/kits/tracker/SettingsHandler.cpp b/src/kits/tracker/SettingsHandler.cpp index 32f4fb8..ca42949 100644 --- a/src/kits/tracker/SettingsHandler.cpp +++ b/src/kits/tracker/SettingsHandler.cpp @@ -91,7 +91,7 @@ ArgvParser::MakeArgvEmpty() // done with current argv, free it up for (int32 index = 0; index < fArgc; index++) delete[] fCurrentArgv[index]; - + fArgc = 0; } @@ -125,7 +125,7 @@ ArgvParser::NextArgv() } fCurrentArgs[++fCurrentArgsPos] = '\0'; // terminate current arg pos - + // copy it as a string to the current argv slot fCurrentArgv[fArgc] = new char [strlen(fCurrentArgs) + 1]; strcpy(fCurrentArgv[fArgc], fCurrentArgs); @@ -409,7 +409,7 @@ Settings::MakeSettingsDirectory(BDirectory* resultingSettingsDir) BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path, true) != B_OK) return; - + // make sure there is a directory // mkdir() will only make one leaf at a time, unfortunately path.Append(fSettingsDir); diff --git a/src/kits/tracker/SettingsHandler.h b/src/kits/tracker/SettingsHandler.h index 6b959f2..6f5a1c8 100644 --- a/src/kits/tracker/SettingsHandler.h +++ b/src/kits/tracker/SettingsHandler.h @@ -85,7 +85,7 @@ private: FILE* fFile; char* fBuffer; int32 fPos; - + int fArgc; char** fCurrentArgv; @@ -108,7 +108,7 @@ public: virtual ~SettingsArgvDispatcher() {}; void SaveSettings(Settings* settings, bool onlyIfNonDefault); - + const char* Name() const { return name; } // name as it appears in the settings file diff --git a/src/kits/tracker/SlowContextPopup.cpp b/src/kits/tracker/SlowContextPopup.cpp index 814ba39..5b1a423 100644 --- a/src/kits/tracker/SlowContextPopup.cpp +++ b/src/kits/tracker/SlowContextPopup.cpp @@ -134,7 +134,7 @@ BSlowContextMenu::SetNavDir(const entry_ref* ref) { ForceRebuild(); // reset the slow menu building mechanism so we can add more stuff - + fNavDir = *ref; } @@ -188,7 +188,7 @@ BSlowContextMenu::AddDynamicItem(add_state state) { if (fMenuBuilt) return false; - + if (state == B_ABORT) { ClearMenuBuildingState(); return false; @@ -229,7 +229,7 @@ BSlowContextMenu::StartBuildingItemList() } fIteratingDesktop = false; - + BDirectory parent; status_t err = entry.GetParent(&parent); fItemList = new BObjectList<BMenuItem>(50); @@ -308,7 +308,7 @@ BSlowContextMenu::AddNextItem() BuildVolumeMenu(); return false; } - + // limit nav menus to 500 items only if (fItemList->CountItems() > 500) return false; @@ -332,7 +332,7 @@ BSlowContextMenu::AddNextItem() } model.CloseNode(); - + if (!BPoseView::PoseVisible(&model, &poseInfo)) { return true; } @@ -367,7 +367,7 @@ BSlowContextMenu::NewModelItem(Model* model, const BMessage* invokeMessage, entry_ref ref; bool container = false; if (model->IsSymLink()) { - + Model* newResolvedModel = NULL; Model* result = model->LinkTo(); @@ -379,21 +379,21 @@ BSlowContextMenu::NewModelItem(Model* model, const BMessage* invokeMessage, delete newResolvedModel; newResolvedModel = NULL; } - + result = newResolvedModel; } if (result) { BModelOpener opener(result); // open the model, if it ain't open already - + PoseInfo poseInfo; - + if (result->Node()) { result->Node()->ReadAttr(kAttrPoseInfo, B_RAW_TYPE, 0, &poseInfo, sizeof(poseInfo)); } - + result->CloseNode(); ref = *result->EntryRef(); @@ -421,7 +421,7 @@ BSlowContextMenu::NewModelItem(Model* model, const BMessage* invokeMessage, } else { BNavMenu* menu = new BNavMenu(truncatedString.String(), invokeMessage->what, target, parentWindow, typeslist); - + menu->SetNavDir(&ref); if (hook) menu->InitTrackingHook(hook->fTrackingHook, &(hook->fTarget), @@ -443,10 +443,10 @@ BSlowContextMenu::BuildVolumeMenu() roster.Rewind(); while (roster.GetNextVolume(&volume) == B_OK) { - + if (!volume.IsPersistent()) continue; - + BDirectory startDir; if (volume.GetRootDirectory(&startDir) == B_OK) { BEntry entry; @@ -457,7 +457,7 @@ BSlowContextMenu::BuildVolumeMenu() delete model; continue; } - + BNavMenu* menu = new BNavMenu(model->Name(), fMessage.what, fMessenger, fParentWindow, fTypesList); diff --git a/src/kits/tracker/SlowContextPopup.h b/src/kits/tracker/SlowContextPopup.h index c29769b..31fac10 100644 --- a/src/kits/tracker/SlowContextPopup.h +++ b/src/kits/tracker/SlowContextPopup.h @@ -50,9 +50,9 @@ public: virtual void DetachedFromWindow(); void SetNavDir(const entry_ref*); - + void ClearMenu(); - + void ForceRebuild(); bool NeedsToRebuild() const; // will cause menu to get rebuilt next time it is shown diff --git a/src/kits/tracker/SlowMenu.cpp b/src/kits/tracker/SlowMenu.cpp index 45a4f52..7077a5f 100644 --- a/src/kits/tracker/SlowMenu.cpp +++ b/src/kits/tracker/SlowMenu.cpp @@ -52,7 +52,7 @@ BSlowMenu::AddDynamicItem(add_state state) { if (fMenuBuilt) return false; - + if (state == B_ABORT) { ClearMenuBuildingState(); return false; diff --git a/src/kits/tracker/TaskLoop.h b/src/kits/tracker/TaskLoop.h index 5282ef8..e5c0014 100644 --- a/src/kits/tracker/TaskLoop.h +++ b/src/kits/tracker/TaskLoop.h @@ -69,7 +69,7 @@ class OneShotDelayedTask : public DelayedTask { public: OneShotDelayedTask(FunctionObject* functor, bigtime_t delay); virtual ~OneShotDelayedTask(); - + virtual bool RunIfNeeded(bigtime_t currentTime); protected: @@ -196,7 +196,7 @@ protected: bool Pulse(); // return true if quitting bigtime_t LatestRunTime() const; - + virtual bool KeepPulsingWhenEmpty() const = 0; virtual void StartPulsingIfNeeded() = 0; @@ -226,7 +226,7 @@ private: volatile bool fNeedToQuit; volatile thread_id fScanThread; bool fKeepThread; - + typedef TaskLoop _inherited; }; @@ -243,7 +243,7 @@ public: private: virtual bool KeepPulsingWhenEmpty() const; virtual void StartPulsingIfNeeded(); - + bigtime_t fNextHeartBeatTime; bool fPulseMe; }; diff --git a/src/kits/tracker/TemplatesMenu.cpp b/src/kits/tracker/TemplatesMenu.cpp index 20dfc36..eda9ced 100644 --- a/src/kits/tracker/TemplatesMenu.cpp +++ b/src/kits/tracker/TemplatesMenu.cpp @@ -164,7 +164,7 @@ TemplatesMenu::BuildMenu(bool addItems) entry_ref ref; entry.GetRef(&ref); - + BMessage* message = new BMessage(kNewEntryFromTemplate); message->AddRef("refs_template", &ref); message->AddString("name", fileName); diff --git a/src/kits/tracker/TextWidget.cpp b/src/kits/tracker/TextWidget.cpp index 1713031..8a63e86 100644 --- a/src/kits/tracker/TextWidget.cpp +++ b/src/kits/tracker/TextWidget.cpp @@ -229,7 +229,7 @@ BTextWidget::CheckExpiration() get_click_speed(&doubleClickSpeed); bigtime_t delta = system_time() - fLastClickedTime; - + if (delta > doubleClickSpeed) { // at least 'doubleClickSpeed' microseconds ellapsed and no click // was registered since. @@ -278,7 +278,7 @@ BTextWidget::MouseUp(BRect bounds, BPoseView* view, BPose* pose, BPoint) fParams.pose = pose; fParams.bounds = bounds; - fParams.poseView = view; + fParams.poseView = view; } else fLastClickedTime = 0; } diff --git a/src/kits/tracker/TextWidget.h b/src/kits/tracker/TextWidget.h index 1c3e9df..6571ec1 100644 --- a/src/kits/tracker/TextWidget.h +++ b/src/kits/tracker/TextWidget.h @@ -66,7 +66,7 @@ public: // and current drawing view are different void MouseUp(BRect bounds, BPoseView*, BPose*, BPoint mouseLoc); - + BRect CalcRect(BPoint poseLoc, const BColumn*, const BPoseView*); // returns the rect derived from the formatted string width // may force WidgetAttributeText recalculation @@ -79,7 +79,7 @@ public: BRect CalcOldRect(BPoint poseLoc, const BColumn*, const BPoseView*); // after an update call this to determine the old rect so that // we can invalidate properly - + void StartEdit(BRect bounds, BPoseView*, BPose*); void StopEdit(bool saveChanges, BPoint loc, BPoseView*, BPose*, int32 index); @@ -104,7 +104,7 @@ public: void CheckExpiration(); void CancelWait(); - + private: BRect CalcRectCommon(BPoint poseLoc, const BColumn*, const BPoseView*, float width); @@ -118,7 +118,7 @@ private: bool fVisible : 1; bool fActive : 1; bool fSymLink : 1; - + bigtime_t fLastClickedTime; struct MouseUpParams fParams; }; diff --git a/src/kits/tracker/TitleView.cpp b/src/kits/tracker/TitleView.cpp index a0838d9..471e9b1 100644 --- a/src/kits/tracker/TitleView.cpp +++ b/src/kits/tracker/TitleView.cpp @@ -235,7 +235,7 @@ BTitleView::Draw(BRect /*updateRect*/, bool useOffscreen, bool updateOnly, // fill background with light gray background if (!updateOnly) view->FillRect(bounds, B_SOLID_LOW); - + view->BeginLineArray(4); view->AddLine(bounds.LeftTop(), bounds.RightTop(), sShadowColor); view->AddLine(bounds.LeftBottom(), bounds.RightBottom(), @@ -399,7 +399,7 @@ BTitleView::MouseMoved(BPoint where, uint32 code, const BMessage* message) else SetViewCursor(B_CURSOR_SYSTEM_DEFAULT); break; - + case B_EXITED_VIEW: SetViewCursor(B_CURSOR_SYSTEM_DEFAULT); break; @@ -546,10 +546,10 @@ BColumnTitle::Draw(BView* view, bool pressed) triangle[1] = center + BPoint(3.5, -1.5); triangle[2] = center + BPoint(0.0, 2.0); } - + uint32 flags = view->Flags(); view->SetFlags(flags | B_SUBPIXEL_PRECISE); - + if (secondary) { view->SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), 1.3)); @@ -559,7 +559,7 @@ BColumnTitle::Draw(BView* view, bool pressed) 1.6)); view->FillTriangle(triangle[0], triangle[1], triangle[2]); } - + view->SetFlags(flags); } @@ -579,7 +579,7 @@ BColumnTitle::Draw(BView* view, bool pressed) pressed ? sLightShadowColor : sLightShadowColor); view->AddLine(rect.LeftTop(), rect.RightTop(), pressed ? sDarkShadowColor : sShineColor); - + view->AddLine(rect.LeftTop(), rect.LeftBottom(), pressed ? sDarkShadowColor : sShineColor); view->AddLine(rect.RightTop(), rect.RightBottom(), @@ -820,7 +820,7 @@ ColumnDragState::Moved(BPoint where, uint32) } else drawOutline = true; } - + if (drawOutline) DrawOutline(where.x - fInitialMouseTrackOffset); else if (undrawOutline) @@ -845,7 +845,7 @@ ColumnDragState::Clicked(BPoint /*where*/) uint32 primarySort = poseView->PrimarySort(); uint32 secondarySort = poseView->SecondarySort(); bool shift = (modifiers() & B_SHIFT_KEY) != 0; - + // For now: // if we hit the primary sort field again // then if shift key was down, switch primary and secondary diff --git a/src/kits/tracker/TitleView.h b/src/kits/tracker/TitleView.h index 9df1d20..9ad50f2 100644 --- a/src/kits/tracker/TitleView.h +++ b/src/kits/tracker/TitleView.h @@ -85,7 +85,7 @@ public: protected: void MouseMoved(BPoint, uint32, const BMessage*); - + private: BColumnTitle* FindColumnTitle(BPoint) const; BColumnTitle* InColumnResizeArea(BPoint) const; @@ -100,7 +100,7 @@ private: ColumnTrackState* fTrackingState; static OffscreenBitmap* sOffscreen; - + typedef BView _inherited; friend class ColumnTrackState; @@ -112,7 +112,7 @@ class BColumnTitle { public: BColumnTitle(BTitleView*, BColumn*); virtual ~BColumnTitle() {} - + virtual void Draw(BView*, bool pressed = false); BColumn* Column() const; diff --git a/src/kits/tracker/Tracker.cpp b/src/kits/tracker/Tracker.cpp index e327762..021fff7 100644 --- a/src/kits/tracker/Tracker.cpp +++ b/src/kits/tracker/Tracker.cpp @@ -233,7 +233,7 @@ TTracker::TTracker() setrlimit(RLIMIT_NOFILE, &rl); fNodeMonitorCount = DEFAULT_MON_NUM; - + gLocalizedNamePreferred = BLocaleRoster::Default()->IsFilesystemTranslationPreferred(); diff --git a/src/kits/tracker/TrackerScripting.cpp b/src/kits/tracker/TrackerScripting.cpp index 421b054..86ea02d 100644 --- a/src/kits/tracker/TrackerScripting.cpp +++ b/src/kits/tracker/TrackerScripting.cpp @@ -237,7 +237,7 @@ TTracker::DeleteProperty(BMessage* /*specifier*/, int32 form, if (form != B_DIRECT_SPECIFIER) // only support direct specifier return false; - + // empty the trash FSEmptyTrash(); return true; @@ -293,11 +293,11 @@ bool TTracker::ExecuteProperty(BMessage*, int32 form, const char* property, BMessage*) { if (strcmp(property, kPropertyPreferences) == 0) { - + if (form != B_DIRECT_SPECIFIER) // only support direct specifier return false; - + ShowSettingsWindow(); return true; diff --git a/src/kits/tracker/TrackerSettings.h b/src/kits/tracker/TrackerSettings.h index efec805..78f2f33 100644 --- a/src/kits/tracker/TrackerSettings.h +++ b/src/kits/tracker/TrackerSettings.h @@ -76,7 +76,7 @@ class TrackerSettings { void SetMountSharedVolumesOntoDesktop(bool); bool EjectWhenUnmounting(); void SetEjectWhenUnmounting(bool); - + bool ShowVolumeSpaceBar(); void SetShowVolumeSpaceBar(bool); rgb_color UsedSpaceColor(); @@ -85,7 +85,7 @@ class TrackerSettings { void SetFreeSpaceColor(rgb_color color); rgb_color WarningSpaceColor(); void SetWarningSpaceColor(rgb_color color); - + bool ShowFullPathInTitleBar(); void SetShowFullPathInTitleBar(bool); bool SortFolderNamesFirst(); diff --git a/src/kits/tracker/TrackerSettingsWindow.cpp b/src/kits/tracker/TrackerSettingsWindow.cpp index 4be73c1..66267a6 100644 --- a/src/kits/tracker/TrackerSettingsWindow.cpp +++ b/src/kits/tracker/TrackerSettingsWindow.cpp @@ -195,12 +195,12 @@ TrackerSettingsWindow::_ViewAt(int32 i) { if (!Lock()) return NULL; - + SettingsItem* item = dynamic_cast<SettingsItem*> (fSettingsTypeListView->ItemAt(i)); - + Unlock(); - + return item->View(); } @@ -227,7 +227,7 @@ TrackerSettingsWindow::_UpdateButtons() defaultable |= _ViewAt(i)->IsDefaultable(); revertable |= _ViewAt(i)->IsRevertable(); } - + fDefaultsButton->SetEnabled(defaultable); fRevertButton->SetEnabled(revertable); } @@ -237,7 +237,7 @@ void TrackerSettingsWindow::_HandlePressedDefaultsButton() { int32 itemCount = fSettingsTypeListView->CountItems(); - + for (int32 i = 0; i < itemCount; i++) { if (_ViewAt(i)->IsDefaultable()) _ViewAt(i)->SetDefaults(); diff --git a/src/kits/tracker/TrackerString.cpp b/src/kits/tracker/TrackerString.cpp index 175c1c9..201c449 100644 --- a/src/kits/tracker/TrackerString.cpp +++ b/src/kits/tracker/TrackerString.cpp @@ -73,13 +73,13 @@ TrackerString::Matches(const char* string, bool caseSensitivity, default: case kNone: return false; - + case kStartsWith: return StartsWith(string, caseSensitivity); - + case kEndsWith: return EndsWith(string, caseSensitivity); - + case kContains: return Contains(string, caseSensitivity); @@ -97,14 +97,14 @@ TrackerString::MatchesRegExp(const char* pattern, bool caseSensitivity) const { BString patternString(pattern); BString textString(String()); - + if (caseSensitivity == false) { patternString.ToLower(); textString.ToLower(); } - + RegExp expression(patternString); - + if (expression.InitCheck() != B_OK) return false; @@ -127,7 +127,7 @@ TrackerString::EndsWith(const char* string, bool caseSensitivity) const int32 position = Length() - (int32)strlen(string); if (position < 0) return false; - + if (caseSensitivity) return FindLast(string) == position; else @@ -442,7 +442,7 @@ TrackerString::MatchesBracketExpression(const char* string, bool inverse = *pattern == '^' || *pattern == '!'; // We allow both ^ and ! as a initial inverting character. - + if (inverse) pattern++; @@ -533,7 +533,7 @@ TrackerString::StringMatchesPattern(const char* string, const char* pattern, string = MoveToEndOfGlyph(string); } } - + if (*pattern == '\0') { // An ending * matches all strings. return true; @@ -588,7 +588,7 @@ TrackerString::StringMatchesPattern(const char* string, const char* pattern, } break; } - + case '[': pattern++; @@ -603,7 +603,7 @@ TrackerString::StringMatchesPattern(const char* string, const char* pattern, // Skip the rest of the bracket: while (*pattern != ']' && *pattern != '\0') pattern++; - + // Failure if no closing bracket; if (*pattern == '\0') return false; diff --git a/src/kits/tracker/TrackerString.h b/src/kits/tracker/TrackerString.h index 0fb890c..be9929f 100644 --- a/src/kits/tracker/TrackerString.h +++ b/src/kits/tracker/TrackerString.h @@ -70,7 +70,7 @@ public: bool MatchesRegExp(const char*, bool caseSensitivity = true) const; bool MatchesRegExp(const RegExp&) const; bool MatchesRegExp(const RegExp*) const; - + bool MatchesGlob(const char*, bool caseSensitivity = false) const; bool EndsWith(const char*, bool caseSensitivity = false) const; bool StartsWith(const char*, bool caseSensitivity = false) const; @@ -106,13 +106,13 @@ private: // Not counting start! bool IsStartOfGlyph(char) const; const char* MoveToEndOfGlyph(const char*) const; - + // Functions for Glob matching: bool MatchesBracketExpression(const char* string, const char* pattern, bool caseSensitivity) const; bool StringMatchesPattern(const char* string, const char* pattern, bool caseSensitivity) const; - + char ConditionalToLower(char c, bool toLower) const; bool CharsAreEqual(char char1, char char2, bool toLower) const; bool UTF8CharsAreEqual(const char* string1, const char* string2) const; @@ -124,7 +124,7 @@ TrackerString::MatchesRegExp(const RegExp* expression) const { if (expression == NULL || expression->InitCheck() != B_OK) return false; - + return expression->Matches(*this); } @@ -134,7 +134,7 @@ TrackerString::MatchesRegExp(const RegExp &expression) const { if (expression.InitCheck() != B_OK) return false; - + return expression.Matches(*this); } diff --git a/src/kits/tracker/TrashWatcher.cpp b/src/kits/tracker/TrashWatcher.cpp index c5ce5a7..7143fbb 100644 --- a/src/kits/tracker/TrashWatcher.cpp +++ b/src/kits/tracker/TrashWatcher.cpp @@ -172,7 +172,7 @@ BTrashWatcher::UpdateTrashIcons() const void* vectorData = GetTrackerResources()->LoadResource( B_VECTOR_ICON_TYPE, fTrashFull ? R_TrashFullIcon : R_TrashIcon, &vectorSize); - + if (vectorData) { trashDir.WriteAttr(kAttrIcon, B_VECTOR_ICON_TYPE, 0, vectorData, vectorSize); @@ -185,7 +185,7 @@ BTrashWatcher::UpdateTrashIcons() largeData, largeSize); } else TRESPASS(); - + if (smallData) { trashDir.WriteAttr(kAttrMiniIcon, 'MICN', 0, smallData, smallSize); diff --git a/src/kits/tracker/TrashWatcher.h b/src/kits/tracker/TrashWatcher.h index 789666a..ef0e2d3 100644 --- a/src/kits/tracker/TrashWatcher.h +++ b/src/kits/tracker/TrashWatcher.h @@ -53,7 +53,7 @@ public: protected: virtual void MessageReceived(BMessage*); - + private: void WatchTrashDirs(); void UpdateTrashIcons(); diff --git a/src/kits/tracker/ViewState.h b/src/kits/tracker/ViewState.h index 8284a28..40484e3 100644 --- a/src/kits/tracker/ViewState.h +++ b/src/kits/tracker/ViewState.h @@ -151,10 +151,10 @@ class BViewState { uint32 fPrimarySortType; uint32 fSecondarySortType; bool fReverseSort; - + void _Init(); void _StorePreviousState(); - + uint32 fPreviousViewMode; uint32 fPreviousLastIconMode; uint32 fPreviousIconSize;