If moved to Trash, close window.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32972 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
#include <TextView.h>
|
#include <TextView.h>
|
||||||
#include <NodeMonitor.h>
|
#include <NodeMonitor.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
#include <Volume.h>
|
||||||
|
|
||||||
#include "PeopleApp.h"
|
#include "PeopleApp.h"
|
||||||
#include "PeopleView.h"
|
#include "PeopleView.h"
|
||||||
@@ -223,6 +224,20 @@ TPeopleWindow::MessageReceived(BMessage* msg)
|
|||||||
|
|
||||||
// And our window title.
|
// And our window title.
|
||||||
SetTitle(name);
|
SetTitle(name);
|
||||||
|
|
||||||
|
// If moved to Trash, close window.
|
||||||
|
BVolume volume(device);
|
||||||
|
BPath trash;
|
||||||
|
find_directory(B_TRASH_DIRECTORY, &trash, false,
|
||||||
|
&volume);
|
||||||
|
BPath folder(fRef);
|
||||||
|
folder.GetParent(&folder);
|
||||||
|
if (folder == trash) {
|
||||||
|
delete fRef;
|
||||||
|
fRef = NULL;
|
||||||
|
PostMessage(B_QUIT_REQUESTED);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user