Skip to content

Commit cc86ac8

Browse files
committed
feat: add dock library and refactor dock plugin management
1. Added new libdde-shell-dock library to provide dock item interface 2. Created DAppletDock abstract base class for dock plugins with dockItemInfo() and setVisible() methods 3. Refactored dock plugin management to use new library instead of hardcoded plugin IDs 4. Updated build system to include new library and development packages 5. Modified multitaskview plugin to inherit from DAppletDock instead of DApplet 6. Added dockVersion metadata field to identify dock-compatible plugins 7. Fixed installation paths for header files and libraries in Debian packaging Log: Improved dock plugin architecture with standardized interface Influence: 1. Test dock plugin visibility management through settings 2. Verify multitaskview plugin still works correctly 3. Check that tray functionality remains unchanged 4. Test building and installation of new libdde-shell-dock packages 5. Verify backward compatibility with existing dock plugins 6. Test dock item information retrieval through D-Bus interface feat: 新增Dock库并重构Dock插件管理 1. 新增libdde-shell-dock库,提供Dock项目接口 2. 创建DAppletDock抽象基类,包含dockItemInfo()和setVisible()方法 3. 重构Dock插件管理,使用新库替代硬编码的插件ID 4. 更新构建系统以包含新库和开发包 5. 修改multitaskview插件继承自DAppletDock而非DApplet 6. 新增dockVersion元数据字段以识别Dock兼容插件 7. 修复Debian打包中头文件和库的安装路径 Log: 改进Dock插件架构,提供标准化接口 Influence: 1. 测试通过设置管理Dock插件可见性 2. 验证multitaskview插件仍正常工作 3. 检查托盘功能是否保持不变 4. 测试新建libdde-shell-dock包的构建和安装 5. 验证与现有Dock插件的向后兼容性 6. 测试通过D-Bus接口获取Dock项目信息 PMS: TASK-388449
1 parent c8251d0 commit cc86ac8

22 files changed

Lines changed: 186 additions & 63 deletions

debian/control

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,24 @@ Depends:
9393
${misc:Depends},
9494
Description: DDE Shell devel library
9595
DDE Shell is a plugin system that integrates plugins developed based on this plugin system into DDE.
96+
97+
Package: libdde-shell-dock
98+
Architecture: any
99+
Depends:
100+
${misc:Depends},
101+
${shlibs:Depends},
102+
libdde-shell (= ${binary:Version}),
103+
Multi-Arch: same
104+
Description: DDE Shell dock library
105+
DDE Shell Dock is a library for dock item info.
106+
107+
Package: libdde-shell-dock-dev
108+
Architecture: any
109+
Depends:
110+
libdde-shell-dock (= ${binary:Version}),
111+
libdde-shell-dev (= ${binary:Version}),
112+
qt6-base-dev,
113+
qt6-declarative-dev,
114+
${misc:Depends},
115+
Description: DDE Shell dock devel library
116+
DDE Shell Dock is a library for dock item info.

debian/dde-shell.install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ usr/lib/*/dde-shell/org.deepin.ds.dock*
77
usr/lib/*/dde-shell/org.deepin.ds.notification*
88
usr/lib/*/dde-shell/org.deepin.ds.notificationcenter*
99
usr/lib/*/dde-shell/org.deepin.ds.osd*
10-
usr/lib/*/libds-notification-shared.so.*
10+
usr/lib/*/libds-notification-shared.so*
1111
usr/lib/*/qt6/qml/org/deepin/ds/dock/*
1212
usr/lib/*/qt6/qml/org/deepin/ds/notification/*
1313
usr/lib/*/qt6/qml/org/deepin/ds/notificationcenter/*

debian/libdde-shell-dev.install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
usr/include
1+
usr/include/dde-shell/*.h
22
usr/lib/*/cmake/*/*.cmake
3-
usr/lib/*/lib*.so
3+
usr/lib/*/libdde-shell.so
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
usr/include/dde-shell/dock/*.h
2+
usr/lib/*/libdde-shell-dock.so

debian/libdde-shell-dock.install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/lib/*/libdde-shell-dock.so.*

frame/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,5 @@ PRIVATE
135135
install(TARGETS dde-shell-frame EXPORT DDEShellTargets DESTINATION "${LIB_INSTALL_DIR}" PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}")
136136
install(EXPORT DDEShellTargets NAMESPACE Dde:: FILE DDEShellTargets.cmake DESTINATION "${CONFIG_INSTALL_DIR}")
137137

138+
add_subdirectory(dock)
138139
add_subdirectory(plugin)

frame/dock/CMakeLists.txt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
set(DOCK_PUBLIC_HEADERS
5+
dockiteminfo.h
6+
dappletdock.h
7+
)
8+
9+
add_library(dde-shell-dock SHARED
10+
${DOCK_PUBLIC_HEADERS}
11+
dockiteminfo.cpp
12+
dappletdock.cpp
13+
)
14+
15+
set_target_properties(dde-shell-dock PROPERTIES
16+
PUBLIC_HEADER "${DOCK_PUBLIC_HEADERS}"
17+
VERSION ${CMAKE_PROJECT_VERSION}
18+
SOVERSION 1
19+
OUTPUT_NAME dde-shell-dock
20+
EXPORT_NAME ShellDock
21+
)
22+
23+
target_link_libraries(dde-shell-dock
24+
PUBLIC
25+
dde-shell-frame
26+
Qt${QT_VERSION_MAJOR}::Core
27+
Qt${QT_VERSION_MAJOR}::Gui
28+
Qt${QT_VERSION_MAJOR}::Quick
29+
PRIVATE
30+
Qt${QT_VERSION_MAJOR}::QuickTemplates2Private
31+
Qt${QT_VERSION_MAJOR}::QuickPrivate
32+
Qt${QT_VERSION_MAJOR}::GuiPrivate
33+
)
34+
35+
target_include_directories(dde-shell-dock INTERFACE
36+
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
37+
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
38+
$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>
39+
)
40+
target_link_directories(dde-shell-dock INTERFACE
41+
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
42+
$<INSTALL_INTERFACE:${LIB_INSTALL_DIR}>
43+
)
44+
45+
target_compile_definitions(dde-shell-dock PRIVATE DS_LIB)
46+
47+
install(TARGETS dde-shell-dock EXPORT DDEShellTargets DESTINATION "${LIB_INSTALL_DIR}" PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}/dock")

frame/dock/dappletdock.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
2+
//
3+
// SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
#include "dappletdock.h"
6+
7+
DS_BEGIN_NAMESPACE
8+
9+
DAppletDock::DAppletDock(QObject *parent)
10+
: DApplet(parent)
11+
{
12+
}
13+
14+
DAppletDock::~DAppletDock()
15+
{
16+
}
17+
18+
DS_END_NAMESPACE

frame/dock/dappletdock.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
2+
//
3+
// SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
#pragma once
6+
7+
#include "applet.h"
8+
#include "dockiteminfo.h"
9+
#include "dsglobal.h"
10+
11+
DS_BEGIN_NAMESPACE
12+
13+
class DAppletDock : public DApplet
14+
{
15+
Q_OBJECT
16+
17+
public:
18+
explicit DAppletDock(QObject *parent = nullptr);
19+
virtual ~DAppletDock() override;
20+
21+
virtual DockItemInfo dockItemInfo() = 0;
22+
virtual void setVisible(bool visible) = 0;
23+
};
24+
25+
DS_END_NAMESPACE
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
22
//
33
// SPDX-License-Identifier: GPL-3.0-or-later
44

0 commit comments

Comments
 (0)