actions: consider jumping to parent dir runnable even on root level
This commit is contained in:
@@ -639,9 +639,9 @@ void ToggleInterface::Run()
|
|||||||
|
|
||||||
bool JumpToParentDir::canBeRun() const
|
bool JumpToParentDir::canBeRun() const
|
||||||
{
|
{
|
||||||
return (myScreen == myBrowser && myBrowser->CurrentDir() != "/")
|
return (myScreen == myBrowser)
|
||||||
# ifdef HAVE_TAGLIB_H
|
# ifdef HAVE_TAGLIB_H
|
||||||
|| (myScreen->ActiveWindow() == myTagEditor->Dirs && myTagEditor->CurrentDir() != "/")
|
|| (myScreen->ActiveWindow() == myTagEditor->Dirs)
|
||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@@ -650,14 +650,20 @@ void JumpToParentDir::Run()
|
|||||||
{
|
{
|
||||||
if (myScreen == myBrowser)
|
if (myScreen == myBrowser)
|
||||||
{
|
{
|
||||||
myBrowser->Main()->reset();
|
if (myBrowser->CurrentDir() != "/")
|
||||||
myBrowser->EnterPressed();
|
{
|
||||||
|
myBrowser->Main()->reset();
|
||||||
|
myBrowser->EnterPressed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# ifdef HAVE_TAGLIB_H
|
# ifdef HAVE_TAGLIB_H
|
||||||
else if (myScreen == myTagEditor)
|
else if (myScreen == myTagEditor)
|
||||||
{
|
{
|
||||||
myTagEditor->Dirs->reset();
|
if (myTagEditor->CurrentDir() != "/")
|
||||||
myTagEditor->EnterPressed();
|
{
|
||||||
|
myTagEditor->Dirs->reset();
|
||||||
|
myTagEditor->EnterPressed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user