summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/playlistwidget.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 6c4d07f..3bd04bc 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -16,17 +16,17 @@
16    .%`+i>       _;_. 16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that 17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of 19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
@@ -115,12 +115,13 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
115 connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), this, SLOT( tabChanged( QWidget* ) ) ); 115 connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), this, SLOT( tabChanged( QWidget* ) ) );
116 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) ); 116 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) );
117 connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) ); 117 connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) );
118 connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) ); 118 connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) );
119 connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) ); 119 connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) );
120 connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) ); 120 connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) );
121 connect ( gammaSlider, SIGNAL( valueChanged( int ) ), mediaPlayerState, SLOT( setVideoGamma( int ) ) );
121 122
122 readConfig( cfg ); 123 readConfig( cfg );
123 QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "" ); 124 QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "" );
124 loadList(DocLnk( currentPlaylist ) ); 125 loadList(DocLnk( currentPlaylist ) );
125 setCaption( tr( "OpiePlayer: " ) + currentPlaylist ); 126 setCaption( tr( "OpiePlayer: " ) + currentPlaylist );
126 127
@@ -130,13 +131,13 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
130 populateSkinsMenu(); 131 populateSkinsMenu();
131 initializeStates(); 132 initializeStates();
132} 133}
133 134
134 135
135PlayListWidget::~PlayListWidget() { 136PlayListWidget::~PlayListWidget() {
136 // WTF?!@?! 137 // WTF?!@?!
137 138
138 if ( d->current ) { 139 if ( d->current ) {
139 delete d->current; 140 delete d->current;
140 } 141 }
141 delete d; 142 delete d;
142} 143}
@@ -730,13 +731,13 @@ void PlayListWidget::populateAudioView() {
730 731
731 QListViewItem * newItem; 732 QListViewItem * newItem;
732 if ( QFile( dit.current()->file()).exists() || dit.current()->file().left(4) == "http" ) { 733 if ( QFile( dit.current()->file()).exists() || dit.current()->file().left(4) == "http" ) {
733 long size; 734 long size;
734 if( dit.current()->file().left(4) == "http" ) 735 if( dit.current()->file().left(4) == "http" )
735 size=0; 736 size=0;
736 else 737 else
737 size = QFile( dit.current()->file() ).size(); 738 size = QFile( dit.current()->file() ).size();
738 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), QString::number(size ), storage); 739 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), QString::number(size ), storage);
739 newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) ); 740 newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) );
740 } 741 }
741 } 742 }
742} 743}
@@ -931,13 +932,13 @@ void PlayListWidget::writem3u() {
931 do { 932 do {
932 // we dont check for existance because of url's 933 // we dont check for existance because of url's
933 // qDebug(d->selectedFiles->current()->file()); 934 // qDebug(d->selectedFiles->current()->file());
934 935
935 // so maybe we should do some net checking to ,-) 936 // so maybe we should do some net checking to ,-)
936 // no, cause it takes to long... 937 // no, cause it takes to long...
937 938
938 list += d->selectedFiles->current()->file() + "\n"; 939 list += d->selectedFiles->current()->file() + "\n";
939 noOfFiles++; 940 noOfFiles++;
940 } 941 }
941 while ( d->selectedFiles->next() ); 942 while ( d->selectedFiles->next() );
942 qDebug( list ); 943 qDebug( list );
943 if( filename.left( 1) != "/" ) { 944 if( filename.left( 1) != "/" ) {