Skip to content

Commit 5fd5f62

Browse files
18202781743deepin-bot[bot]
authored andcommitted
feat: add dbus-activatable desktop entry for dde-shell
1. Add a new desktop entry file org.deepin.dde-shell.desktop in the misc directory 2. Configure the entry as a DBusActivatable application with Exec and TryExec set to /bin/false 3. Set NoDisplay to true to hide from menus and launchers 4. Categorize it under System for organization purposes 5. This enables the DDE shell service to be started on demand via D- Bus activation Log: Added D-Bus activation support for DDE Shell service Influence: 1. Verify that dde-shell can be activated via D-Bus when needed 2. Test that the entry does not appear in application menus or launchers 3. Confirm that the service starts on demand and stops when no longer needed feat: 为 dde-shell 添加 D-Bus 激活的 desktop 条目 1. 在 misc 目录中添加新的 desktop 文件 org.deepin.dde-shell.desktop 2. 配置该条目为 DBusActivatable 应用,Exec 和 TryExec 设置为 /bin/false 3. 设置 NoDisplay 为 true 以隐藏于菜单和启动器中 4. 归类到 System 类别以便于组织管理 5. 这使得 DDE shell 服务可以通过 D-Bus 激活按需启动 Log: 新增 DDE Shell 服务的 D-Bus 激活支持 Influence: 1. 验证 dde-shell 能否在需要时通过 D-Bus 激活 2. 测试该条目不会出现在应用菜单或启动器中 3. 确认服务按需启动并在不需要时自动停止
1 parent 02c9293 commit 5fd5f62

7 files changed

Lines changed: 25 additions & 3 deletions

File tree

REUSE.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ SPDX-FileCopyrightText = "None"
8282
SPDX-License-Identifier = "CC0-1.0"
8383

8484
[[annotations]]
85-
path = ["misc/**.service", "misc/**.json"]
85+
path = ["misc/**.service", "misc/**.json", "misc/**.desktop"]
8686
precedence = "aggregate"
8787
SPDX-FileCopyrightText = "None"
8888
SPDX-License-Identifier = "CC0-1.0"

debian/dde-shell.install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ usr/lib/*/qt6/qml/org/deepin/ds/notification/*
1313
usr/lib/*/qt6/qml/org/deepin/ds/notificationcenter/*
1414
usr/lib/systemd/*/dde-shell*.service
1515
usr/lib/systemd/*/dde-shell-plugin*.service
16+
usr/share/applications/*
1617
usr/share/dde-dock/icons/dcc-setting/*.dci
1718
usr/share/dde-shell/*/translations
1819
usr/share/dde-shell/org.deepin.ds.dde-am*/

misc/org.deepin.dde-shell.desktop

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Desktop Entry]
2+
Type=Application
3+
Name=Deepin Desktop Shell
4+
Comment=Deepin desktop shell service
5+
Icon=dde-shell
6+
Exec=/bin/false
7+
TryExec=/bin/false
8+
DBusActivatable=true
9+
NoDisplay=true
10+
Terminal=false
11+
StartupNotify=false
12+
Categories=System;

shell/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
1+
# SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd.
22
#
33
# SPDX-License-Identifier: CC0-1.0
44

@@ -23,6 +23,7 @@ add_executable(dde-shell
2323
treelandoutputwatcher.cpp
2424
dde-shell.qrc
2525
override_dtkdeclarative_qml.qrc
26+
dde-shell-icons.qrc
2627
)
2728

2829
qt_generate_wayland_protocol_client_sources(dde-shell
@@ -59,6 +60,8 @@ install(FILES ${CMAKE_SOURCE_DIR}/misc/deepin-debug-config/org.deepin.dde.shell.
5960
DESTINATION ${CMAKE_INSTALL_DATADIR}/deepin-debug-config/deepin-debug-config.d)
6061
install(FILES ${CMAKE_SOURCE_DIR}/misc/deepin-log-config/org.deepin.dde.shell.json
6162
DESTINATION ${CMAKE_INSTALL_DATADIR}/deepin-log-viewer/deepin-log.conf.d)
63+
install(FILES ${CMAKE_SOURCE_DIR}/misc/org.deepin.dde-shell.desktop
64+
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
6265

6366
install(TARGETS dde-shell DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
6467

shell/dde-shell-icons.qrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<RCC>
2+
<qresource prefix="/dsg/built-in-icons">
3+
<file alias="dde-shell.dci">icons/dde-shell.dci</file>
4+
</qresource>
5+
</RCC>

shell/icons/dde-shell.dci

132 KB
Binary file not shown.

shell/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd.
22
//
33
// SPDX-License-Identifier: GPL-3.0-or-later
44

@@ -107,6 +107,7 @@ int main(int argc, char *argv[])
107107
QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering);
108108
a.setOrganizationName("deepin");
109109
a.setApplicationName("org.deepin.dde-shell");
110+
a.setDesktopFileName(QStringLiteral("org.deepin.dde-shell"));
110111
a.setApplicationVersion(QT_STRINGIFY(DS_VERSION));
111112

112113
QCommandLineParser parser;

0 commit comments

Comments
 (0)