summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp15
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/mediadetect.cpp3
-rw-r--r--noncore/multimedia/opieplayer2/opieplayer2.pro1
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
@@ -78,14 +78,15 @@ void Ticker::timerEvent( QTimerEvent * ) {
pos = ( pos + 1 > pixelLen ) ? 0 : pos + 1;
scroll( -1, 0, contentsRect() );
repaint( FALSE );
}
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() );
QPainter pmp( &pm );
for ( int i = 0; i - pos < width() && (i < 1 || pixelLen > width()); i += pixelLen ) {
pmp.drawText( i - pos, 0, INT_MAX, height(), AlignVCenter, scrollText );
}
@@ -124,15 +125,14 @@ static void changeTextColor( QWidget *w ) {
}
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") );
Config cfg("OpiePlayer");
cfg.setGroup("Options");
skin = cfg.readEntry("Skin","default");
@@ -233,14 +233,13 @@ QPixmap *combineImageWithBackground( QImage img, QPixmap bg, QPoint offset ) {
p.drawTiledPixmap( pix.rect(), bg, offset );
p.drawImage( 0, 0, img );
return new QPixmap( pix );
}
-QPixmap *maskPixToMask( QPixmap pix, QBitmap mask )
-{
+QPixmap *maskPixToMask( QPixmap pix, QBitmap mask ) {
QPixmap *pixmap = new QPixmap( pix );
pixmap->setMask( mask );
return pixmap;
}
@@ -439,14 +438,13 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
emit forwardClicked();
return;
case AudioBack:
emit backClicked();
return;
}
- }
- else if ( !isOnButton && audioButtons[i].isHeld ) {
+ } else if ( !isOnButton && audioButtons[i].isHeld ) {
audioButtons[i].isHeld = FALSE;
toggleButton(i);
}
} else {
if ( audioButtons[i].isHeld ) {
audioButtons[i].isHeld = FALSE;
@@ -519,14 +517,13 @@ void AudioWidget::paintEvent( QPaintEvent * pe) {
QPainter p( this );
for ( int i = 0; i < numButtons; i++ )
paintButton( &p, i );
}
}
-void AudioWidget::keyReleaseEvent( QKeyEvent *e)
-{
+void AudioWidget::keyReleaseEvent( QKeyEvent *e) {
switch ( e->key() ) {
////////////////////////////// Zaurus keys
case Key_Home:
break;
case Key_F9: //activity
hide();
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
@@ -162,14 +162,14 @@ int Lib::subVersion() {
}
int Lib::play( const QString& fileName,
int startPos,
int start_time ) {
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);
}
void Lib::stop() {
qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>");
xine_stop(m_xine );
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
@@ -19,12 +19,15 @@ char MediaDetect::videoOrAudio( const QString& fileName ) {
} else if ( (fileName.lower()).right(4) == "·mp1" ||
(fileName.lower()).right(4) == ".mp3" ||
(fileName.lower()).right(4) == ".ogg" ||
(fileName.lower()).right(4) == ".wav" ) {
qDebug("AUDIO out taken");
return 'a';
+ } else if ( (fileName.lower()).left(7) == "http://" &&
+ (fileName.lower()).right(1) == "/" ) {
+ return 'a';
} else {
return 'f';
}
}
bool MediaDetect::isStreaming( const QString& fileName ) {
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,8 +1,9 @@
TEMPLATE = app
CONFIG = qt warn_on release
+#CONFIG = qt warn_on debug
#release
DESTDIR = $(OPIEDIR)/bin
HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h mediadetect.h\
videowidget.h audiowidget.h playlistwidget.h mediaplayer.h inputDialog.h \
frame.h lib.h xinevideowidget.h volumecontrol.h\
alphablend.h yuv2rgb.h