author | harlekin <harlekin> | 2002-08-18 23:15:50 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-18 23:15:50 (UTC) |
commit | d92fbca743e676182a8f33ae4c28044031143fb0 (patch) (side-by-side diff) | |
tree | 557b19a000a897e46ed1a8e18a4fdd41aa199e0d | |
parent | bec883a38720a1e1a975e5474a3085d149cf935c (diff) | |
download | opie-d92fbca743e676182a8f33ae4c28044031143fb0.zip opie-d92fbca743e676182a8f33ae4c28044031143fb0.tar.gz opie-d92fbca743e676182a8f33ae4c28044031143fb0.tar.bz2 |
small fixes regarding shoutcast, but for now user need to have http:// anything / as shoutcast url
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 15 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediadetect.cpp | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/opieplayer2.pro | 1 |
4 files changed, 12 insertions, 11 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 6d867e5..bf3590b 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -82,6 +82,7 @@ void Ticker::timerEvent( QTimerEvent * ) { void Ticker::drawContents( QPainter *p ) { - for ( int i = 0; i - pos < width() && (i < 1 || pixelLen > width()); i += pixelLen ) + for ( int i = 0; i - pos < width() && (i < 1 || pixelLen > width()); i += pixelLen ) { p->drawText( i - pos, 0, INT_MAX, height(), AlignVCenter, scrollText ); + } QPixmap pm( width(), height() ); pm.fill( colorGroup().base() ); @@ -128,7 +129,6 @@ static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : - QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { - + QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { setCaption( tr("OpiePlayer") ); @@ -237,6 +237,5 @@ QPixmap *combineImageWithBackground( QImage img, QPixmap bg, QPoint offset ) { -QPixmap *maskPixToMask( QPixmap pix, QBitmap mask ) -{ +QPixmap *maskPixToMask( QPixmap pix, QBitmap mask ) { QPixmap *pixmap = new QPixmap( pix ); pixmap->setMask( mask ); @@ -443,6 +442,5 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { return; } - } - else if ( !isOnButton && audioButtons[i].isHeld ) { + } else if ( !isOnButton && audioButtons[i].isHeld ) { audioButtons[i].isHeld = FALSE; toggleButton(i); @@ -523,6 +521,5 @@ void AudioWidget::paintEvent( QPaintEvent * pe) { } -void AudioWidget::keyReleaseEvent( QKeyEvent *e) -{ +void AudioWidget::keyReleaseEvent( QKeyEvent *e) { switch ( e->key() ) { ////////////////////////////// Zaurus keys diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 39364ab..3a82a50 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp @@ -166,6 +166,6 @@ int Lib::play( const QString& fileName, QString str = fileName.stripWhiteSpace(); //workaround OpiePlayer bug - if (str.right(1) == QString::fromLatin1("/") ) - str = str.mid( str.length() -1 ); + //f (str.right(1) == QString::fromLatin1("/") ) + // str = str.mid( str.length() -1 ); return xine_play( m_xine, QFile::encodeName(str.utf8() ).data(), startPos, start_time); diff --git a/noncore/multimedia/opieplayer2/mediadetect.cpp b/noncore/multimedia/opieplayer2/mediadetect.cpp index 5e0da88..91137db 100644 --- a/noncore/multimedia/opieplayer2/mediadetect.cpp +++ b/noncore/multimedia/opieplayer2/mediadetect.cpp @@ -23,4 +23,7 @@ char MediaDetect::videoOrAudio( const QString& fileName ) { qDebug("AUDIO out taken"); return 'a'; + } else if ( (fileName.lower()).left(7) == "http://" && + (fileName.lower()).right(1) == "/" ) { + return 'a'; } else { return 'f'; diff --git a/noncore/multimedia/opieplayer2/opieplayer2.pro b/noncore/multimedia/opieplayer2/opieplayer2.pro index edc4624..03540a1 100644 --- a/noncore/multimedia/opieplayer2/opieplayer2.pro +++ b/noncore/multimedia/opieplayer2/opieplayer2.pro @@ -1,4 +1,5 @@ TEMPLATE = app CONFIG = qt warn_on release +#CONFIG = qt warn_on debug #release DESTDIR = $(OPIEDIR)/bin |