[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/kopete
From: Jakub Stachowski <qbast () go2 ! pl>
Date: 2005-12-31 23:37:58
Message-ID: 1136072278.479539.15890.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 492997 by qbast:
Fix systray animated icon
M +8 -4 systemtray.cpp
--- trunk/KDE/kdenetwork/kopete/kopete/systemtray.cpp #492996:492997
@@ -101,6 +101,7 @@
// kdDebug(14010) << "[KopeteSystemTray] ~KopeteSystemTray" << endl;
// delete mBlinkTimer;
Kopete::UI::Global::setSysTrayWId( 0 );
+ delete mMovie;
}
void KopeteSystemTray::mousePressEvent( QMouseEvent *me )
@@ -162,7 +163,8 @@
void KopeteSystemTray::startBlink( QMovie *movie )
{
//kdDebug( 14010 ) << k_funcinfo << "starting movie." << endl;
- const_cast<QMovie *>( movie )->unpause();
+ kdDebug( 14010 ) << "Movie is " << movie->loopCount() << " loops, " << \
movie->frameCount() << " frames " << endl; + movie->unpause();
setMovie( movie );
mIsBlinking = true;
}
@@ -170,8 +172,10 @@
void KopeteSystemTray::startBlink()
{
if ( !mMovie )
- mMovie = new QMovie(KGlobal::iconLoader()->loadMovie( QString::fromLatin1( \
"newmessage" ), KIcon::Panel ));
-
+ mMovie = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "newmessage" ), \
KIcon::Panel ); + // KIconLoader already checked isValid()
+ if ( !mMovie) return;
+
startBlink( mMovie );
}
@@ -182,7 +186,7 @@
else if ( mBlinkTimer->isActive() )
mBlinkTimer->stop();
- if ( !mMovie->isValid() )
+ if ( mMovie )
mMovie->pause();
mIsBlinkIcon = false;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic