Skip to content

Commit

Permalink
!3 feat: Support GXDE Compressor
Browse files Browse the repository at this point in the history
Merge pull request !3 from shenmo/master
  • Loading branch information
shenmo7192 authored and gitee-org committed Dec 1, 2024
2 parents 0af573c + 3f0c28e commit e03f69e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 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
3 changes: 2 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dde-file-manager (4.8.28) UNRELEASED; urgency=medium
dde-file-manager (4.8.28-1) UNRELEASED; urgency=medium

[ shenmo ]
* 去除桌面右键全选功能
Expand All @@ -7,6 +7,7 @@ dde-file-manager (4.8.28) 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 e03f69e

Please sign in to comment.