summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-08-22 01:35:24 (UTC)
committer llornkcor <llornkcor>2002-08-22 01:35:24 (UTC)
commitee90b966cfc262770ef5a45c2bad0af6766245a2 (patch) (side-by-side diff)
tree3b80601759e3a2418b1b805229e4ea074fd7708f
parentdbf4e3458811379488842f5d83650c7e4c6831aa (diff)
downloadopie-ee90b966cfc262770ef5a45c2bad0af6766245a2.zip
opie-ee90b966cfc262770ef5a45c2bad0af6766245a2.tar.gz
opie-ee90b966cfc262770ef5a45c2bad0af6766245a2.tar.bz2
should scan for file at startup
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp1
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp11
2 files changed, 8 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 603d426..bf2acc8 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -174,24 +174,25 @@ void MediaPlayer::stopChangingVolume() {
}
void MediaPlayer::timerEvent( QTimerEvent * ) {
if ( volumeDirection == +1 ) {
volControl->incVol(2);
} else if ( volumeDirection == -1 ) {
volControl->decVol(2);
}
// TODO FIXME
+ // huh??
unsigned int v= 0;
v = volControl->volume();
v = v / 10;
if ( drawnOnScreenDisplay && onScreenDisplayVolume == v ) {
return;
}
int w=0; int h=0;
if( !xineControl->hasVideo()) {
w = audioUI->width();
h = audioUI->height();
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 6c7f6ba..603a7a3 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -116,33 +116,34 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) );
connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) );
connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) );
connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) );
connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) );
readConfig( cfg );
QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "" );
loadList(DocLnk( currentPlaylist ) );
setCaption( tr( "OpiePlayer: " ) + currentPlaylist );
// see which skins are installed
+ videoScan=FALSE;
+ audioScan=FALSE;
populateSkinsMenu();
initializeStates();
}
PlayListWidget::~PlayListWidget() {
-/* fixing symptoms and not sources is entirely stupid - zecke */
-// Config cfg( "OpiePlayer" );
-// writeConfig( cfg );
+ // WTF?!@?!
+
if ( d->current ) {
delete d->current;
}
delete d;
}
void PlayListWidget::initializeStates() {
d->tbPlay->setOn( mediaPlayerState->playing() );
d->tbLoop->setOn( mediaPlayerState->looping() );
d->tbShuffle->setOn( mediaPlayerState->shuffled() );
setPlaylist( true );
@@ -775,25 +776,25 @@ void PlayListWidget::openFile() {
InputDialog *fileDlg;
fileDlg = new InputDialog(this,tr("Open file or URL"),TRUE, 0);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
filename = fileDlg->text();
qDebug( "Selected filename is " + filename );
if( filename.right( 3 ) == "m3u" ) {
readm3u( filename );
} else if( filename.right(3) == "pls" ) {
readPls( filename );
} else {
- /* FIXME ....... AUDIO/X-MPEGURL is bad*/
+ // this doesnt need fixing
DocLnk lnk;
lnk.setName( filename ); //sets file name
lnk.setFile( filename ); //sets File property
//qWarning( "Mimetype: " + MimeType( QFile::encodeName(filename) ).id() );
lnk.setType( MimeType( QFile::encodeName(filename) ).id() );
lnk.setExec( "opieplayer" );
lnk.setIcon( "opieplayer2/MPEGPlayer" );
if( !lnk.writeLink() ) {
qDebug( "Writing doclink did not work" );
}
d->selectedFiles->addToSelection( lnk );
@@ -920,24 +921,26 @@ void PlayListWidget::writem3u() {
fileDlg->exec();
QString filename, list;
if( fileDlg->result() == 1 ) {
filename = fileDlg->text();
qDebug( filename );
int noOfFiles = 0;
d->selectedFiles->first();
do {
// we dont check for existance because of url's
// qDebug(d->selectedFiles->current()->file());
// so maybe we should do some net checking to ,-)
+ // no, cause it takes to long...
+
list += d->selectedFiles->current()->file() + "\n";
noOfFiles++;
}
while ( d->selectedFiles->next() );
qDebug( list );
if( filename.left( 1) != "/" ) {
filename=QPEApplication::documentDir() + "/" + filename;
}
if( filename.right( 3 ) != "m3u" ) {
filename=filename+".m3u";
}
QFile f( filename );