summaryrefslogtreecommitdiff
path: root/core/multimedia
Side-by-side diff
Diffstat (limited to 'core/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistselection.cpp12
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp12
2 files changed, 19 insertions, 5 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp
index 8f3711a..3c47256 100644
--- a/core/multimedia/opieplayer/playlistselection.cpp
+++ b/core/multimedia/opieplayer/playlistselection.cpp
@@ -198,6 +198,18 @@ void PlayListSelection::writeCurrent( Config& cfg ) {
}
void PlayListSelection::setSelectedItem(const QString &strk ) {
+
+ unSelect();
+ QListViewItemIterator it( this );
+ for ( ; it.current(); ++it ) {
+// qDebug( it.current()->text(0));
+ if( strk == it.current()->text(0)) {
+// qDebug( "We have a match "+strk);
+ setSelected( it.current(), TRUE);
+ ensureItemVisible( it.current() );
+ return;
+ }
+ }
// setSelected( item, TRUE );
// ensureItemVisible( selectedItem() );
}
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 63df715..0764c01 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -319,7 +319,8 @@ void PlayListWidget::initializeStates() {
// d->tbScale->setEnabled( mediaPlayerState->fullscreen() );
// setPlaylist( mediaPlayerState->playlist() );
setPlaylist( true);
- d->selectedFiles->first();
+// d->selectedFiles->first();
+
}
@@ -336,6 +337,7 @@ void PlayListWidget::readConfig( Config& cfg ) {
d->selectedFiles->addToSelection( lnk );
}
}
+ d->selectedFiles->setSelectedItem( currentString);
// d->selectedFiles->setSelectedItem( (const QString &)currentString);
}
@@ -351,7 +353,7 @@ void PlayListWidget::writeConfig( Config& cfg ) const {
if ( lnk ) {
QString entryName;
entryName.sprintf( "File%i", noOfFiles + 1 );
- qDebug(entryName);
+// qDebug(entryName);
cfg.writeEntry( entryName, lnk->linkFile() );
// if this link does exist, add it so we have the file
// next time...
@@ -473,7 +475,7 @@ const DocLnk *PlayListWidget::current() { // this is fugly
// switch (tabWidget->currentPageIndex()) {
// case 0: //playlist
// {
- qDebug("playlist");
+// qDebug("playlist");
if ( mediaPlayerState->playlist() ) {
return d->selectedFiles->current();
}
@@ -609,7 +611,7 @@ void PlayListWidget::saveList() {
lnk.setType("playlist/plain");// hey is this a REGISTERED mime type?!?!? ;D
lnk.setIcon("mpegplayer/playlist2");
lnk.setName( filename); //sets file name
- qDebug(filename);
+// qDebug(filename);
if(!lnk.writeLink())
qDebug("Writing doclink did not work");
}
@@ -886,7 +888,7 @@ void PlayListWidget::listDelete() {
QListIterator<DocLnk> dit( files.children() );
for ( ; dit.current(); ++dit ) {
if( dit.current()->name() == file) {
- qDebug(file);
+// qDebug(file);
LnkProperties prop( dit.current() );
// connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *)));
prop.showMaximized();