Tracker: style fixes to TrashWatcher

This commit is contained in:
John Scipione
2014-06-20 21:29:58 -04:00
parent 22b073d41f
commit e29e8b3b27
2 changed files with 18 additions and 10 deletions
+14 -8
View File
@@ -33,12 +33,10 @@ All rights reserved.
*/ */
#include "Attributes.h"
#include "Bitmaps.h"
#include "FSUtils.h"
#include "Tracker.h"
#include "TrashWatcher.h" #include "TrashWatcher.h"
#include <string.h>
#include <Debug.h> #include <Debug.h>
#include <Directory.h> #include <Directory.h>
#include <NodeMonitor.h> #include <NodeMonitor.h>
@@ -46,11 +44,18 @@ All rights reserved.
#include <Volume.h> #include <Volume.h>
#include <VolumeRoster.h> #include <VolumeRoster.h>
#include <string.h> #include "Attributes.h"
#include "Bitmaps.h"
#include "FSUtils.h"
#include "Tracker.h"
// #pragma mark - BTrashWatcher
BTrashWatcher::BTrashWatcher() BTrashWatcher::BTrashWatcher()
: BLooper("TrashWatcher", B_LOW_PRIORITY), :
BLooper("TrashWatcher", B_LOW_PRIORITY),
fTrashNodeList(20, true) fTrashNodeList(20, true)
{ {
FSCreateTrashDirs(); FSCreateTrashDirs();
@@ -109,8 +114,9 @@ BTrashWatcher::MessageReceived(BMessage* message)
message->FindInt64("to directory", &toDir); message->FindInt64("to directory", &toDir);
if (fromDir == toDir) if (fromDir == toDir)
break; break;
} // fall thru }
case B_DEVICE_UNMOUNTED: // fall thru // fall-through
case B_DEVICE_UNMOUNTED:
case B_ENTRY_REMOVED: case B_ENTRY_REMOVED:
{ {
bool full = CheckTrashDirs(); bool full = CheckTrashDirs();
+4 -2
View File
@@ -36,7 +36,8 @@ All rights reserved.
#include <Looper.h> #include <Looper.h>
#include "ObjectList.h" #include <ObjectList.h>
#include <Node.h>
namespace BPrivate { namespace BPrivate {
@@ -52,7 +53,7 @@ public:
bool IsTrashNode(const node_ref*) const; bool IsTrashNode(const node_ref*) const;
protected: protected:
virtual void MessageReceived(BMessage*); virtual void MessageReceived(BMessage*);
private: private:
void WatchTrashDirs(); void WatchTrashDirs();
@@ -68,4 +69,5 @@ private:
using namespace BPrivate; using namespace BPrivate;
#endif // _TRASH_WATCHER_H #endif // _TRASH_WATCHER_H