Compare commits

...
3 Commits
Author SHA1 Message Date
yyc12345 821e0f9fd6 revert: remove passoc support on Windows.
- remove passoc executable support on Windows.
- but preserve the icons created by upstream for future expanding.
2026-07-02 15:48:56 +08:00
yyc12345 26f51e418d ci: remove deepin 25 support
This partially reverts commit afcd126c00.

This fork do not need to preserve the support to deepin.
So I simply remove its CI.
2026-07-02 15:48:55 +08:00
yyc12345 cd2eac44f1 revert: revert feature about saving image as new file with different format.
This reverts commit 5b2255e903.

The feature about saving image as new file with different format is not the goal of an image viewer.
There is no need to keep feature diversity in this fork.
So I simply remove it.
2026-07-02 15:48:50 +08:00
8 changed files with 0 additions and 239 deletions
-35
View File
@@ -1,35 +0,0 @@
name: deepin 25 CI
on: [push, pull_request, workflow_dispatch]
jobs:
build-deepin-25-deb:
runs-on: ubuntu-latest
container:
image: linuxdeepin/deepin:crimson
options: --user root
steps:
- name: Update package lists and install basic tools
run: |
apt update
apt install -y git ca-certificates curl file
- uses: actions/checkout@v6
- name: Get build dept.
run: |
apt install -y cmake qt6-base-dev qt6-svg-dev qt6-tools-dev libexiv2-dev
- name: Build it
run: |
git config --global --add safe.directory '*' # to avoid "fatal: detected dubious ownership in repository at xxx"
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .
cmake --build build -j
cd build
cpack -G DEB
- name: Try install it
run: |
cd build
apt install -y ./*.deb
- uses: actions/upload-artifact@v6
with:
name: deepin-25-deb-package
path: build/*.deb
-4
View File
@@ -125,10 +125,6 @@ jobs:
cmake --build build --config Release cmake --build build --config Release
cmake --install build --config Release --prefix "%PWD%\build" cmake --install build --config Release --prefix "%PWD%\build"
echo ::endgroup:: echo ::endgroup::
echo ::group::===== passoc stuff =====
curl -fsSL -o passoc-standalone.zip https://github.com/BLumia/pineapple-assoc-manager/releases/latest/download/pineapple-assoc-manager-qt${{ matrix.qt_ver }}-standalone.zip
7z x passoc-standalone.zip passoc.exe -y -o"build/bin"
echo ::endgroup::
:: ------ pkg ------ :: ------ pkg ------
windeployqt --verbose=2 --no-compiler-runtime --no-quick-import --no-translations --no-network --no-opengl-sw --no-system-d3d-compiler --no-system-dxc-compiler --skip-plugin-types tls,networkinformation build\bin\ppic.exe windeployqt --verbose=2 --no-compiler-runtime --no-quick-import --no-translations --no-network --no-opengl-sw --no-system-d3d-compiler --no-system-dxc-compiler --skip-plugin-types tls,networkinformation build\bin\ppic.exe
robocopy ./dependencies_bin/bin build/bin *.dll robocopy ./dependencies_bin/bin build/bin *.dll
-6
View File
@@ -271,12 +271,6 @@ if (DEFINED QM_FILE_INSTALL_DIR)
endif() endif()
if (WIN32) if (WIN32)
install(
FILES dist/passoc/ppic.pacfg
DESTINATION ${CMAKE_INSTALL_BINDIR}
RENAME default-assoc.pacfg
)
install( install(
FILES FILES
dist/passoc/generic.ico dist/passoc/generic.ico
-3
View File
@@ -55,7 +55,6 @@ void ActionManager::setupAction(MainWindow *mainWindow)
CREATE_NEW_ACTION(mainWindow, actionAnimationNextFrame); CREATE_NEW_ACTION(mainWindow, actionAnimationNextFrame);
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionOpen, document-open); CREATE_NEW_THEMEICON_ACTION(mainWindow, actionOpen, document-open);
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionSaveAs, document-save-as);
CREATE_NEW_ACTION(mainWindow, actionHorizontalFlip); CREATE_NEW_ACTION(mainWindow, actionHorizontalFlip);
CREATE_NEW_ACTION(mainWindow, actionFitInView); CREATE_NEW_ACTION(mainWindow, actionFitInView);
CREATE_NEW_ACTION(mainWindow, actionFitByWidth); CREATE_NEW_ACTION(mainWindow, actionFitByWidth);
@@ -85,7 +84,6 @@ void ActionManager::retranslateUi(MainWindow *mainWindow)
Q_UNUSED(mainWindow); Q_UNUSED(mainWindow);
actionOpen->setText(QCoreApplication::translate("MainWindow", "&Open...", nullptr)); actionOpen->setText(QCoreApplication::translate("MainWindow", "&Open...", nullptr));
actionSaveAs->setText(QCoreApplication::translate("MainWindow", "Save &As...", nullptr));
actionActualSize->setText(QCoreApplication::translate("MainWindow", "Actual size", nullptr)); actionActualSize->setText(QCoreApplication::translate("MainWindow", "Actual size", nullptr));
actionToggleMaximize->setText(QCoreApplication::translate("MainWindow", "Toggle maximize", nullptr)); actionToggleMaximize->setText(QCoreApplication::translate("MainWindow", "Toggle maximize", nullptr));
@@ -131,7 +129,6 @@ void ActionManager::retranslateUi(MainWindow *mainWindow)
void ActionManager::setupShortcuts() void ActionManager::setupShortcuts()
{ {
actionOpen->setShortcut(QKeySequence::Open); actionOpen->setShortcut(QKeySequence::Open);
actionSaveAs->setShortcut(QKeySequence::SaveAs);
actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0)); actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
actionZoomIn->setShortcut(QKeySequence::ZoomIn); actionZoomIn->setShortcut(QKeySequence::ZoomIn);
actionZoomOut->setShortcut(QKeySequence::ZoomOut); actionZoomOut->setShortcut(QKeySequence::ZoomOut);
-1
View File
@@ -23,7 +23,6 @@ public:
public: public:
QAction *actionOpen; QAction *actionOpen;
QAction *actionSaveAs;
QAction *actionActualSize; QAction *actionActualSize;
QAction *actionToggleMaximize; QAction *actionToggleMaximize;
-71
View File
@@ -38,7 +38,6 @@
#include <QProcess> #include <QProcess>
#include <QDesktopServices> #include <QDesktopServices>
#include <QMessageBox> #include <QMessageBox>
#include <QImageWriter>
#ifdef HAVE_QTDBUS #ifdef HAVE_QTDBUS
#include <QDBusInterface> #include <QDBusInterface>
@@ -506,12 +505,6 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
menu->addAction(paste); menu->addAction(paste);
} }
#if 0
if (currentFileUrl.isValid()) {
menu->addAction(m_am->actionSaveAs);
}
#endif // 0
menu->addSeparator(); menu->addSeparator();
menu->addAction(m_am->actionHorizontalFlip); menu->addAction(m_am->actionHorizontalFlip);
@@ -704,70 +697,6 @@ void MainWindow::on_actionOpen_triggered()
} }
} }
void MainWindow::on_actionSaveAs_triggered()
{
QUrl currentFileUrl = currentImageFileUrl();
if (!currentFileUrl.isValid()) {
QMessageBox::warning(this, tr("Save As"), tr("No image is currently open."));
return;
}
QStringList supportedFormats;
QStringList nameFilters;
const QList<QByteArray> imageFormats = QImageWriter::supportedImageFormats();
for (const QByteArray &format : imageFormats) {
QString formatStr = QString::fromLatin1(format).toLower();
if (!formatStr.isEmpty()) {
supportedFormats << formatStr;
nameFilters << tr("%1 Image (*.%2)").arg(formatStr.toUpper(), formatStr);
}
}
if (imageFormats.isEmpty()) {
QMessageBox::warning(this, tr("Save As"),
tr("No supported image formats are available."));
return;
}
QString selectedFilter;
QString saveFilePath = QFileDialog::getSaveFileName(this,
tr("Save As"),
QStandardPaths::writableLocation(QStandardPaths::PicturesLocation),
nameFilters.join(";;"),
&selectedFilter);
if (saveFilePath.isEmpty()) {
return; // User cancelled
}
// Ensure the file has the correct extension
QString expectedExtension;
const int filterIndex = nameFilters.indexOf(selectedFilter);
if (filterIndex != -1) {
expectedExtension = supportedFormats.at(filterIndex);
}
if (!expectedExtension.isEmpty() && !saveFilePath.endsWith('.' + expectedExtension, Qt::CaseInsensitive)) {
saveFilePath += '.' + expectedExtension;
}
// Save the image
QImageReader imageReader(currentFileUrl.toLocalFile());
imageReader.setAutoTransform(true);
imageReader.setDecideFormatFromContent(true);
imageReader.setAllocationLimit(0);
QImage img(imageReader.read());
QImageWriter writer(saveFilePath);
writer.setFormat(expectedExtension.toLatin1());
if (!writer.write(img)) {
QMessageBox::warning(this, tr("Save As"),
tr("Failed to save image: %1").arg(writer.errorString()));
return;
}
}
void MainWindow::on_actionActualSize_triggered() void MainWindow::on_actionActualSize_triggered()
{ {
m_graphicsView->resetScale(); m_graphicsView->resetScale();
-1
View File
@@ -75,7 +75,6 @@ protected:
private slots: private slots:
void on_actionOpen_triggered(); void on_actionOpen_triggered();
void on_actionSaveAs_triggered();
void on_actionActualSize_triggered(); void on_actionActualSize_triggered();
void on_actionToggleMaximize_triggered(); void on_actionToggleMaximize_triggered();
-118
View File
@@ -1,118 +0,0 @@
targetApp=ppic.exe
friendlyAppName=Pineapple Pictures
friendlyAppName[zh_CN]=菠萝看图
openCommand="\"{targetAppFullPath}\" \"%1\""
[ProgId/jpeg]
name=JPEG Image
name[zh_CN]=JPEG 图像
extensions=jpg,jpeg,jfif
[ProgId/gif]
name=GIF Animation Image
name[zh_CN]=GIF 动图
[ProgId/png]
name=PNG Image
name[zh_CN]=PNG 图像
[ProgId/svg]
name=Scalable Vector Graphics
name[zh_CN]=可缩放矢量图像
[ProgId/webp]
name=WebP Image
name[zh_CN]=WebP 图像
extensions=webp
[ProgId/avif]
name=AV1 Image File
name[zh_CN]=AV1 图像文件
[ProgId/ico]
name=Windows Icon Image
name[zh_CN]=Windows 图标图像
[ProgId/icns]
name=Apple Icon Image
name[zh_CN]=苹果图标图像
[ProgId/psd]
name=Photoshop Document
name[zh_CN]=Photoshop 文档
extensions=psd,psb,pdd,psdt
[ProgId/kra]
name=Krita Document
name[zh_CN]=Krita 文档
[ProgId/xcf]
name=GIMP Document
name[zh_CN]=GIMP 文档
[ProgId/tga]
name=TARGA Image
name[zh_CN]=TARGA 图像
[ProgId/tif]
name=Tagged Image File Format
name[zh_CN]=标签图像文件格式
extensions=tif,tiff
[ProgId/bmp]
name=Bitmap
name[zh_CN]=位图
[ProgId/wbmp]
name=Wireless Bitmap
name[zh_CN]=无线位图
[ProgId/dds]
name=DirectDraw Surface
[ProgId/hdr]
name=High Dynamic Range Image
name[zh_CN]=高动态范围图像
[ProgId/iff]
name=Interchange File Format
name[zh_CN]=可交换文件格式
[ProgId/pic]
name=Softimage Picture
name[zh_CN]=Softimage 图像
[ProgId/pcx]
name=PiCture eXchange PC Paintbrush Image
name[zh_CN]=PC Paintbrush 图像
[ProgId/qoi]
name=Quite OK Image
name[zh_CN]=挺 OK 图像
[ProgId/ras]
name=Sun Raster Image
name[zh_CN]=Sun 栅格图象
extensions=ras,sun
[ProgId/ora]
name=OpenRaster Image
name[zh_CN]=OpenRaster 图象
[ProgId/ani]
name=Animated Cursor
name[zh_CN]=动态光标
[ProgId/pfm]
name=Portable Float Map
extensions=pfm,phm
[ProgId/rgb]
name=Silicon Graphics Image
extensions=rgb,rgba,bw,sgi
[ProgId/pxr]
name=Pixar Raster Image
[ProgId/sct]
name=Scitex Continuous Tone