summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistselection.cpp15
-rw-r--r--core/multimedia/opieplayer/playlistselection.h1
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp25
3 files changed, 21 insertions, 20 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp
index d70df51..d6aff66 100644
--- a/core/multimedia/opieplayer/playlistselection.cpp
+++ b/core/multimedia/opieplayer/playlistselection.cpp
@@ -51,8 +51,10 @@ PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
: QListView( parent, name )
{
+ qDebug("starting playlistselector");
// #ifdef USE_PLAYLIST_BACKGROUND
- setStaticBackground( TRUE );
+// setStaticBackground( TRUE );
// setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) );
- setBackgroundPixmap( Resource::loadPixmap( "opielogo" ) );
+
+// setBackgroundPixmap( Resource::loadPixmap( "opielogo" ) );
// #endif
// addColumn("Title",236);
@@ -70,9 +72,10 @@ PlayListSelection::~PlayListSelection() {
// #ifdef USE_PLAYLIST_BACKGROUND
void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) {
- p->fillRect( r, QBrush( white ) );
+// qDebug("drawBackground");
+// p->fillRect( r, QBrush( white ) );
// QImage logo = Resource::loadImage( "mpegplayer/background" );
- QImage logo = Resource::loadImage( "opielogo" );
- if ( !logo.isNull() )
- p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo );
+// // QImage logo = Resource::loadImage( "opielogo" );
+// if ( !logo.isNull() )
+// p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo );
}
// #endif
diff --git a/core/multimedia/opieplayer/playlistselection.h b/core/multimedia/opieplayer/playlistselection.h
index 57e10f1..b0d249c 100644
--- a/core/multimedia/opieplayer/playlistselection.h
+++ b/core/multimedia/opieplayer/playlistselection.h
@@ -33,5 +33,4 @@ public:
const DocLnk *current(); // retrieve the current playlist entry (media file link)
-
public slots:
void addToSelection( const DocLnk & ); // Add a media file to the playlist
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index a6202bc..3171a84 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -419,4 +419,5 @@ void PlayListWidget::setDocument(const QString& fileref) {
return;
}
+ if(fileref.find("playlist",0,TRUE) == -1) {
addToSelection( DocLnk( fileref ) );
d->setDocumentUsed = TRUE;
@@ -426,4 +427,11 @@ void PlayListWidget::setDocument(const QString& fileref) {
mediaPlayerState->setPlaying( TRUE );
d->selectedFiles->removeSelected( );
+ } else {
+ loadList(DocLnk(fileref));
+ d->selectedFiles->first();
+// mediaPlayerState->setPlaying( TRUE );
+// mediaPlayerState->setPlaying( FALSE );
+
+ }
}
@@ -530,28 +538,19 @@ void PlayListWidget::saveList() {
filename = fileDlg->LineEdit1->text();//+".playlist";
qDebug("saving playlist "+filename+".playlist");
-
-// DocLnk *lnk;
-// lnk.setName( filename); //sets file name
-// // lnk.setComment(title);
-// lnk.setFile( filename+".playlist"); //sets File property
-// lnk.setType("player/plain");// hey is this a REGISTERED mime type?!?!? ;D
-// lnk.setIcon("MPEGPlayer");
-// if(!lnk.writeLink())
-// qDebug("Writing doclink did not work");
-
Config cfg( filename +".playlist");
writeConfig( cfg );
- }
DocLnk lnk;
lnk.setName( filename); //sets file name
-// lnk.setComment(title);
+// lnk.setComment( "");
lnk.setFile(QPEApplication::qpeDir()+"Settings/"+filename+".playlist.conf"); //sets File property
lnk.setType("playlist/plain");// hey is this a REGISTERED mime type?!?!? ;D
- lnk.setIcon("MPEGPlayer");
+ lnk.setIcon("mpegplayer/playlist2");
if(!lnk.writeLink())
qDebug("Writing doclink did not work");
+ }
if(fileDlg)
delete fileDlg;
+
}