summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-11-10 17:11:25 (UTC)
committer llornkcor <llornkcor>2002-11-10 17:11:25 (UTC)
commit8b6c9588bc499d1c37a0ecf65f59de129b3924e3 (patch) (side-by-side diff)
tree147dfeb0a09120d8e631ce6e11e0281a18d5c422
parent8394ee8e5fc0014605256b243909709864afdc9b (diff)
downloadopie-8b6c9588bc499d1c37a0ecf65f59de129b3924e3.zip
opie-8b6c9588bc499d1c37a0ecf65f59de129b3924e3.tar.gz
opie-8b6c9588bc499d1c37a0ecf65f59de129b3924e3.tar.bz2
should be selected after adding file
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 0825eed..60eb0c8 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -515,10 +515,13 @@ void PlayListWidget::addToSelection( QListViewItem *it) {
case 1: {
QListIterator<DocLnk> dit( files.children() );
for ( ; dit.current(); ++dit ) {
if( dit.current()->name() == it->text(0)) {
- if(QFileInfo( dit.current()->file()).exists())
+ if(QFileInfo( dit.current()->file()).exists()) {
d->selectedFiles->addToSelection( **dit );
+ qDebug("blah "+ dit.current()->name());
+ d->selectedFiles->setSelectedItem( dit.current()->name());
+ }
}
}
writeCurrentM3u();
}
@@ -526,10 +529,13 @@ void PlayListWidget::addToSelection( QListViewItem *it) {
case 2: {
QListIterator<DocLnk> dit( vFiles.children() );
for ( ; dit.current(); ++dit ) {
if( dit.current()->name() == it->text(0)) {
- if( QFileInfo( dit.current()->file()).exists() )
+ if( QFileInfo( dit.current()->file()).exists() ) {
d->selectedFiles->addToSelection( **dit );
+ qDebug("blah "+ dit.current()->name());
+ d->selectedFiles->setSelectedItem( dit.current()->name());
+ }
}
}
writeCurrentM3u();
@@ -538,8 +544,9 @@ void PlayListWidget::addToSelection( QListViewItem *it) {
case 0:
break;
};
tabWidget->setCurrentPage(0);
+
}
}
@@ -744,8 +751,9 @@ void PlayListWidget::openFile() {
// lnk.setIcon("opieplayer2/musicfile");
d->selectedFiles->addToSelection( lnk );
writeCurrentM3u();
+ d->selectedFiles->setSelectedItem( lnk->name());
}
else if( filename.right( 3) == "m3u" ) {
readm3u( filename );
@@ -755,8 +763,9 @@ void PlayListWidget::openFile() {
lnk.setName( QFileInfo(filename).baseName() ); //sets name
lnk.setFile( filename ); //sets file name
d->selectedFiles->addToSelection( lnk);
writeCurrentM3u();
+ d->selectedFiles->setSelectedItem( lnk.name());
}
}
if( fileDlg ) {
@@ -885,8 +894,9 @@ void PlayListWidget::writeCurrentM3u() {
m3uList->close();
if(m3uList) delete m3uList;
}
+
}
/*
writes current playlist to m3u file */