Changeset View
Changeset View
Standalone View
Standalone View
src/kstatusnotifieritemdbus_p.cpp
Show First 20 Lines • Show All 284 Lines • ▼ Show 20 Line(s) | 284 | if (!m_statusNotifierItem->d->menu->isVisible()) { | |||
---|---|---|---|---|---|
285 | m_statusNotifierItem->d->menu->popup(QPoint(x, y)); | 285 | m_statusNotifierItem->d->menu->popup(QPoint(x, y)); | ||
286 | } else { | 286 | } else { | ||
287 | m_statusNotifierItem->d->menu->hide(); | 287 | m_statusNotifierItem->d->menu->hide(); | ||
288 | } | 288 | } | ||
289 | } | 289 | } | ||
290 | 290 | | |||
291 | void KStatusNotifierItemDBus::Activate(int x, int y) | 291 | void KStatusNotifierItemDBus::Activate(int x, int y) | ||
292 | { | 292 | { | ||
293 | if (m_statusNotifierItem->d->associatedWidget == m_statusNotifierItem->d->menu) { | | |||
kmaterka: This check is duplicated, it should be safe to remove it here. | |||||
294 | ContextMenu(x, y); | | |||
295 | } else { | | |||
296 | m_statusNotifierItem->activate(QPoint(x, y)); | 293 | m_statusNotifierItem->activate(QPoint(x, y)); | ||
297 | } | 294 | } | ||
298 | } | | |||
299 | 295 | | |||
300 | void KStatusNotifierItemDBus::SecondaryActivate(int x, int y) | 296 | void KStatusNotifierItemDBus::SecondaryActivate(int x, int y) | ||
301 | { | 297 | { | ||
302 | emit m_statusNotifierItem->secondaryActivateRequested(QPoint(x, y)); | 298 | emit m_statusNotifierItem->secondaryActivateRequested(QPoint(x, y)); | ||
303 | } | 299 | } | ||
304 | 300 | | |||
305 | void KStatusNotifierItemDBus::Scroll(int delta, const QString &orientation) | 301 | void KStatusNotifierItemDBus::Scroll(int delta, const QString &orientation) | ||
306 | { | 302 | { | ||
307 | Qt::Orientation dir = (orientation.toLower() == QLatin1String("horizontal") ? Qt::Horizontal : Qt::Vertical); | 303 | Qt::Orientation dir = (orientation.toLower() == QLatin1String("horizontal") ? Qt::Horizontal : Qt::Vertical); | ||
308 | emit m_statusNotifierItem->scrollRequested(delta, dir); | 304 | emit m_statusNotifierItem->scrollRequested(delta, dir); | ||
309 | } | 305 | } | ||
310 | 306 | |
This check is duplicated, it should be safe to remove it here.