diff --git a/CMakeLists.txt b/CMakeLists.txt index 551a1104..e529d9d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +# SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. # # SPDX-License-Identifier: GPL-3.0-or-later @@ -100,3 +100,7 @@ file(GLOB TS_FILES "translations/*.ts") qt_add_translation(QM_FILES ${TS_FILES}) add_custom_target(dde-session-ui_language ALL DEPENDS ${QM_FILES}) install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations) + +#----------------------------install desktop files and icons-------------------- +file(GLOB DESKTOP_FILES ${CMAKE_SOURCE_DIR}/misc/applications/*.desktop) +install(FILES ${DESKTOP_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) diff --git a/REUSE.toml b/REUSE.toml index 8ad7ae42..341e0665 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -82,7 +82,7 @@ SPDX-FileCopyrightText = "UnionTech Software Technology Co., Ltd." SPDX-License-Identifier = "GPL-3.0-or-later" [[annotations]] -path = ["dde-osd/files/dde-osd.desktop", "deepin-login-reminder/deepin-login-reminder.desktop", "deepin-login-reminder/dconf/org.deepin.login-reminder.json"] +path = ["dde-osd/files/dde-osd.desktop", "deepin-login-reminder/deepin-login-reminder.desktop", "deepin-login-reminder/dconf/org.deepin.login-reminder.json", "misc/applications/*.desktop"] precedence = "aggregate" SPDX-FileCopyrightText = "UnionTech Software Technology Co., Ltd." SPDX-License-Identifier = "GPL-3.0-or-later" diff --git a/dde-blackwidget/src/main.cpp b/dde-blackwidget/src/main.cpp index 7145fc14..7b1f55d6 100644 --- a/dde-blackwidget/src/main.cpp +++ b/dde-blackwidget/src/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2015 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -64,6 +64,9 @@ int main(int argc, char *argv[]) } QApplication a(argc, argv); + a.setOrganizationName("deepin"); + a.setApplicationName("dde-blackwidget"); + a.setDesktopFileName(QStringLiteral("org.deepin.dde.blackwidget")); DCORE_USE_NAMESPACE::Dtk::Core::DLogManager::registerConsoleAppender(); diff --git a/dde-bluetooth-dialog/src/main.cpp b/dde-bluetooth-dialog/src/main.cpp index 8f356c0d..bf35f492 100644 --- a/dde-bluetooth-dialog/src/main.cpp +++ b/dde-bluetooth-dialog/src/main.cpp @@ -26,6 +26,7 @@ int main(int argc, char *argv[]) DApplication app(argc, argv); app.setOrganizationName("deepin"); app.setApplicationName("dde-bluetooth-dialog"); + app.setDesktopFileName(QStringLiteral("org.deepin.dde.bluetooth-dialog")); QTranslator translator; if (translator.load(QLocale::system(), "dde-session-ui", "_", "/usr/share/dde-session-ui/translations")) { app.installTranslator(&translator); diff --git a/dde-hints-dialog/src/main.cpp b/dde-hints-dialog/src/main.cpp index e6b08158..0c24600c 100644 --- a/dde-hints-dialog/src/main.cpp +++ b/dde-hints-dialog/src/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -20,7 +20,9 @@ const int HINT_CONTENT = 2; int main(int argc, char *argv[]) { DApplication a(argc, argv); + a.setOrganizationName("deepin"); a.setApplicationName("dde-hints-dialog"); + a.setDesktopFileName(QStringLiteral("org.deepin.dde.hints-dialog")); a.setApplicationVersion("1.0"); a.setQuitOnLastWindowClosed(true); diff --git a/dde-license-dialog/src/main.cpp b/dde-license-dialog/src/main.cpp index faa35b2f..7160d825 100644 --- a/dde-license-dialog/src/main.cpp +++ b/dde-license-dialog/src/main.cpp @@ -24,6 +24,9 @@ int main(int argc, char *argv[]) { qputenv("DSG_APP_ID", "org.deepin.dde.license-dialog"); DApplication a(argc, argv); + a.setOrganizationName("deepin"); + a.setApplicationName("dde-license-dialog"); + a.setDesktopFileName(QStringLiteral("org.deepin.dde.license-dialog")); a.loadTranslator(); diff --git a/dde-lowpower/src/main.cpp b/dde-lowpower/src/main.cpp index 2c09c91d..bce93042 100644 --- a/dde-lowpower/src/main.cpp +++ b/dde-lowpower/src/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2015 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -28,6 +28,9 @@ DWIDGET_USE_NAMESPACE int main(int argc, char *argv[]) { QApplication a(argc, argv); + a.setOrganizationName("deepin"); + a.setApplicationName("dde-lowpower"); + a.setDesktopFileName(QStringLiteral("org.deepin.dde.lowpower")); QTranslator translator; if (translator.load(QLocale::system(), "dde-session-ui", "_", "/usr/share/dde-session-ui/translations")) { diff --git a/dde-pixmix/src/main.cpp b/dde-pixmix/src/main.cpp index 5ca7d20b..e9e892f4 100644 --- a/dde-pixmix/src/main.cpp +++ b/dde-pixmix/src/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2011 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -74,6 +74,7 @@ int main(int argc, char *argv[]) a.setOrganizationName("deepin"); a.setApplicationName("dde-pixmix"); + a.setDesktopFileName(QStringLiteral("org.deepin.dde.pixmix")); DLogManager::registerConsoleAppender(); DLogManager::registerJournalAppender(); diff --git a/dde-suspend-dialog/src/main.cpp b/dde-suspend-dialog/src/main.cpp index 4268c8af..b4f558c6 100644 --- a/dde-suspend-dialog/src/main.cpp +++ b/dde-suspend-dialog/src/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2016 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -16,6 +16,7 @@ int main(int argc, char *argv[]) DApplication app(argc, argv); app.setOrganizationName("deepin"); app.setApplicationName("dde-suspend-dialog"); + app.setDesktopFileName(QStringLiteral("org.deepin.dde.suspend-dialog")); QTranslator translator; if (translator.load(QLocale::system(), "dde-session-ui", "_", "/usr/share/dde-session-ui/translations")) { diff --git a/dde-touchscreen-dialog/src/main.cpp b/dde-touchscreen-dialog/src/main.cpp index 510221b1..ade16e9b 100644 --- a/dde-touchscreen-dialog/src/main.cpp +++ b/dde-touchscreen-dialog/src/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -21,6 +21,9 @@ using namespace org::deepin::dde; int main(int argc, char *argv[]) { DApplication app(argc, argv); + app.setOrganizationName("deepin"); + app.setApplicationName("dde-touchscreen-dialog"); + app.setDesktopFileName(QStringLiteral("org.deepin.dde.touchscreen-dialog")); app.setQuitOnLastWindowClosed(false); app.setQuitOnLastWindowClosed(true); @@ -49,7 +52,15 @@ int main(int argc, char *argv[]) return -1; } - TouchscreenSetting s(posArguments.first()); + // 如果该触摸设备已被关联到屏幕,则不再弹出选择窗口 + const QString &touchUUID = posArguments.first(); + const auto touchMap = display.touchMap(); + if (touchMap.contains(touchUUID)) { + qDebug() << "touchscreen already associated:" << touchUUID << "->" << touchMap[touchUUID]; + return 0; + } + + TouchscreenSetting s(touchUUID); #if (defined QT_DEBUG) && (defined CHECK_ACCESSIBLENAME) AccessibilityCheckerEx checker; checker.setOutputFormat(DAccessibilityChecker::FullFormat); diff --git a/dde-warning-dialog/src/main.cpp b/dde-warning-dialog/src/main.cpp index bb66bb81..5b0281a8 100644 --- a/dde-warning-dialog/src/main.cpp +++ b/dde-warning-dialog/src/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2015 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -29,7 +29,9 @@ int main(int argc, char *argv[]) } DApplication a(argc, argv); + a.setOrganizationName("deepin"); a.setApplicationName("dde-warning-dialog"); + a.setDesktopFileName(QStringLiteral("org.deepin.dde.warning-dialog")); a.setApplicationVersion("1.0"); a.setQuitOnLastWindowClosed(true); diff --git a/dde-welcome/src/main.cpp b/dde-welcome/src/main.cpp index 56c6849a..89db5ec2 100644 --- a/dde-welcome/src/main.cpp +++ b/dde-welcome/src/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2011 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -25,6 +25,7 @@ int main(int argc, char *argv[]) DApplication app(argc, argv); app.setOrganizationName("deepin"); app.setApplicationName("dde-welcome"); + app.setDesktopFileName(QStringLiteral("org.deepin.dde.welcome")); if (!app.setSingleInstance(app.applicationName(), DApplication::UserScope)) return -1; diff --git a/dde-wm-chooser/src/main.cpp b/dde-wm-chooser/src/main.cpp index 898f3c1d..12e3dc3b 100644 --- a/dde-wm-chooser/src/main.cpp +++ b/dde-wm-chooser/src/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2011 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -47,7 +47,9 @@ void selectNormalModel(QString qPath) int main(int argc, char *argv[]) { DApplication a(argc, argv); + a.setOrganizationName("deepin"); a.setApplicationName("deepin-wm-chooser"); + a.setDesktopFileName(QStringLiteral("org.deepin.dde.wm-chooser")); QTranslator translator; if (translator.load(QLocale::system(), "dde-session-ui", "_", "/usr/share/dde-session-ui/translations")) { diff --git a/misc/applications/org.deepin.dde.blackwidget.desktop b/misc/applications/org.deepin.dde.blackwidget.desktop new file mode 100644 index 00000000..ed2f232b --- /dev/null +++ b/misc/applications/org.deepin.dde.blackwidget.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin Black Widget +Comment=Deepin black screen overlay +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.bluetooth-dialog.desktop b/misc/applications/org.deepin.dde.bluetooth-dialog.desktop new file mode 100644 index 00000000..f6b648e0 --- /dev/null +++ b/misc/applications/org.deepin.dde.bluetooth-dialog.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin Bluetooth Dialog +Comment=Deepin Bluetooth pairing dialog +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.hints-dialog.desktop b/misc/applications/org.deepin.dde.hints-dialog.desktop new file mode 100644 index 00000000..c84c2642 --- /dev/null +++ b/misc/applications/org.deepin.dde.hints-dialog.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin Hints Dialog +Comment=Deepin hints dialog +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.license-dialog.desktop b/misc/applications/org.deepin.dde.license-dialog.desktop new file mode 100644 index 00000000..e7e12202 --- /dev/null +++ b/misc/applications/org.deepin.dde.license-dialog.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin License Dialog +Comment=Deepin license agreement dialog +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.lowpower.desktop b/misc/applications/org.deepin.dde.lowpower.desktop new file mode 100644 index 00000000..c18258ee --- /dev/null +++ b/misc/applications/org.deepin.dde.lowpower.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin Low Power +Comment=Deepin low power overlay +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.pixmix.desktop b/misc/applications/org.deepin.dde.pixmix.desktop new file mode 100644 index 00000000..2ae951a6 --- /dev/null +++ b/misc/applications/org.deepin.dde.pixmix.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin Pixmix +Comment=Deepin image color processing tool +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.reset-password-dialog.desktop b/misc/applications/org.deepin.dde.reset-password-dialog.desktop new file mode 100644 index 00000000..aa625d74 --- /dev/null +++ b/misc/applications/org.deepin.dde.reset-password-dialog.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin Reset Password Dialog +Comment=Deepin password reset dialog +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.suspend-dialog.desktop b/misc/applications/org.deepin.dde.suspend-dialog.desktop new file mode 100644 index 00000000..61f57be2 --- /dev/null +++ b/misc/applications/org.deepin.dde.suspend-dialog.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin Suspend Dialog +Comment=Deepin suspend confirmation dialog +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.touchscreen-dialog.desktop b/misc/applications/org.deepin.dde.touchscreen-dialog.desktop new file mode 100644 index 00000000..e0ec2433 --- /dev/null +++ b/misc/applications/org.deepin.dde.touchscreen-dialog.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin Touchscreen Dialog +Comment=Deepin touchscreen association dialog +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.warning-dialog.desktop b/misc/applications/org.deepin.dde.warning-dialog.desktop new file mode 100644 index 00000000..4cad032d --- /dev/null +++ b/misc/applications/org.deepin.dde.warning-dialog.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin Warning Dialog +Comment=Deepin warning dialog +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.welcome.desktop b/misc/applications/org.deepin.dde.welcome.desktop new file mode 100644 index 00000000..f5092146 --- /dev/null +++ b/misc/applications/org.deepin.dde.welcome.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin Welcome +Comment=Deepin welcome screen +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/misc/applications/org.deepin.dde.wm-chooser.desktop b/misc/applications/org.deepin.dde.wm-chooser.desktop new file mode 100644 index 00000000..19cbd786 --- /dev/null +++ b/misc/applications/org.deepin.dde.wm-chooser.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Deepin WM Chooser +Comment=Deepin window manager chooser +Icon=deepin-dde +Exec=/bin/false +TryExec=/bin/false +NoDisplay=true +Terminal=false +StartupNotify=false +Categories=System; diff --git a/reset-password-dialog/main.cpp b/reset-password-dialog/main.cpp index 883c8793..09a1c216 100644 --- a/reset-password-dialog/main.cpp +++ b/reset-password-dialog/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 - 2023 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2016 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -24,6 +24,8 @@ int main(int argc, char *argv[]) DApplication a(argc, argv); a.setQuitOnLastWindowClosed(true); a.setOrganizationName("deepin"); + a.setApplicationName("reset-password-dialog"); + a.setDesktopFileName(QStringLiteral("org.deepin.dde.reset-password-dialog")); QCommandLineParser parser; parser.addHelpOption();