-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 15c70c3..2b58402 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -226,13 +226,13 @@ void PlayListWidget::viewPressed( int mouse, QListViewItem *, const QPoint& , in | |||
226 | switch (mouse) { | 226 | switch (mouse) { |
227 | case 1: | 227 | case 1: |
228 | break; | 228 | break; |
229 | case 2: | 229 | case 2: |
230 | { | 230 | { |
231 | QPopupMenu m; | 231 | QPopupMenu m; |
232 | m.insertItem( tr( "Play" ), this, SLOT( playSelected() )); | 232 | m.insertItem( tr( "Play Selected" ), this, SLOT( playSelected() )); |
233 | m.insertItem( tr( "Add to Playlist" ), this, SLOT( addSelected() )); | 233 | m.insertItem( tr( "Add to Playlist" ), this, SLOT( addSelected() )); |
234 | m.exec( QCursor::pos() ); | 234 | m.exec( QCursor::pos() ); |
235 | } | 235 | } |
236 | break; | 236 | break; |
237 | } | 237 | } |
238 | } | 238 | } |
@@ -242,13 +242,13 @@ void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *, const QPoi | |||
242 | switch (mouse) { | 242 | switch (mouse) { |
243 | case 1: | 243 | case 1: |
244 | break; | 244 | break; |
245 | case 2: | 245 | case 2: |
246 | { | 246 | { |
247 | QPopupMenu m; | 247 | QPopupMenu m; |
248 | m.insertItem( tr( "Play Selected" ), this, SLOT( playSelected() )); | 248 | m.insertItem( tr( "Play" ), this, SLOT( playSelected() )); |
249 | m.insertItem( tr( "Remove" ), this, SLOT( removeSelected() )); | 249 | m.insertItem( tr( "Remove" ), this, SLOT( removeSelected() )); |
250 | m.exec( QCursor::pos() ); | 250 | m.exec( QCursor::pos() ); |
251 | } | 251 | } |
252 | break; | 252 | break; |
253 | } | 253 | } |
254 | } | 254 | } |
@@ -331,36 +331,12 @@ const DocLnk *PlayListWidget::current() { // this is fugly | |||
331 | return d->current; | 331 | return d->current; |
332 | } else { | 332 | } else { |
333 | return d->files->selected(); | 333 | return d->files->selected(); |
334 | } | 334 | } |
335 | } | 335 | } |
336 | break; | 336 | break; |
337 | case 1://audio | ||
338 | { | ||
339 | // qDebug("audioView"); | ||
340 | QListIterator<DocLnk> dit( files.children() ); | ||
341 | for ( ; dit.current(); ++dit ) { | ||
342 | if( dit.current()->name() == audioView->currentItem()->text( 0 ) && !insanityBool ) { | ||
343 | insanityBool = TRUE; | ||
344 | return dit; | ||
345 | } | ||
346 | } | ||
347 | } | ||
348 | break; | ||
349 | case 2: // video | ||
350 | { | ||
351 | // qDebug("videoView"); | ||
352 | QListIterator<DocLnk> Vdit( vFiles.children() ); | ||
353 | for ( ; Vdit.current(); ++Vdit ) { | ||
354 | if( Vdit.current()->name() == videoView->currentItem()->text( 0 ) && !insanityBool) { | ||
355 | insanityBool = TRUE; | ||
356 | return Vdit; | ||
357 | } | ||
358 | } | ||
359 | } | ||
360 | break; | ||
361 | }; | 337 | }; |
362 | return 0; | 338 | return 0; |
363 | } | 339 | } |
364 | 340 | ||
365 | 341 | ||
366 | bool PlayListWidget::prev() { | 342 | bool PlayListWidget::prev() { |
@@ -632,12 +608,13 @@ void PlayListWidget::tabChanged(QWidget *) { | |||
632 | break; | 608 | break; |
633 | }; | 609 | }; |
634 | } | 610 | } |
635 | 611 | ||
636 | 612 | ||
637 | void PlayListWidget::btnPlay(bool b) { | 613 | void PlayListWidget::btnPlay(bool b) { |
614 | // mediaPlayerState->setPlaying(false); | ||
638 | mediaPlayerState->setPlaying(b); | 615 | mediaPlayerState->setPlaying(b); |
639 | qApp->processEvents(); | 616 | qApp->processEvents(); |
640 | insanityBool=FALSE; | 617 | insanityBool=FALSE; |
641 | // switch ( whichList()) { | 618 | // switch ( whichList()) { |
642 | // case 0: | 619 | // case 0: |
643 | // { | 620 | // { |
@@ -1037,13 +1014,13 @@ void PlayListWidget::populateSkinsMenu() { | |||
1037 | skinsDir.setSorting(QDir::Name ); | 1014 | skinsDir.setSorting(QDir::Name ); |
1038 | const QFileInfoList *skinslist = skinsDir.entryInfoList(); | 1015 | const QFileInfoList *skinslist = skinsDir.entryInfoList(); |
1039 | QFileInfoListIterator it( *skinslist ); | 1016 | QFileInfoListIterator it( *skinslist ); |
1040 | QFileInfo *fi; | 1017 | QFileInfo *fi; |
1041 | while ( ( fi = it.current() ) ) { | 1018 | while ( ( fi = it.current() ) ) { |
1042 | skinName = fi->fileName(); | 1019 | skinName = fi->fileName(); |
1043 | qDebug( fi->fileName() ); | 1020 | // qDebug( fi->fileName() ); |
1044 | if( skinName != "." && skinName != ".." && skinName !="CVS" ) { | 1021 | if( skinName != "." && skinName != ".." && skinName !="CVS" ) { |
1045 | item = skinsMenu->insertItem( fi->fileName() ) ; | 1022 | item = skinsMenu->insertItem( fi->fileName() ) ; |
1046 | } | 1023 | } |
1047 | if( skinName == "default" ) { | 1024 | if( skinName == "default" ) { |
1048 | defaultSkinIndex = item; | 1025 | defaultSkinIndex = item; |
1049 | } | 1026 | } |
@@ -1052,13 +1029,13 @@ void PlayListWidget::populateSkinsMenu() { | |||
1052 | } | 1029 | } |
1053 | ++it; | 1030 | ++it; |
1054 | } | 1031 | } |
1055 | } | 1032 | } |
1056 | 1033 | ||
1057 | void PlayListWidget::skinsMenuActivated( int item ) { | 1034 | void PlayListWidget::skinsMenuActivated( int item ) { |
1058 | for( uint i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { | 1035 | for( int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { |
1059 | skinsMenu->setItemChecked( i, FALSE ); | 1036 | skinsMenu->setItemChecked( i, FALSE ); |
1060 | } | 1037 | } |
1061 | skinsMenu->setItemChecked( item, TRUE ); | 1038 | skinsMenu->setItemChecked( item, TRUE ); |
1062 | 1039 | ||
1063 | Config cfg( "OpiePlayer" ); | 1040 | Config cfg( "OpiePlayer" ); |
1064 | cfg.setGroup("Options"); | 1041 | cfg.setGroup("Options"); |