From d7670f31b109e739a8851e48a740c709b9c301bf Mon Sep 17 00:00:00 2001 From: kirigaya Date: Tue, 27 Jun 2017 16:31:07 +0800 Subject: [PATCH] Indicator plugin: update titles --- plugins/indicator/View/indicatorwidget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/indicator/View/indicatorwidget.cpp b/plugins/indicator/View/indicatorwidget.cpp index b1e9502..795e2ca 100644 --- a/plugins/indicator/View/indicatorwidget.cpp +++ b/plugins/indicator/View/indicatorwidget.cpp @@ -19,6 +19,9 @@ IndicatorWidget::IndicatorWidget(QWidget *parent) : QWidget(parent) connect(m_dockInter, &DBusDock::EntryAdded, this, &IndicatorWidget::addEntry); connect(m_dockInter, &DBusDock::EntryRemoved, this, &IndicatorWidget::removeEntry); + connect(m_dockInter, &DBusDock::EntriesChanged, this, [=] { + qDebug() << "ssssss"; + }); connect(m_smallWatcher, &QFutureWatcher::finished, this, &IndicatorWidget::refreshIcon); @@ -61,6 +64,9 @@ void IndicatorWidget::addEntry(const QDBusObjectPath &entryPath, const int index m_entryList.append(entry); connect(entry, &DBusDockEntry::ActiveChanged, this, &IndicatorWidget::refreshActiveWindow, Qt::UniqueConnection); + connect(entry, &DBusDockEntry::TitlesChanged, this, [=] { + m_entry->setText(windowTitle(entry->titles())); + }); refreshActiveWindow(); }