Changeset View
Changeset View
Standalone View
Standalone View
src/platformtheme/kdeplatformsystemtrayicon.cpp
Show First 20 Lines • Show All 284 Lines • ▼ Show 20 Line(s) | |||||
285 | } | 285 | } | ||
286 | 286 | | |||
287 | void KDEPlatformSystemTrayIcon::init() | 287 | void KDEPlatformSystemTrayIcon::init() | ||
288 | { | 288 | { | ||
289 | if (!m_sni) { | 289 | if (!m_sni) { | ||
290 | m_sni = new KStatusNotifierItem(); | 290 | m_sni = new KStatusNotifierItem(); | ||
291 | m_sni->setStandardActionsEnabled(false); | 291 | m_sni->setStandardActionsEnabled(false); | ||
292 | m_sni->setTitle(QApplication::applicationDisplayName()); | 292 | m_sni->setTitle(QApplication::applicationDisplayName()); | ||
293 | m_sni->setStatus(KStatusNotifierItem::Active); | ||||
293 | connect(m_sni, &KStatusNotifierItem::activateRequested, [this](bool active, const QPoint &pos) { | 294 | connect(m_sni, &KStatusNotifierItem::activateRequested, [this](bool active, const QPoint &pos) { | ||
294 | Q_UNUSED(active) | 295 | Q_UNUSED(active) | ||
295 | Q_UNUSED(pos) | 296 | Q_UNUSED(pos) | ||
296 | emit activated(QPlatformSystemTrayIcon::Trigger); | 297 | emit activated(QPlatformSystemTrayIcon::Trigger); | ||
297 | }); | 298 | }); | ||
298 | connect(m_sni, &KStatusNotifierItem::secondaryActivateRequested, [this](const QPoint &pos) { | 299 | connect(m_sni, &KStatusNotifierItem::secondaryActivateRequested, [this](const QPoint &pos) { | ||
299 | Q_UNUSED(pos) | 300 | Q_UNUSED(pos) | ||
300 | emit activated(QPlatformSystemTrayIcon::MiddleClick); | 301 | emit activated(QPlatformSystemTrayIcon::MiddleClick); | ||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |