Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpad/src/kded/kded.cpp
Show First 20 Lines • Show All 220 Lines • ▼ Show 20 Line(s) | 220 | showNotification("TouchpadEnabled", | |||
---|---|---|---|---|---|
221 | i18n("Touchpad was enabled because the mouse was unplugged")); | 221 | i18n("Touchpad was enabled because the mouse was unplugged")); | ||
222 | } | 222 | } | ||
223 | 223 | | |||
224 | m_backend->setTouchpadEnabled(newState); | 224 | m_backend->setTouchpadEnabled(newState); | ||
225 | } | 225 | } | ||
226 | 226 | | |||
227 | void TouchpadDisabler::showNotification(const QString &name, const QString &text) | 227 | void TouchpadDisabler::showNotification(const QString &name, const QString &text) | ||
228 | { | 228 | { | ||
229 | KNotification::event(name, text, QPixmap(), //Icon is specified in .notifyrc | 229 | if (m_notification) { | ||
230 | m_notification->close(); | ||||
231 | } | ||||
232 | | ||||
233 | m_notification = KNotification::event(name, text, QPixmap(), //Icon is specified in .notifyrc | ||||
230 | 0, | 234 | 0, | ||
231 | KNotification::CloseOnTimeout, | 235 | KNotification::CloseOnTimeout, | ||
232 | "kcm_touchpad"); // this has to match the name of the .notifyrc file | 236 | "kcm_touchpad"); // this has to match the name of the .notifyrc file | ||
233 | //TouchpadPluginFactory::componentData()); | 237 | //TouchpadPluginFactory::componentData()); | ||
234 | } | 238 | } | ||
235 | 239 | | |||
236 | bool TouchpadDisabler::isMousePluggedIn() const | 240 | bool TouchpadDisabler::isMousePluggedIn() const | ||
237 | { | 241 | { | ||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |