system-tray add enable config

Change-Id: I5041305baaf56061f784d2fddacd4d2c3b797a83
This commit is contained in:
haruyukilxz 2018-06-06 17:29:22 +08:00
parent c9c0194065
commit 13259cf3aa
Notes: gerrit 2018-06-06 19:39:54 +08:00
Verified+1: <jenkins@deepin.com>
Code-Review+2: kirigayakazushin <lxz@ilxz.me>
Submitted-by: kirigayakazushin <lxz@ilxz.me>
Submitted-at: Wed, 06 Jun 2018 19:39:53 +0800
Reviewed-on: https://cr.deepin.io/35461
Project: dde/dde-dock
Branch: refs/heads/master

View File

@ -56,6 +56,11 @@ const QString SystemTrayPlugin::pluginName() const
void SystemTrayPlugin::init(PluginProxyInterface *proxyInter)
{
if (!m_containerSettings->value("enable", true).toBool()) {
qDebug() << "hide tray from config disable!!";
return;
}
m_proxyInter = proxyInter;
connect(m_trayInter, &DBusTrayManager::TrayIconsChanged, this, &SystemTrayPlugin::trayListChanged);