Version: (using Devel) Installed from: Compiled sources Needs better strings. Index: lockout.cpp =================================================================== --- lockout.cpp (revisión: 893043) +++ lockout.cpp (copia de trabajo) @@ -20,7 +20,8 @@ #include "lockout.h" // Plasma -#include <Plasma/IconWidget> +// #include <Plasma/IconWidget> +#include <Plasma/ToolTipManager> // Qt #include <QtGui/QWidget> // QWIDGETSIZE_MAX @@ -55,13 +56,13 @@ m_layout->setContentsMargins(0,0,0,0); m_layout->setSpacing(0); - Plasma::IconWidget *icon_lock = new Plasma::IconWidget(KIcon("system-lock-screen"), "", this); - m_layout->addItem(icon_lock); - connect(icon_lock, SIGNAL(clicked()), this, SLOT(clickLock())); + m_icon_lock = new Plasma::IconWidget(KIcon("system-lock-screen"), "", this); + m_layout->addItem(m_icon_lock); + connect(m_icon_lock, SIGNAL(clicked()), this, SLOT(clickLock())); #ifndef Q_OS_WIN - Plasma::IconWidget *icon_logout = new Plasma::IconWidget(KIcon("system-shutdown"), "", this); - m_layout->addItem(icon_logout); - connect(icon_logout, SIGNAL(clicked()), this, SLOT(clickLogout())); + m_icon_logout = new Plasma::IconWidget(KIcon("system-shutdown"), "", this); + m_layout->addItem(m_icon_logout); + connect(m_icon_logout, SIGNAL(clicked()), this, SLOT(clickLogout())); #endif } @@ -118,6 +119,11 @@ if (constraints & Plasma::FormFactorConstraint || constraints & Plasma::SizeConstraint) { checkLayout(); + Plasma::ToolTipContent lockData(i18n("lock"), i18n("generic lock"), m_icon_lock->icon()); + Plasma::ToolTipManager::self()->setContent(m_icon_lock, lockData); + Plasma::ToolTipContent logoutData(i18n("logout"), i18n("generic logout"), m_icon_logout->icon()); + Plasma::ToolTipManager::self()->setContent(m_icon_logout, logoutData); + } } Index: lockout.h =================================================================== --- lockout.h (revisión: 893043) +++ lockout.h (copia de trabajo) @@ -21,6 +21,7 @@ #define LOCKOUT_H #include <Plasma/Applet> +#include <Plasma/IconWidget> class QGraphicsLinearLayout; @@ -41,6 +42,8 @@ private: QGraphicsLinearLayout *m_layout; void checkLayout(); + Plasma::IconWidget *m_icon_lock; + Plasma::IconWidget *m_icon_logout; }; K_EXPORT_PLASMA_APPLET(lockout, LockOut)
Implemented in revision 925637 (http://websvn.kde.org/?view=rev&revision=925637). Someone mark it as FIXED (I am not empowered enough).