summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/playlistwidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp43
1 files changed, 20 insertions, 23 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 36f77be..d73f0cd 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -185,10 +185,8 @@ void PlayListWidget::writeDefaultPlaylist() {
QString currentString = config.readEntry( "CurrentPlaylist", filename);
if( currentString == filename) {
- Om3u *m3uList;
- // odebug << "<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>" << oendl;
+ Om3u *m3uList;
if( d->selectedFiles->first() ) {
m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate);
do {
- // odebug << d->selectedFiles->current()->file() << oendl;
m3uList->add( d->selectedFiles->current()->file() );
}
@@ -209,5 +207,4 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) {
d->selectedFiles->addToSelection( lnk );
}
-// writeCurrentM3u();
}
@@ -329,12 +326,12 @@ void PlayListWidget::addAllVideoToList() {
void PlayListWidget::setDocument( const QString& _fileref ) {
- // odebug << "<<<<<<<<set document>>>>>>>>>> "+fileref << oendl;
+ // odebug << "<<<<<<<<set document>>>>>>>>>> "+fileref << oendl;
QString fileref = _fileref;
fromSetDocument = TRUE;
-
+
DocLnk lnk(_fileref);
if(lnk.isValid())
fileref = lnk.file();
-
+
QFileInfo fileInfo(fileref);
@@ -411,5 +408,5 @@ bool PlayListWidget::prev() {
bool PlayListWidget::next() {
-//odebug << "<<<<<<<<<<<<next()" << oendl;
+//odebug << "<<<<<<<<<<<<next()" << oendl;
if ( mediaPlayerState->isShuffled() ) {
return prev();
@@ -622,5 +619,5 @@ void PlayListWidget::openURL() {
if( fileDlg->result() == 1 ) {
filename = fileDlg->text();
- odebug << "Selected filename is " + filename << oendl;
+ odebug << "Selected filename is " + filename << oendl;
// Om3u *m3uList;
DocLnk lnk;
@@ -698,5 +695,5 @@ void PlayListWidget::openFile() {
if( !str.isEmpty() ) {
- odebug << "Selected filename is " + str << oendl;
+ odebug << "Selected filename is " + str << oendl;
filename = str;
DocLnk lnk;
@@ -716,5 +713,5 @@ void PlayListWidget::openFile() {
void PlayListWidget::readListFromFile( const QString &filename ) {
- odebug << "read list filename " + filename << oendl;
+ odebug << "read list filename " + filename << oendl;
QFileInfo fi(filename);
Om3u *m3uList;
@@ -729,5 +726,5 @@ void PlayListWidget::readListFromFile( const QString &filename ) {
for ( QStringList::ConstIterator it = m3uList->begin(); it != m3uList->end(); ++it ) {
s = *it;
- // odebug << s << oendl;
+ // odebug << s << oendl;
if(s.left(4)=="http") {
lnk.setName( s ); //sets file name
@@ -763,5 +760,5 @@ void PlayListWidget::readListFromFile( const QString &filename ) {
// writes current playlist to current m3u file */
void PlayListWidget::writeCurrentM3u() {
- odebug << "writing to current m3u" << oendl;
+ odebug << "writing to current m3u" << oendl;
Config cfg( "OpiePlayer" );
cfg.setGroup("PlayList");
@@ -773,9 +770,9 @@ void PlayListWidget::readListFromFile( const QString &filename ) {
do {
- // odebug << "add writeCurrentM3u " +d->selectedFiles->current()->file() << oendl;
+ // odebug << "add writeCurrentM3u " +d->selectedFiles->current()->file() << oendl;
m3uList->add( d->selectedFiles->current()->file() );
}
while ( d->selectedFiles->next() );
- // odebug << "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" << oendl;
+ // odebug << "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" << oendl;
m3uList->write();
m3uList->close();
@@ -822,5 +819,5 @@ void PlayListWidget::writem3u() {
name = str;
// name = fileDlg->text();
-// odebug << filename << oendl;
+// odebug << filename << oendl;
if( name.find("/",0,true) != -1) {// assume they specify a file path
filename = name;
@@ -840,5 +837,5 @@ void PlayListWidget::writem3u() {
}
while ( d->selectedFiles->next() );
- // odebug << list << oendl;
+ // odebug << list << oendl;
m3uList->write();
m3uList->close();
@@ -852,5 +849,5 @@ void PlayListWidget::writem3u() {
lnk.setName( name); //sets file name
- // odebug << filename << oendl;
+ // odebug << filename << oendl;
Config config( "OpiePlayer" );
config.setGroup( "PlayList" );
@@ -860,5 +857,5 @@ void PlayListWidget::writem3u() {
if(!lnk.writeLink()) {
- odebug << "Writing doclink did not work" << oendl;
+ odebug << "Writing doclink did not work" << oendl;
}
@@ -894,5 +891,5 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) {
break;
// case Key_P: //play
- // odebug << "Play" << oendl;
+ // odebug << "Play" << oendl;
// playSelected();
// break;
@@ -924,5 +921,5 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) {
void PlayListWidget::pmViewActivated(int index) {
-// odebug << "" << index << "" << oendl;
+// odebug << "" << index << "" << oendl;
switch(index) {
case -16:
@@ -954,5 +951,5 @@ void PlayListWidget::populateSkinsMenu() {
while ( ( fi = it.current() ) ) {
skinName = fi->fileName();
-// odebug << fi->fileName() << oendl;
+// odebug << fi->fileName() << oendl;
if( skinName != "." && skinName != ".." && skinName !="CVS" ) {
item = skinsMenu->insertItem( fi->fileName() ) ;
@@ -1010,5 +1007,5 @@ QString PlayListWidget::currentFileListPathName() const {
void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) {
- odebug << "qcop message "+msg << oendl;
+ odebug << "qcop message "+msg << oendl;
QDataStream stream ( data, IO_ReadOnly );
if ( msg == "play()" ) { //plays current selection