From 53d82f97cab68bf445193e87ca64e4238d9e109d Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Mon, 24 Jul 2023 06:01:32 -0400 Subject: [PATCH] Another various changes required by Flatpak --- .github/workflows/ubuntu-6.2.yml | 2 +- .github/workflows/ubuntu.yml | 2 +- CMakeLists.txt | 2 +- ...op => io.github.xiayifang.goldendict_ng.desktop} | 0 .../io.github.xiayifang.goldendict_ng.metainfo.xml | 13 +++++++++++-- src/ui/mainwindow.cc | 3 ++- 6 files changed, 16 insertions(+), 6 deletions(-) rename redist/{org.xiaoyifang.GoldenDict_NG.desktop => io.github.xiayifang.goldendict_ng.desktop} (100%) diff --git a/.github/workflows/ubuntu-6.2.yml b/.github/workflows/ubuntu-6.2.yml index 794f3537..71f881f8 100644 --- a/.github/workflows/ubuntu-6.2.yml +++ b/.github/workflows/ubuntu-6.2.yml @@ -109,7 +109,7 @@ jobs: chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" chmod a+x linuxdeploy-x86_64.AppImage - ./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/org.xiaoyifang.GoldenDict_NG.desktop + ./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/io.github.xiayifang.goldendict_ng.desktop - name: changelog id: changelog diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index c41adae3..d7bfb13e 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -93,7 +93,7 @@ jobs: chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" chmod a+x linuxdeploy-x86_64.AppImage - ./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/org.xiaoyifang.GoldenDict_NG.desktop + ./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage --plugin qt -i redist/icons/goldendict.png -d redist/io.github.xiayifang.goldendict_ng.desktop - name: changelog id: changelog diff --git a/CMakeLists.txt b/CMakeLists.txt index ad6616ea..d49dd48e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,7 +191,7 @@ if (APPLE) endif () if (LINUX OR BSD) - install(FILES ${CMAKE_SOURCE_DIR}/redist/org.xiaoyifang.GoldenDict_NG.desktop DESTINATION share/applications) + install(FILES ${CMAKE_SOURCE_DIR}/redist/io.github.xiayifang.goldendict_ng.desktop DESTINATION share/applications) install(FILES ${CMAKE_SOURCE_DIR}/redist/io.github.xiayifang.goldendict_ng.metainfo.xml DESTINATION share/metainfo) install(FILES ${CMAKE_SOURCE_DIR}/redist/icons/goldendict.png DESTINATION share/pixmaps) diff --git a/redist/org.xiaoyifang.GoldenDict_NG.desktop b/redist/io.github.xiayifang.goldendict_ng.desktop similarity index 100% rename from redist/org.xiaoyifang.GoldenDict_NG.desktop rename to redist/io.github.xiayifang.goldendict_ng.desktop diff --git a/redist/io.github.xiayifang.goldendict_ng.metainfo.xml b/redist/io.github.xiayifang.goldendict_ng.metainfo.xml index ba2f0486..487fef05 100644 --- a/redist/io.github.xiayifang.goldendict_ng.metainfo.xml +++ b/redist/io.github.xiayifang.goldendict_ng.metainfo.xml @@ -5,7 +5,12 @@ CC0-1.0 GPL-3.0-or-later GoldenDict-NG - Dictionary lookup program + Advanced dictionary lookup program + + Education + Dictionary + Languages +

GoldenDict-ng is a feature-rich dictionary lookup program, supporting multiple @@ -26,8 +31,12 @@ https://xiaoyifang.github.io/goldendict-ng/ + https://xiaoyifang.github.io/goldendict-ng/ + https://github.com/xiaoyifang/goldendict-ng/issues + https://github.com/xiaoyifang/goldendict-ng/discussions + https://github.com/xiaoyifang/goldendict-ng https://github.com/xiaoyifang/goldendict-ng - org.xiaoyifang.GoldenDict_NG.desktop + io.github.xiayifang.goldendict_ng.desktop org.goldendict_ng.desktop diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index a6cbeed3..aa89e204 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -3088,7 +3088,8 @@ void MainWindow::setAutostart( bool autostart ) if ( autostart == QFile::exists( destinationPath ) ) return; // Nothing to do. if ( autostart ) { - const QString sourcePath = Config::getProgramDataDir() + "../applications/org.xiaoyifang.GoldenDict_NG.desktop"; + const QString sourcePath = + Config::getProgramDataDir() + "../applications/io.github.xiayifang.goldendict_ng.desktop"; QFile::copy( sourcePath, destinationPath ); } else