Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gfdgd-xi committed Dec 22, 2024
2 parents b8c4b00 + e03f69e commit 32d00b9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
18 changes: 9 additions & 9 deletions dde-file-manager-lib/controllers/filecontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,53 +391,53 @@ bool FileController::openFileByApp(const QSharedPointer<DFMOpenFileByAppEvent> &

bool FileController::compressFiles(const QSharedPointer<DFMCompressEvent> &event) const
{
if (findExecutable("file-roller")) {
if (findExecutable("gxde-compressor")) {
QStringList args;
args << "-d";
foreach (DUrl url, event->urlList()) {
args << url.toLocalFile();
}
qDebug() << args;
bool result = QProcess::startDetached("file-roller", args);
bool result = QProcess::startDetached("gxde-compressor", args);
return result;
} else {
qDebug() << "file-roller is not installed";
qDebug() << "gxde-compressor is not installed";
}

return false;
}

bool FileController::decompressFile(const QSharedPointer<DFMDecompressEvent> &event) const
{
if (findExecutable("file-roller")) {
if (findExecutable("gxde-compressor")) {
QStringList args;
args << "-f";
for (auto it : event->urlList()) {
args << it.toLocalFile();
}
qDebug() << args;
bool result = QProcess::startDetached("file-roller", args);
bool result = QProcess::startDetached("gxde-compressor", args);
return result;
} else {
qDebug() << "file-roller is not installed";
qDebug() << "gxde-compressor is not installed";
}

return false;
}

bool FileController::decompressFileHere(const QSharedPointer<DFMDecompressEvent> &event) const
{
if (findExecutable("file-roller")) {
if (findExecutable("gxde-compressor")) {
QStringList args;
args << "-h";
for (auto it : event->urlList()) {
args << it.toLocalFile();
}
qDebug() << args;
bool result = QProcess::startDetached("file-roller", args);
bool result = QProcess::startDetached("gxde-compressor", args);
return result;
} else {
qDebug() << "file-roller is not installed";
qDebug() << "gxde-compressor is not installed";
}

return false;
Expand Down
1 change: 1 addition & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dde-file-manager (4.8.29) UNRELEASED; urgency=medium
* 视频预览更改为libgxmr实现
* 推更 重新编译
* 修复 依赖fantascene
* 新增 依赖 gxde-compressor

[ gfdgd_xi ]
* 文件管理器支持格式化本地磁盘
Expand Down
3 changes: 2 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ Depends:
libdtkwidget2,
libdtkcore2,
libdisomaster,
libisoburn1
libisoburn1,
gxde-compressor,
Recommends: dde-qt5integration, avfs, samba
Description: File manager front end
File manager front-end of Deepin OS
Expand Down

0 comments on commit 32d00b9

Please sign in to comment.