Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/gui/filedetails/FileDetailsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ Page {
onClicked: swipeView.currentIndex = shareViewLoader.swipeIndex
visible: root.fileDetails.sharingAvailable
}

NCTabButton {
width: visible ? implicitWidth : 0
height: visible ? implicitHeight : 0
svgCustomColorSource: "image://svgimage-custom-color/files.svg"
text: qsTr("Show in file manager")
onClicked: root.fileDetails.showInFileManager()
}
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/gui/filedetails/filedetails.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

#include "accountstate.h"
#include "filedetails.h"
#include "filesystem.h"
#include "folderman.h"
#include "openfilemanager.h"

namespace OCC {

Expand Down Expand Up @@ -91,6 +93,13 @@ void FileDetails::setLocalPath(const QString &localPath)
Q_EMIT fileChanged();
}

void FileDetails::showInFileManager() const
{
if (FileSystem::fileExists(_localPath)) {
OCC::showInFileManager(_localPath);
}
}

QString FileDetails::name() const
{
return _fileInfo.fileName();
Expand Down
1 change: 1 addition & 0 deletions src/gui/filedetails/filedetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class FileDetails : public QObject

public slots:
void setLocalPath(const QString &localPath);
void showInFileManager() const;

signals:
void localPathChanged();
Expand Down