mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
fix: 加载系统托盘插件
1、systemTray目录下的插件由QuickItemController类来统一加载,托盘区域增加系统插件的展示 2、蓝牙、飞行模式等插件修改为普通插件,用于在快捷面板显示 Log: 托盘区显示系统托盘插件 Influence: 插入U盘,查看托盘区域是否有U盘图标 Task: https://pms.uniontech.com/task-view-112073.html Change-Id: I57e1321fcc59dfc7cfad1c21aca343203e3fad00
This commit is contained in:
parent
ee248287d3
commit
b2633a5f50
3
debian/dde-dock.install
vendored
3
debian/dde-dock.install
vendored
@ -4,9 +4,8 @@ etc/dde-dock
|
||||
usr/lib/dde-dock/plugins/libshutdown.so
|
||||
usr/lib/dde-dock/plugins/libtrash.so
|
||||
usr/lib/dde-dock/plugins/liboverlay-warning.so
|
||||
usr/lib/dde-dock/plugins/system-trays
|
||||
usr/lib/dde-dock/plugins/quick-trays
|
||||
usr/lib/dde-dock/plugins/libmultitasking.so
|
||||
usr/lib/dde-dock/plugins/libshow-desktop.so
|
||||
usr/lib/dde-dock/plugins/system-trays/libkeyboard-layout.so
|
||||
usr/lib/dde-dock/plugins/libkeyboard-layout.so
|
||||
usr/share/dsg/apps/dde-dock/configs/
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
#include "proxyplugincontroller.h"
|
||||
#include "pluginsiteminterface.h"
|
||||
#include "constants.h"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
@ -41,13 +42,15 @@ static QMap<PluginType, QStringList> getPluginPaths()
|
||||
{
|
||||
QStringList pluginPaths;
|
||||
#ifdef QT_DEBUG
|
||||
pluginPaths << qApp->applicationDirPath() + "/../plugins/quick-trays"
|
||||
<< qApp->applicationDirPath() + "/../plugins";
|
||||
pluginPaths << QString("%1/..%2").arg(qApp->applicationDirPath()).arg(QUICK_PATH)
|
||||
<< QString("%1/..%2").arg(qApp->applicationDirPath()).arg(PLUGIN_PATH)
|
||||
<< QString("%1/..%2").arg(qApp->applicationDirPath()).arg(TRAY_PATH);
|
||||
#else
|
||||
pluginPaths << "/usr/lib/dde-dock/plugins/quick-trays"
|
||||
<< "/usr/lib/dde-dock/plugins";
|
||||
pluginPaths << QString("/usr/lib/dde-dock%1").arg(QUICK_PATH)
|
||||
<< QString("/usr/lib/dde-dock%1").arg(PLUGIN_PATH)
|
||||
<< QString("/usr/lib/dde-dock%1").arg(TRAY_PATH);
|
||||
|
||||
const QStringList pluginsDirs = (getPathFromConf("QUICK_TRAY_PATH") << getPathFromConf("PATH"));
|
||||
const QStringList pluginsDirs = (getPathFromConf("QUICK_TRAY_PATH") << getPathFromConf("PATH") << getPathFromConf("SYSTEM_TRAY_PATH"));
|
||||
if (!pluginsDirs.isEmpty())
|
||||
pluginPaths << pluginsDirs;
|
||||
#endif
|
||||
|
@ -41,13 +41,17 @@ void QuickSettingController::pluginItemAdded(PluginsItemInterface * const itemIn
|
||||
// 根据读取到的metaData数据获取当前插件的类型,提供给外部
|
||||
PluginAttribute pluginClass = PluginAttribute::Quick;
|
||||
QPluginLoader *pluginLoader = ProxyPluginController::instance(PluginType::QuickPlugin)->pluginLoader(itemInter);
|
||||
QJsonObject meta;
|
||||
if (pluginLoader) {
|
||||
meta = pluginLoader->metaData().value("MetaData").toObject();
|
||||
if (meta.contains("tool") && meta.value("tool").toBool())
|
||||
pluginClass = PluginAttribute::Tool;
|
||||
else if (meta.contains("fixed") && meta.value("fixed").toBool())
|
||||
pluginClass = PluginAttribute::Fixed;
|
||||
if (pluginLoader->fileName().contains("/plugins/system-trays")) {
|
||||
// 如果是从系统托盘目录下加载的插件,则认为它是托盘插件,此时需要放入到托盘中
|
||||
pluginClass = PluginAttribute::System;
|
||||
} else {
|
||||
QJsonObject meta = pluginLoader->metaData().value("MetaData").toObject();
|
||||
if (meta.contains("tool") && meta.value("tool").toBool())
|
||||
pluginClass = PluginAttribute::Tool;
|
||||
else if (meta.contains("fixed") && meta.value("fixed").toBool())
|
||||
pluginClass = PluginAttribute::Fixed;
|
||||
}
|
||||
}
|
||||
|
||||
m_quickPlugins[pluginClass] << itemInter;
|
||||
@ -64,8 +68,10 @@ void QuickSettingController::pluginItemRemoved(PluginsItemInterface * const item
|
||||
continue;
|
||||
|
||||
plugins.removeOne(itemInter);
|
||||
if (plugins.isEmpty())
|
||||
m_quickPlugins.remove(it.key());
|
||||
if (plugins.isEmpty()) {
|
||||
QuickSettingController::PluginAttribute pluginclass = it.key();
|
||||
m_quickPlugins.remove(pluginclass);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -34,7 +34,8 @@ public:
|
||||
enum class PluginAttribute {
|
||||
Quick = 0,
|
||||
Tool,
|
||||
Fixed
|
||||
Fixed,
|
||||
System
|
||||
};
|
||||
|
||||
public:
|
||||
|
@ -162,13 +162,21 @@ PluginsItemInterface::PluginSizePolicy PluginAdapter::pluginSizePolicy() const
|
||||
|
||||
QIcon PluginAdapter::icon(const DockPart &dockPart)
|
||||
{
|
||||
if (dockPart == DockPart::QuickPanel) {
|
||||
QWidget *itemWidget = m_pluginInter->itemWidget(m_itemKey);
|
||||
if (!itemWidget)
|
||||
return QIcon();
|
||||
|
||||
switch (dockPart) {
|
||||
case DockPart::QuickPanel: {
|
||||
// 如果图标为空,就使用itemWidget的截图作为它的图标,这种一般是适用于老版本插件或者没有实现v23接口的插件
|
||||
QWidget *itemWidget = m_pluginInter->itemWidget(m_itemKey);
|
||||
if (itemWidget) {
|
||||
itemWidget->setFixedSize(ICONWIDTH, ICONHEIGHT);
|
||||
return itemWidget->grab();
|
||||
}
|
||||
itemWidget->setFixedSize(ICONWIDTH, ICONHEIGHT);
|
||||
return itemWidget->grab();
|
||||
}
|
||||
case DockPart::SystemPanel: {
|
||||
itemWidget->setFixedSize(16, 16);
|
||||
return itemWidget->grab();
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
|
||||
return QIcon();
|
||||
|
@ -261,7 +261,7 @@ void DockTrayWindow::initUi()
|
||||
m_mainBoxLayout->setAlignment(m_toolLineLabel, Qt::AlignCenter);
|
||||
|
||||
WinInfo info;
|
||||
info.type = TrayIconType::EXPANDICON;
|
||||
info.type = TrayIconType::ExpandIcon;
|
||||
m_model->addRow(info);
|
||||
m_trayView->openPersistentEditor(m_model->index(0, 0));
|
||||
|
||||
@ -277,11 +277,15 @@ void DockTrayWindow::initConnection()
|
||||
connect(m_quickIconWidget, &QuickPluginWindow::itemCountChanged, this, &DockTrayWindow::onResetLayout);
|
||||
connect(m_trayView, &TrayGridView::requestRemove, this, &DockTrayWindow::onResetLayout);
|
||||
|
||||
connect(QuickSettingController::instance(), &QuickSettingController::pluginInserted, this, [ this ] (PluginsItemInterface *itemInter, const QuickSettingController::PluginAttribute &pluginClass) {
|
||||
if (pluginClass != QuickSettingController::PluginAttribute::Tool)
|
||||
return;
|
||||
|
||||
onItemAdded(itemInter);
|
||||
connect(QuickSettingController::instance(), &QuickSettingController::pluginInserted, this, [ this ] (PluginsItemInterface *itemInter, const QuickSettingController::PluginAttribute &pluginAttr) {
|
||||
switch (pluginAttr) {
|
||||
case QuickSettingController::PluginAttribute::Tool:
|
||||
// 下方只处理回收站等插件
|
||||
onItemAdded(itemInter);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
connect(QuickSettingController::instance(), &QuickSettingController::pluginRemoved, this, &DockTrayWindow::onItemRemove);
|
||||
@ -336,6 +340,7 @@ void DockTrayWindow::onItemRemove(PluginsItemInterface *itemInter)
|
||||
continue;
|
||||
|
||||
m_toolLayout->removeWidget(pluginItem);
|
||||
|
||||
Q_EMIT requestUpdate();
|
||||
break;
|
||||
}
|
||||
|
@ -27,6 +27,9 @@
|
||||
#include "widgets/snitrayitemwidget.h"
|
||||
#include "widgets/expandiconwidget.h"
|
||||
#include "utils.h"
|
||||
#include "pluginsiteminterface.h"
|
||||
#include "quicksettingcontroller.h"
|
||||
#include "systempluginitem.h"
|
||||
|
||||
#include <DGuiApplicationHelper>
|
||||
|
||||
@ -62,7 +65,7 @@ QWidget *TrayDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem
|
||||
quint32 winId = index.data(TrayModel::WinIdRole).value<quint32>();
|
||||
|
||||
BaseTrayWidget *trayWidget = nullptr;
|
||||
if(type == TrayIconType::XEMBED) {
|
||||
if(type == TrayIconType::XEmbed) {
|
||||
if (Utils::IS_WAYLAND_DISPLAY) {
|
||||
static Display *display = XOpenDisplay(nullptr);
|
||||
static int screenp = 0;
|
||||
@ -74,9 +77,9 @@ QWidget *TrayDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem
|
||||
const TrayModel *model = qobject_cast<const TrayModel *>(index.model());
|
||||
if (model)
|
||||
connect(model, &TrayModel::requestUpdateIcon, trayWidget, &BaseTrayWidget::updateIcon);
|
||||
} else if (type == TrayIconType::SNI) {
|
||||
} else if (type == TrayIconType::Sni) {
|
||||
trayWidget = new SNITrayItemWidget(servicePath, parent);
|
||||
} else if (type == TrayIconType::EXPANDICON) {
|
||||
} else if (type == TrayIconType::ExpandIcon) {
|
||||
ExpandIconWidget *expandWidget = new ExpandIconWidget(parent);
|
||||
expandWidget->setPositonValue(m_position);
|
||||
connect(expandWidget, &ExpandIconWidget::trayVisbleChanged, this, [ = ](bool visible) {
|
||||
@ -84,7 +87,7 @@ QWidget *TrayDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem
|
||||
});
|
||||
connect(this, &TrayDelegate::requestDrag, this, &TrayDelegate::onRequestDrag);
|
||||
trayWidget = expandWidget;
|
||||
} else if (type == TrayIconType::INDICATOR) {
|
||||
} else if (type == TrayIconType::Incicator) {
|
||||
QString indicateName = key;
|
||||
int flagIndex = indicateName.indexOf("indicator:");
|
||||
if (flagIndex >= 0)
|
||||
@ -100,6 +103,13 @@ QWidget *TrayDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem
|
||||
indicatorWidget->setText(text);
|
||||
}
|
||||
trayWidget = indicatorWidget;
|
||||
} else if (type == TrayIconType::SystemItem) {
|
||||
PluginsItemInterface *pluginInter = (PluginsItemInterface *)(index.data(TrayModel::PluginInterfaceRole).toULongLong());
|
||||
if (pluginInter) {
|
||||
const QString itemKey = QuickSettingController::instance()->itemKey(pluginInter);
|
||||
SystemPluginItem::setDockPostion(m_position);
|
||||
trayWidget = new SystemPluginItem(pluginInter, itemKey, parent);
|
||||
}
|
||||
}
|
||||
|
||||
if (trayWidget)
|
||||
|
@ -33,6 +33,7 @@
|
||||
struct WinInfo;
|
||||
class ExpandIconWidget;
|
||||
class QListView;
|
||||
class PluginsItemInterface;
|
||||
|
||||
class TrayDelegate : public QStyledItemDelegate
|
||||
{
|
||||
|
@ -289,7 +289,7 @@ void TrayGridView::mouseMoveEvent(QMouseEvent *e)
|
||||
|
||||
// 如果当前拖动的位置是托盘展开按钮,则不让其拖动
|
||||
TrayIconType iconType = index.data(TrayModel::Role::TypeRole).value<TrayIconType>();
|
||||
if (iconType == TrayIconType::EXPANDICON)
|
||||
if (iconType == TrayIconType::ExpandIcon)
|
||||
return DListView::mouseMoveEvent(e);
|
||||
|
||||
if ((qAbs(e->pos().x() - m_dragPos.x()) > m_dragDistance ||
|
||||
@ -426,7 +426,7 @@ bool TrayGridView::beginDrag(Qt::DropActions supportedActions)
|
||||
QModelIndex modelIndex = indexAt(m_dragPos);
|
||||
TrayIconType trayType = modelIndex.data(TrayModel::Role::TypeRole).value<TrayIconType>();
|
||||
// 展开图标不能移动
|
||||
if (trayType == TrayIconType::EXPANDICON)
|
||||
if (trayType == TrayIconType::ExpandIcon)
|
||||
return false;
|
||||
|
||||
m_dropPos = indexRect(modelIndex).center();
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
#include "indicatortrayitem.h"
|
||||
#include "indicatorplugin.h"
|
||||
#include "quicksettingcontroller.h"
|
||||
#include "pluginsiteminterface.h"
|
||||
|
||||
#include <QMimeData>
|
||||
#include <QIcon>
|
||||
@ -46,6 +48,19 @@ TrayModel::TrayModel(QListView *view, bool isIconTray, bool hasInputMethod, QObj
|
||||
if (isIconTray) {
|
||||
connect(m_monitor, &TrayMonitor::xEmbedTrayAdded, this, &TrayModel::onXEmbedTrayAdded);
|
||||
connect(m_monitor, &TrayMonitor::indicatorFounded, this, &TrayModel::onIndicatorFounded);
|
||||
connect(QuickSettingController::instance(), &QuickSettingController::pluginInserted, this, [ = ](PluginsItemInterface *itemInter, const QuickSettingController::PluginAttribute &pluginAttr) {
|
||||
if (pluginAttr != QuickSettingController::PluginAttribute::System)
|
||||
return;
|
||||
|
||||
systemItemAdded(itemInter);
|
||||
});
|
||||
|
||||
connect(QuickSettingController::instance(), &QuickSettingController::pluginRemoved, this, &TrayModel::onSystemItemRemoved);
|
||||
QMetaObject::invokeMethod(this, [ = ] {
|
||||
QList<PluginsItemInterface *> systemPlugins = QuickSettingController::instance()->pluginItems(QuickSettingController::PluginAttribute::System);
|
||||
for (PluginsItemInterface *plugin : systemPlugins)
|
||||
systemItemAdded(plugin);
|
||||
}, Qt::QueuedConnection);
|
||||
}
|
||||
connect(m_monitor, &TrayMonitor::xEmbedTrayRemoved, this, &TrayModel::onXEmbedTrayRemoved);
|
||||
connect(m_monitor, &TrayMonitor::requestUpdateIcon, this, &TrayModel::requestUpdateIcon);
|
||||
@ -173,6 +188,8 @@ QVariant TrayModel::data(const QModelIndex &index, int role) const
|
||||
return info.winId;
|
||||
case Role::ServiceRole:
|
||||
return info.servicePath;
|
||||
case Role::PluginInterfaceRole:
|
||||
return (qulonglong)(info.pluginInter);
|
||||
case Role::Blank:
|
||||
return indexDragging(index);
|
||||
default:
|
||||
@ -202,7 +219,7 @@ bool TrayModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, in
|
||||
Q_UNUSED(column)
|
||||
|
||||
TrayIconType iconType = parent.data(TrayModel::Role::TypeRole).value<TrayIconType>();
|
||||
if (iconType == TrayIconType::EXPANDICON)
|
||||
if (iconType == TrayIconType::ExpandIcon)
|
||||
return false;
|
||||
|
||||
return data->formats().contains(TRAY_DRAG_FALG);
|
||||
@ -243,7 +260,7 @@ void TrayModel::onXEmbedTrayAdded(quint32 winId)
|
||||
|
||||
beginInsertRows(QModelIndex(), rowCount(), rowCount());
|
||||
WinInfo info;
|
||||
info.type = XEMBED;
|
||||
info.type = XEmbed;
|
||||
info.key = "wininfo:" + QString::number(winId);
|
||||
info.winId = winId;
|
||||
m_winInfos.append(info);
|
||||
@ -295,6 +312,23 @@ bool TrayModel::isTypeWriting(const QString &servicePath)
|
||||
return (appFilePath.startsWith("/usr/bin/fcitx") || appFilePath.endsWith("chinime-qim"));
|
||||
}
|
||||
|
||||
void TrayModel::systemItemAdded(PluginsItemInterface *itemInter)
|
||||
{
|
||||
for (const WinInfo &info : m_winInfos) {
|
||||
if (info.pluginInter == itemInter)
|
||||
return;
|
||||
}
|
||||
|
||||
beginInsertRows(QModelIndex(), rowCount(), rowCount());
|
||||
|
||||
WinInfo info;
|
||||
info.type = SystemItem;
|
||||
info.pluginInter = itemInter;
|
||||
m_winInfos.append(info);
|
||||
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
void TrayModel::onSniTrayAdded(const QString &servicePath)
|
||||
{
|
||||
bool typeWriting = isTypeWriting(servicePath);
|
||||
@ -313,7 +347,7 @@ void TrayModel::onSniTrayAdded(const QString &servicePath)
|
||||
|
||||
beginInsertRows(QModelIndex(), rowCount(), rowCount());
|
||||
WinInfo info;
|
||||
info.type = SNI;
|
||||
info.type = Sni;
|
||||
info.key = "sni:" + servicePath;
|
||||
info.servicePath = servicePath;
|
||||
info.isTypeWriting = typeWriting; // 是否为输入法
|
||||
@ -395,7 +429,7 @@ void TrayModel::onIndicatorAdded(const QString &indicatorName)
|
||||
|
||||
beginInsertRows(QModelIndex(), rowCount(), rowCount());
|
||||
WinInfo info;
|
||||
info.type = INDICATOR;
|
||||
info.type = Incicator;
|
||||
info.key = itemKey;
|
||||
m_winInfos.append(info);
|
||||
endInsertRows();
|
||||
@ -407,6 +441,21 @@ void TrayModel::onIndicatorRemoved(const QString &indicatorName)
|
||||
removeRow(itemKey);
|
||||
}
|
||||
|
||||
void TrayModel::onSystemItemRemoved(PluginsItemInterface *itemInter)
|
||||
{
|
||||
beginInsertRows(QModelIndex(), rowCount(), rowCount());
|
||||
|
||||
for (const WinInfo &info : m_winInfos) {
|
||||
if (info.pluginInter != itemInter)
|
||||
continue;
|
||||
|
||||
m_winInfos.removeOne(info);
|
||||
break;
|
||||
}
|
||||
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
void TrayModel::removeRow(const QString &itemKey)
|
||||
{
|
||||
for (const WinInfo &info : m_winInfos) {
|
||||
|
@ -28,13 +28,15 @@
|
||||
class TrayMonitor;
|
||||
class IndicatorPlugin;
|
||||
class IndicatorTrayItem;
|
||||
class PluginsItemInterface;
|
||||
|
||||
enum TrayIconType {
|
||||
UNKNOW,
|
||||
XEMBED,
|
||||
SNI,
|
||||
INDICATOR,
|
||||
EXPANDICON
|
||||
UnKnow,
|
||||
XEmbed,
|
||||
Sni,
|
||||
Incicator,
|
||||
ExpandIcon,
|
||||
SystemItem
|
||||
};
|
||||
|
||||
struct WinInfo {
|
||||
@ -43,19 +45,22 @@ struct WinInfo {
|
||||
quint32 winId;
|
||||
QString servicePath;
|
||||
bool isTypeWriting;
|
||||
PluginsItemInterface *pluginInter;
|
||||
|
||||
WinInfo() : type(UNKNOW)
|
||||
WinInfo() : type(UnKnow)
|
||||
, key(QString())
|
||||
, winId(0)
|
||||
, servicePath(QString())
|
||||
, isTypeWriting(false) {}
|
||||
, isTypeWriting(false)
|
||||
, pluginInter(nullptr) {}
|
||||
|
||||
bool operator==(const WinInfo &other) {
|
||||
return this->type == other.type
|
||||
&& this->key == other.key
|
||||
&& this->winId == other.winId
|
||||
&& this->servicePath == other.servicePath
|
||||
&& this->isTypeWriting == other.isTypeWriting;
|
||||
&& this->isTypeWriting == other.isTypeWriting
|
||||
&& this->pluginInter == other.pluginInter;
|
||||
}
|
||||
};
|
||||
|
||||
@ -69,6 +74,7 @@ public:
|
||||
KeyRole,
|
||||
WinIdRole,
|
||||
ServiceRole,
|
||||
PluginInterfaceRole,
|
||||
Blank
|
||||
};
|
||||
|
||||
@ -113,11 +119,15 @@ private Q_SLOTS:
|
||||
void onIndicatorAdded(const QString &indicatorName);
|
||||
void onIndicatorRemoved(const QString &indicatorName);
|
||||
|
||||
void onSystemItemRemoved(PluginsItemInterface *itemInter);
|
||||
|
||||
private:
|
||||
bool exist(const QString &itemKey);
|
||||
QString fileNameByServiceName(const QString &serviceName);
|
||||
bool isTypeWriting(const QString &servicePath);
|
||||
|
||||
void systemItemAdded(PluginsItemInterface *itemInter);
|
||||
|
||||
protected:
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
|
||||
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
|
||||
|
@ -231,7 +231,7 @@ void TrayManagerWindow::initUi()
|
||||
m_splitLine->setPalette(pal);
|
||||
|
||||
WinInfo info;
|
||||
info.type = TrayIconType::EXPANDICON;
|
||||
info.type = TrayIconType::ExpandIcon;
|
||||
m_model->addRow(info);
|
||||
m_trayView->openPersistentEditor(m_model->index(0, 0));
|
||||
|
||||
|
@ -37,6 +37,10 @@ namespace Dock {
|
||||
#define PLUGIN_ICON_MAX_SIZE 20
|
||||
#define PLUGIN_ITEM_WIDTH 300
|
||||
|
||||
#define QUICK_PATH "/plugins/quick-trays"
|
||||
#define PLUGIN_PATH "/plugins"
|
||||
#define TRAY_PATH "/plugins/system-trays"
|
||||
|
||||
// 需求变更成插件图标始终保持20x20,但16x16的资源还在。所以暂时保留此宏
|
||||
#define PLUGIN_ICON_MIN_SIZE 20
|
||||
|
||||
|
@ -26,7 +26,7 @@ pkg_check_modules(QGSettings REQUIRED gsettings-qt)
|
||||
|
||||
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
|
||||
add_library(${PLUGIN_NAME} SHARED ${SRCS} resources/airplane_mode.qrc)
|
||||
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../system-trays)
|
||||
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ..)
|
||||
|
||||
target_include_directories(${PLUGIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS}
|
||||
${QGSettings_INCLUDE_DIRS}
|
||||
@ -45,4 +45,4 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE
|
||||
${Qt5Widgets_LIBRARIES}
|
||||
${Qt5Svg_LIBRARIES})
|
||||
|
||||
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins/system-trays)
|
||||
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins)
|
||||
|
@ -37,5 +37,5 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE
|
||||
${Qt5DBus_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins/system-trays/)
|
||||
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins/)
|
||||
install(FILES ./keybord_layout.json DESTINATION /etc/dde-dock/indicator)
|
||||
|
Loading…
x
Reference in New Issue
Block a user