summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-09-25 19:46:08 (UTC)
committer llornkcor <llornkcor>2002-09-25 19:46:08 (UTC)
commit71a6630a57ecea0214a490b3490fae19ae290bf7 (patch) (side-by-side diff)
treefa65095cf2b81dd3144b2fcd6b7ddbfc50e665f1
parentc96507591791d48a6d6dad3de6c15739c84e1c93 (diff)
downloadopie-71a6630a57ecea0214a490b3490fae19ae290bf7.zip
opie-71a6630a57ecea0214a490b3490fae19ae290bf7.tar.gz
opie-71a6630a57ecea0214a490b3490fae19ae290bf7.tar.bz2
remove processEvents as xine acts better than old libs
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 4c4a921..19724cb 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -262,99 +262,99 @@ void PlayListWidget::addAllToList() {
if( QFileInfo( Adit.current()->file() ).exists() ) {
d->selectedFiles->addToSelection( **Adit );
}
}
}
void PlayListWidget::addAllMusicToList() {
QListIterator<DocLnk> dit( files.children() );
for ( ; dit.current(); ++dit ) {
if( QFileInfo(dit.current()->file() ).exists() ) {
d->selectedFiles->addToSelection( **dit );
}
}
}
void PlayListWidget::addAllVideoToList() {
QListIterator<DocLnk> dit( vFiles.children() );
for ( ; dit.current(); ++dit ) {
if( QFileInfo( dit.current()->file() ).exists() ) {
d->selectedFiles->addToSelection( **dit );
}
}
}
void PlayListWidget::setDocument( const QString& fileref ) {
//qDebug( fileref );
fromSetDocument = TRUE;
if ( fileref.isNull() ) {
QMessageBox::critical( 0, tr( "Invalid File" ), tr( "There was a problem in getting the file." ) );
return;
}
if( fileref.find( "m3u", 0, TRUE) != -1 ) { //is m3u
readm3u( fileref );
} else if( fileref.find( "pls", 0, TRUE) != -1 ) { //is pls
readPls( fileref );
} else if( fileref.find( "playlist", 0, TRUE) != -1 ) {//is playlist
clearList();
loadList( DocLnk( fileref ) );
d->selectedFiles->first();
} else {
clearList();
addToSelection( DocLnk( fileref ) );
d->setDocumentUsed = TRUE;
mediaPlayerState->setPlaying( FALSE );
- qApp->processEvents();
+// qApp->processEvents();
mediaPlayerState->setPlaying( TRUE );
- qApp->processEvents();
+// qApp->processEvents();
setCaption( tr("OpiePlayer") );
}
}
void PlayListWidget::useSelectedDocument() {
d->setDocumentUsed = FALSE;
}
const DocLnk *PlayListWidget::current() { // this is fugly
switch ( whichList() ) {
case 0: //playlist
{
// qDebug("playlist");
if ( mediaPlayerState->playlist() ) {
return d->selectedFiles->current();
} else if ( d->setDocumentUsed && d->current ) {
return d->current;
} else {
return &(d->files->selectedDocument());
}
}
break;
};
return 0;
}
bool PlayListWidget::prev() {
if ( mediaPlayerState->playlist() ) {
if ( mediaPlayerState->shuffled() ) {
const DocLnk *cur = current();
int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0));
for ( int i = 0; i < j; i++ ) {
if ( !d->selectedFiles->next() )
d->selectedFiles->first();
}
if ( cur == current() )
if ( !d->selectedFiles->next() ) {
d->selectedFiles->first();
}
return TRUE;
} else {
if ( !d->selectedFiles->prev() ) {
if ( mediaPlayerState->looping() ) {
return d->selectedFiles->last();
} else {
@@ -568,97 +568,97 @@ void PlayListWidget::tabChanged(QWidget *) {
switch ( whichList()) {
case 0:
{
if( !tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->hide();
}
d->tbRemoveFromList->setEnabled(TRUE);
d->tbAddToList->setEnabled(FALSE);
}
break;
case 1:
{
audioView->clear();
populateAudioView();
if( !tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->hide();
}
d->tbRemoveFromList->setEnabled(FALSE);
d->tbAddToList->setEnabled(TRUE);
}
break;
case 2:
{
videoView->clear();
populateVideoView();
if( !tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->hide();
}
d->tbRemoveFromList->setEnabled(FALSE);
d->tbAddToList->setEnabled(TRUE);
}
break;
case 3:
{
if( tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->show();
}
playLists->reread();
}
break;
};
}
void PlayListWidget::btnPlay(bool b) {
// mediaPlayerState->setPlaying(false);
mediaPlayerState->setPlaying(b);
- qApp->processEvents();
+// qApp->processEvents();
insanityBool=FALSE;
// switch ( whichList()) {
// case 0:
// {
// mediaPlayerState->setPlaying(b);
// }
// break;
// case 1:
// {
// mediaPlayerState->setPlaying(b);
// qApp->processEvents();
// insanityBool=FALSE;
// }// audioView->clearSelection();
// break;
// case 2:
// {
// // addToSelection( videoView->currentItem() );
// mediaPlayerState->setPlaying(b);
// qApp->processEvents();
// // d->selectedFiles->removeSelected( );
// // tabWidget->setCurrentPage(2);
// // d->selectedFiles->unSelect();
// insanityBool=FALSE;
// }// videoView->clearSelection();
// break;
// };
}
void PlayListWidget::deletePlaylist() {
switch( QMessageBox::information( this, (tr("Remove Playlist?")),
(tr("You really want to delete\nthis playlist?")),
(tr("Yes")), (tr("No")), 0 )){
case 0: // Yes clicked,
QFile().remove(playLists->selectedDocument().file());
QFile().remove(playLists->selectedDocument().linkFile());
playLists->reread();
break;
case 1: // Cancel
break;
};
}
void PlayListWidget::playSelected() {
btnPlay( TRUE);
}