Summary: | kget tooltip doesn't stay up | ||
---|---|---|---|
Product: | [Applications] kget | Reporter: | David Pretty <david.pretty> |
Component: | general | Assignee: | KGet authors <kget> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mmodem00 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | patch against current CVS_HEAD |
Description
David Pretty
2004-08-29 07:01:21 UTC
I can reproduce it with the same version and the SuSE 9.1 binary-RPMs That's true. While mouse-cursor is in motion above systray-icon, tolltips shows up. But when stopping moving, it disappears. Please fix this :) THX! I can also reproduce this (as of KDE 3.3) I aso vote for resolution of this bug :) Danny Yes it happens also to me, with KDE 3.3.0 compiled from source. Created attachment 9160 [details]
patch against current CVS_HEAD
CVS commit by ratz: Fixes bug 88360 BUG: 88360 M +26 -6 docking.cpp 1.25 M +16 -1 docking.h 1.13 --- kdenetwork/kget/docking.cpp #1.24:1.25 @@ -51,5 +51,7 @@ DockWidget::DockWidget(KMainWidget * _pa // Enable dropping setAcceptDrops(true); - QToolTip::add( this, kapp->aboutData()->shortDescription() ); + + dtip = new DynamicTip( this ); + dtip->setStatus( kapp->aboutData()->shortDescription() ); } @@ -57,4 +59,6 @@ DockWidget::DockWidget(KMainWidget * _pa DockWidget::~DockWidget() { + delete dtip; + dtip = 0; } @@ -95,11 +99,27 @@ void DockWidget::contextMenuAboutToShow } -#include "docking.moc" +void DockWidget::updateToolTip( const QString& _status ) +{ + dtip->setStatus( _status ); +} -void DockWidget::updateToolTip( const QString& status ) +DynamicTip::DynamicTip( QWidget * parent ) + : QToolTip( parent ) { - QToolTip::remove( this ); - QToolTip::add( this, status ); + // no explicit initialization needed +} + +void DynamicTip::setStatus( const QString & _status ) +{ + status = _status; } + +void DynamicTip::maybeTip( const QPoint & _pos ) +{ + QRect r( parentWidget()->rect() ); + tip( r, status ); +} + +#include "docking.moc" --- kdenetwork/kget/docking.h #1.12:1.13 @@ -39,4 +39,18 @@ class KPopupMenu; class KMainWidget; +class DynamicTip : public QToolTip +{ + public: + DynamicTip( QWidget * parent ); + virtual ~DynamicTip() {}//TODO workaround for qt-bug, can be removed after 4.0 + void setStatus( const QString & _status ); + + protected: + void maybeTip( const QPoint & ); + + private: + QString status; +}; + class DockWidget:public KSystemTray { @@ -61,4 +75,5 @@ protected: private: KMainWidget *parent; + DynamicTip * dtip; }; *** Bug 100221 has been marked as a duplicate of this bug. *** |