diff --git a/src/qtgui/reslist.cpp b/src/qtgui/reslist.cpp index b249011b..ef7190dd 100644 --- a/src/qtgui/reslist.cpp +++ b/src/qtgui/reslist.cpp @@ -885,10 +885,8 @@ void ResList::linkWasClicked(const QUrl &url) LOGERR(("ResList::linkWasClicked: can't get doc for %d\n", i)); return; } - Rcl::Doc pdoc; - pdoc.url = url_parentfolder(doc.url); - pdoc.mimetype = "inode/directory"; - emit editRequested(pdoc); + emit editRequested(ResultPopup::getParent(RefCntr(), + doc)); } break; diff --git a/src/qtgui/respopup.cpp b/src/qtgui/respopup.cpp index bd3385b1..4c7e10ab 100644 --- a/src/qtgui/respopup.cpp +++ b/src/qtgui/respopup.cpp @@ -120,7 +120,7 @@ Rcl::Doc getParent(RefCntr source, Rcl::Doc& doc) if (source.isNull() || !source->getEnclosing(doc, pdoc)) { // No parent doc: show enclosing folder with app configured for // directories - pdoc.url = path_getfather(doc.url); + pdoc.url = url_parentfolder(doc.url); pdoc.meta[Rcl::Doc::keychildurl] = doc.url; pdoc.meta[Rcl::Doc::keyapptg] = "parentopen"; pdoc.mimetype = "inode/directory"; diff --git a/src/qtgui/restable.cpp b/src/qtgui/restable.cpp index 4a1317a8..1e169dea 100644 --- a/src/qtgui/restable.cpp +++ b/src/qtgui/restable.cpp @@ -767,10 +767,8 @@ void ResTable::linkWasClicked(const QUrl &url) // Open parent folder case 'F': { - Rcl::Doc pdoc; - pdoc.url = url_parentfolder(m_detaildoc.url); - pdoc.mimetype = "inode/directory"; - emit editRequested(pdoc); + emit editRequested(ResultPopup::getParent(RefCntr(), + m_detaildoc)); } break; diff --git a/src/query/reslistpager.cpp b/src/query/reslistpager.cpp index f10c4e8b..c8519c82 100644 --- a/src/query/reslistpager.cpp +++ b/src/query/reslistpager.cpp @@ -179,7 +179,14 @@ void ResListPager::displayDoc(RclConfig *config, int i, Rcl::Doc& doc, titleOrFilename = utf8fn; } + // Url for the parent directory. We strip the file:// part for local + // paths string parenturl = url_parentfolder(url); + { + string localpath = fileurltolocalpath(parenturl); + if (!localpath.empty()) + parenturl = localpath; + } // Result number char numbuf[20];