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
|
||||
{
|
||||
return (myScreen == myBrowser && myBrowser->CurrentDir() != "/")
|
||||
return (myScreen == myBrowser)
|
||||
# ifdef HAVE_TAGLIB_H
|
||||
|| (myScreen->ActiveWindow() == myTagEditor->Dirs && myTagEditor->CurrentDir() != "/")
|
||||
|| (myScreen->ActiveWindow() == myTagEditor->Dirs)
|
||||
# endif // HAVE_TAGLIB_H
|
||||
;
|
||||
}
|
||||
@@ -649,16 +649,22 @@ bool JumpToParentDir::canBeRun() const
|
||||
void JumpToParentDir::Run()
|
||||
{
|
||||
if (myScreen == myBrowser)
|
||||
{
|
||||
if (myBrowser->CurrentDir() != "/")
|
||||
{
|
||||
myBrowser->Main()->reset();
|
||||
myBrowser->EnterPressed();
|
||||
}
|
||||
}
|
||||
# ifdef HAVE_TAGLIB_H
|
||||
else if (myScreen == myTagEditor)
|
||||
{
|
||||
if (myTagEditor->CurrentDir() != "/")
|
||||
{
|
||||
myTagEditor->Dirs->reset();
|
||||
myTagEditor->EnterPressed();
|
||||
}
|
||||
}
|
||||
# endif // HAVE_TAGLIB_H
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user