All pastes #738519 Raw Edit

kaffeine dvbsource patch

public diff v1 · immutable
·published 2007-10-16 12:31 UTC
rendered paste body
Index: dvbpanel.cpp===================================================================--- src/input/dvb/dvbpanel.cpp	(revision 666596)+++ src/input/dvb/dvbpanel.cpp	(working copy)@@ -31,6 +31,7 @@ #include <qapplication.h> #include <qpopupmenu.h> #include <qmap.h>+#include <qregexp.h>  #include <kiconloader.h> #include <klocale.h>@@ -1136,7 +1137,7 @@ 	bool cont=false; 	QPtrList<Transponder> trans = getSourcesStatus(); 	trans.setAutoDelete( true );-+	QString tsource; 	searchLE->clear(); 	channelsCb->clear(); 	for ( i=0; i<(int)channels.count(); i++ ) {@@ -1141,7 +1141,8 @@ 		} 		else if ( currentCategory!="All" && chan->category!=currentCategory ) 			continue;-		it = new KListViewItem( channelsCb, QString().sprintf("%04d", chan->num), chan->name, chan->tp.source );+		tsource=chan->tp.source;+		it = new KListViewItem( channelsCb, QString().sprintf("%04d", chan->num), chan->name, QString().sprintf("%s-%05lu%c",tsource.remove( QRegExp(".*-")).ascii(), chan->tp.freq, chan->tp.type==FE_QPSK ?chan->tp.pol:' ') ); 		if ( ch && ch==chan ) 			visible = it; 		it->setDragEnabled( true );@@ -2146,7 +2148,7 @@ 	QString s, c, t, u, type; 	int pos, tpos; 	ChannelDesc *chan;-	QString src="";+	QString src="",tsource; 	int ns; 	KListViewItem *it; 	QPixmap pix;@@ -2381,7 +2383,8 @@ 			}  			chan->pix.load( dvbConfig->dvbConfigIconsDir+chan->name );-			it = new KListViewItem( channelsCb, QString().sprintf("%04d", chan->num), chan->name, chan->tp.source );+			tsource=chan->tp.source;+			it = new KListViewItem( channelsCb, QString().sprintf("%04d", chan->num), chan->name, QString().sprintf("%s-%05lu%c",tsource.remove( QRegExp(".*-")).ascii(), chan->tp.freq, chan->tp.type==FE_QPSK ?chan->tp.pol:' ') ); 			it->setDragEnabled( true ); 			if ( !chan->pix.isNull() ) 				it->setPixmap( 1, chan->pix );