From d0b2349156d7425a8c1b15b3e3070414f7ca9a5c Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Wed, 17 May 2023 19:56:17 -0400 Subject: [PATCH] update .desktop and appstream xml --- CMakeLists.txt | 6 +-- redist/org.goldendict.GoldenDict.metainfo.xml | 42 ------------------- ...p => org.xiaoyifang.GoldenDict_NG.desktop} | 6 ++- .../org.xiaoyifang.GoldenDict_NG.metainfo.xml | 35 ++++++++++++++++ src/ui/mainwindow.cc | 2 +- 5 files changed, 44 insertions(+), 47 deletions(-) delete mode 100644 redist/org.goldendict.GoldenDict.metainfo.xml rename redist/{org.goldendict.GoldenDict.desktop => org.xiaoyifang.GoldenDict_NG.desktop} (62%) create mode 100644 redist/org.xiaoyifang.GoldenDict_NG.metainfo.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index 632cb9bf..6e240199 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,8 +168,8 @@ if (APPLE) endif () if (LINUX OR BSD) - install(FILES ${CMAKE_SOURCE_DIR}/redist/org.goldendict.GoldenDict.desktop DESTINATION share/applications) - install(FILES ${CMAKE_SOURCE_DIR}/redist/org.goldendict.GoldenDict.metainfo.xml DESTINATION share/metainfo) + install(FILES ${CMAKE_SOURCE_DIR}/redist/org.xiaoyifang.GoldenDict_NG.desktop DESTINATION share/applications) + install(FILES ${CMAKE_SOURCE_DIR}/redist/org.xiaoyifang.GoldenDict_NG.metainfo.xml DESTINATION share/metainfo) install(FILES ${CMAKE_SOURCE_DIR}/redist/icons/goldendict.png DESTINATION share/pixmaps) @@ -178,4 +178,4 @@ endif () qt_finalize_target(${GOLDENDICT}) -feature_summary(WHAT ALL DESCRIPTION "Build configuration:") \ No newline at end of file +feature_summary(WHAT ALL DESCRIPTION "Build configuration:") diff --git a/redist/org.goldendict.GoldenDict.metainfo.xml b/redist/org.goldendict.GoldenDict.metainfo.xml deleted file mode 100644 index 356cf438..00000000 --- a/redist/org.goldendict.GoldenDict.metainfo.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - org.goldendict.GoldenDict - CC0-1.0 - GPL-3.0-or-later - GoldenDict - Dictionary lookup program - -

- GoldenDict is a feature-rich dictionary lookup program, supporting multiple - dictionary formats (StarDict/Babylon/Lingvo/Dictd/AARD/MDict/SDict) and - online dictionaries, featuring perfect article rendering with the complete - markup, illustrations and other content retained, and allowing you to type - in words without any accents or correct case. -

-
- - - http://goldendict.org/screenshots/sprechen-wiktionary.png - - - http://goldendict.org/screenshots/damselfly-heady.png - - - http://goldendict.org/screenshots/completar-chaining.png - - - http://goldendict.org/screenshots/lingvo.png - - - http://goldendict.org/screenshots/wordnet.png - - - http://goldendict.org - https://github.com/goldendict/goldendict - org.goldendict.GoldenDict.desktop - - - org.goldendict.desktop - -
diff --git a/redist/org.goldendict.GoldenDict.desktop b/redist/org.xiaoyifang.GoldenDict_NG.desktop similarity index 62% rename from redist/org.goldendict.GoldenDict.desktop rename to redist/org.xiaoyifang.GoldenDict_NG.desktop index 68a873d6..4f350e4c 100755 --- a/redist/org.goldendict.GoldenDict.desktop +++ b/redist/org.xiaoyifang.GoldenDict_NG.desktop @@ -2,9 +2,13 @@ Type=Application Terminal=false Categories=Office;Dictionary;Education;Qt; -Name=GoldenDict +Name=GoldenDict-NG GenericName=Multiformat Dictionary +GenericName[zh_CN]=多格式字典 Comment=A feature-rich dictionary lookup program +Comment[zh_CN]=多功能字典查询软件 +Keywords=dict;dictioanry; +Keywords[zh_CN]=dict;dictioanry;字典; Icon=goldendict Exec=goldendict %u MimeType=x-scheme-handler/goldendict;x-scheme-handler/dict; diff --git a/redist/org.xiaoyifang.GoldenDict_NG.metainfo.xml b/redist/org.xiaoyifang.GoldenDict_NG.metainfo.xml new file mode 100644 index 00000000..ca1f1407 --- /dev/null +++ b/redist/org.xiaoyifang.GoldenDict_NG.metainfo.xml @@ -0,0 +1,35 @@ + + + + org.xiaoyifang.GoldenDict_NG + CC0-1.0 + GPL-3.0-or-later + GoldenDict-NG + Dictionary lookup program + +

+ GoldenDict-NG is a feature-rich dictionary lookup program, supporting multiple + dictionary formats, featuring perfect article rendering with the complete + markup, illustrations and other content retained, and allowing you to type + in words without any accents or correct case. +

+
+ + + https://xiaoyifang.github.io/goldendict-ng/img/linux_genshin.webp + + + https://xiaoyifang.github.io/goldendict-ng/img/mac_black.webp + + + https://xiaoyifang.github.io/goldendict-ng/img/windows_white.webp + + + https://github.com/xiaoyifang/goldendict-ng + https://github.com/xiaoyifang/goldendict-ng + org.xiaoyifang.GoldenDict_NG.desktop + + + org.goldendict_ng.desktop + +
diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index 60ef4174..daf6a92e 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -3215,7 +3215,7 @@ void MainWindow::setAutostart(bool autostart) return; // Nothing to do. if( autostart ) { - const QString sourcePath = Config::getProgramDataDir() + "../applications/org.goldendict.GoldenDict.desktop"; + const QString sourcePath = Config::getProgramDataDir() + "../applications/org.xiaoyifang.GoldenDict_NG.desktop"; QFile::copy( sourcePath, destinationPath ); } else