summaryrefslogtreecommitdiff
path: root/noncore
authorharlekin <harlekin>2002-09-10 19:36:55 (UTC)
committer harlekin <harlekin>2002-09-10 19:36:55 (UTC)
commit320ef8d638f37698f08c3127287c4c8afd6e0f58 (patch) (side-by-side diff)
tree3abc1e7ba79cefab4deb97eab8dc933d8007903c /noncore
parentb32eceaca5f1dbbfd7cd0709a34ce6f97929e28f (diff)
downloadopie-320ef8d638f37698f08c3127287c4c8afd6e0f58.zip
opie-320ef8d638f37698f08c3127287c4c8afd6e0f58.tar.gz
opie-320ef8d638f37698f08c3127287c4c8afd6e0f58.tar.bz2
adapted to new fileselector, does not run like this on retail rom anymore. but still, it the fileselector stuff in that place needed at all?
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 2b58402..20adf17 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -309,49 +309,49 @@ void PlayListWidget::setDocument( const QString& fileref ) {
mediaPlayerState->setPlaying( FALSE );
qApp->processEvents();
mediaPlayerState->setPlaying( TRUE );
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->selected();
+ 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() ) {
@@ -627,50 +627,50 @@ void PlayListWidget::btnPlay(bool 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->selected()->file());
- QFile().remove(playLists->selected()->linkFile());
+ QFile().remove(playLists->selectedDocument().file());
+ QFile().remove(playLists->selectedDocument().linkFile());
playLists->reread();
break;
case 1: // Cancel
break;
};
}
void PlayListWidget::playSelected() {
btnPlay( TRUE);
}
void PlayListWidget::scanForAudio() {
// qDebug("scan for audio");
files.detachChildren();
QListIterator<DocLnk> sdit( files.children() );
for ( ; sdit.current(); ++sdit ) {
delete sdit.current();
}
Global::findDocuments(&files, "audio/*");
audioScan = TRUE;
}
@@ -1027,33 +1027,33 @@ void PlayListWidget::populateSkinsMenu() {
if( skinName == skin ) {
skinsMenu->setItemChecked( item, TRUE );
}
++it;
}
}
void PlayListWidget::skinsMenuActivated( int item ) {
for( int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) {
skinsMenu->setItemChecked( i, FALSE );
}
skinsMenu->setItemChecked( item, TRUE );
Config cfg( "OpiePlayer" );
cfg.setGroup("Options");
cfg.writeEntry("Skin", skinsMenu->text( item ) );
}
int PlayListWidget::whichList() {
return tabWidget->currentPageIndex();
}
QString PlayListWidget::currentFileListPathName() {
switch (whichList()) {
- case 1:
+ case 1:
return audioView->currentItem()->text(3);
break;
- case 2:
+ case 2:
return videoView->currentItem()->text(3);
break;
};
return "";
}