Tracker: style fixes to TrashWatcher
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user