Tracker: allow opening the desktop as a window in navigator mode.
Fixes #9610.
This commit is contained in:
@@ -189,8 +189,7 @@ BNavigator::GoUp(bool option)
|
|||||||
BEntry entry;
|
BEntry entry;
|
||||||
if (entry.SetTo(fPath.Path()) == B_OK) {
|
if (entry.SetTo(fPath.Path()) == B_OK) {
|
||||||
BEntry parentEntry;
|
BEntry parentEntry;
|
||||||
if (entry.GetParent(&parentEntry) == B_OK
|
if (entry.GetParent(&parentEntry) == B_OK) {
|
||||||
&& !FSIsDeskDir(&parentEntry)) {
|
|
||||||
SendNavigationMessage(kActionUp, &parentEntry, option);
|
SendNavigationMessage(kActionUp, &parentEntry, option);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -266,7 +265,6 @@ BNavigator::GoTo()
|
|||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
|
|
||||||
if (entry.SetTo(pathname.String()) == B_OK
|
if (entry.SetTo(pathname.String()) == B_OK
|
||||||
&& !FSIsDeskDir(&entry)
|
|
||||||
&& entry.GetRef(&ref) == B_OK) {
|
&& entry.GetRef(&ref) == B_OK) {
|
||||||
BMessage message(kSwitchDirectory);
|
BMessage message(kSwitchDirectory);
|
||||||
message.AddRef("refs", &ref);
|
message.AddRef("refs", &ref);
|
||||||
@@ -317,8 +315,7 @@ BNavigator::UpdateLocation(const Model* newmodel, int32 action)
|
|||||||
BEntry entry;
|
BEntry entry;
|
||||||
if (entry.SetTo(fPath.Path()) == B_OK) {
|
if (entry.SetTo(fPath.Path()) == B_OK) {
|
||||||
BEntry parentEntry;
|
BEntry parentEntry;
|
||||||
bool enable = entry.GetParent(&parentEntry) == B_OK
|
bool enable = entry.GetParent(&parentEntry) == B_OK;
|
||||||
&& !FSIsDeskDir(&parentEntry);
|
|
||||||
SetActionEnabled(kNavigatorCommandUp, enable);
|
SetActionEnabled(kNavigatorCommandUp, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user