mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: 关闭飞行模式场景下不显示图标
1. 用户隐藏插件时,不加入到界面布局中 Log: Influence: 任务栏-插件区域-飞行模式插件-关闭飞行模式时,任务栏不显示该图标 Bug: https://pms.uniontech.com/zentao/bug-view-108515.html Change-Id: Id02fa1399a9eb3100225040e969e3edd2fc5e9cc
This commit is contained in:
parent
72b1b37c35
commit
b087e00ff9
@ -305,7 +305,9 @@ void DockItemManager::pluginItemInserted(PluginsItem *item)
|
|||||||
insertIndex ++;
|
insertIndex ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
emit itemInserted(insertIndex - firstPluginPosition, item);
|
// 隐藏的插件不加入到布局中
|
||||||
|
if (Utils::SettingValue(QString("com.deepin.dde.dock.module.") + item->pluginName(), QByteArray(), "enable", true).toBool())
|
||||||
|
emit itemInserted(insertIndex - firstPluginPosition, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DockItemManager::pluginItemRemoved(PluginsItem *item)
|
void DockItemManager::pluginItemRemoved(PluginsItem *item)
|
||||||
|
@ -57,8 +57,6 @@ AirplaneModeItem::AirplaneModeItem(QWidget *parent)
|
|||||||
connect(m_airplaneModeInter, &DBusAirplaneMode::EnabledChanged, this, [this](bool enable) {
|
connect(m_airplaneModeInter, &DBusAirplaneMode::EnabledChanged, this, [this](bool enable) {
|
||||||
m_applet->setEnabled(enable);
|
m_applet->setEnabled(enable);
|
||||||
refreshIcon();
|
refreshIcon();
|
||||||
|
|
||||||
Utils::SettingSaveValue("com.deepin.dde.dock.module.airplane-mode", QByteArray(), "enable", enable);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
m_applet->setEnabled(m_airplaneModeInter->enabled());
|
m_applet->setEnabled(m_airplaneModeInter->enabled());
|
||||||
@ -105,6 +103,7 @@ const QString AirplaneModeItem::contextMenu() const
|
|||||||
|
|
||||||
void AirplaneModeItem::invokeMenuItem(const QString menuId, const bool checked)
|
void AirplaneModeItem::invokeMenuItem(const QString menuId, const bool checked)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(menuId);
|
||||||
Q_UNUSED(checked);
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
/* 控制中心暂未实现
|
/* 控制中心暂未实现
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "systemtrayscontroller.h"
|
#include "systemtrayscontroller.h"
|
||||||
#include "pluginsiteminterface.h"
|
#include "pluginsiteminterface.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@ -50,11 +51,11 @@ void SystemTraysController::itemAdded(PluginsItemInterface * const itemInter, co
|
|||||||
}
|
}
|
||||||
}, Qt::QueuedConnection);
|
}, Qt::QueuedConnection);
|
||||||
|
|
||||||
item->setVisible(false);
|
|
||||||
|
|
||||||
mPluginsMap[itemInter][itemKey] = item;
|
mPluginsMap[itemInter][itemKey] = item;
|
||||||
|
|
||||||
emit pluginItemAdded(itemKey, item);
|
// 隐藏的插件不加入到布局中
|
||||||
|
if (Utils::SettingValue(QString("com.deepin.dde.dock.module.") + itemInter->pluginName(), QByteArray(), "enable", true).toBool())
|
||||||
|
emit pluginItemAdded(itemKey, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SystemTraysController::itemUpdate(PluginsItemInterface * const itemInter, const QString &itemKey)
|
void SystemTraysController::itemUpdate(PluginsItemInterface * const itemInter, const QString &itemKey)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user