[PATCH] Animated Gif in kdm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here a small patch allow kdm to play animation in the logo slot.
I think he need more improvement like a better test of the file type.
I try with kde 3.2.2

--
Sylvain "Skarsnik" Colinet


45d44
< #include <qmovie.h>
146,163c145,152
< 	    	QPixmap pixmap;
< 		//Improve design by add Animation player
< 	 	QMovie movie;
< 		QRegExp regex( "(\\.gif)|(\\.mng)$" ); 
< 		pixLabel = new QLabel( winFrame );
< 		pixLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
< 		pixLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
< 		pixLabel->setAutoResize( true );
< 		pixLabel->setIndent( 0 );
< 		// must found a better way to test the file type
< 		if ( regex.search( kdmcfg->_logo ) != -1 ) {
< 			movie = QMovie( kdmcfg->_logo );
< 			pixLabel->setMovie( movie );
< 		}
< 		else {
< 		    if (pixmap.load( kdmcfg->_logo )) {
< 		       pixLabel->setPixmap( pixmap );
< 		    }
---
> 		QPixmap pixmap;
> 		if (pixmap.load( kdmcfg->_logo )) {
> 		    pixLabel = new QLabel( winFrame );
> 		    pixLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
> 		    pixLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
> 		    pixLabel->setAutoResize( true );
> 		    pixLabel->setIndent( 0 );
> 		    pixLabel->setPixmap( pixmap );
___________________________________________________
.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux