author | llornkcor <llornkcor> | 2002-12-10 11:58:11 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-12-10 11:58:11 (UTC) |
commit | 92da6d6ed82230c25d71379eaffbcd222464726b (patch) (side-by-side diff) | |
tree | 57a524c60e9a32b0195aa2fa08e484c533e4ddf7 | |
parent | f468c3bc69655aefa0ec5783405355dd3dde4afc (diff) | |
download | opie-92da6d6ed82230c25d71379eaffbcd222464726b.zip opie-92da6d6ed82230c25d71379eaffbcd222464726b.tar.gz opie-92da6d6ed82230c25d71379eaffbcd222464726b.tar.bz2 |
moving to playlistview after adding to it is annoying some people and me sometimes. try this for now
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 27a3286..cba7b6d 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -192,32 +192,36 @@ void PlayListWidget::writeDefaultPlaylist() { } void PlayListWidget::addToSelection( const DocLnk& lnk ) { d->setDocumentUsed = FALSE; if( QFileInfo( lnk.file() ).exists() || lnk.file().left(4) == "http" ) { d->selectedFiles->addToSelection( lnk ); } // writeCurrentM3u(); } void PlayListWidget::clearList() { while ( first() ) { d->selectedFiles->removeSelected(); } + Config cfg( "OpiePlayer" ); + cfg.setGroup("PlayList"); + cfg.writeEntry("CurrentPlaylist","default"); + setCaption("OpiePlayer"); } void PlayListWidget::viewPressed( int mouse, QListViewItem *, const QPoint& , int) { switch (mouse) { case LeftButton: break; case RightButton: { QPopupMenu m; m.insertItem( tr( "Play Selected" ), this, SLOT( playSelected() )); m.insertItem( tr( "Add to Playlist" ), this, SLOT( addSelected() )); m.exec( QCursor::pos() ); } break; } } @@ -479,33 +483,33 @@ void PlayListWidget::addSelected() { assert( inFileListMode() ); QListViewItemIterator it( currentFileListView ); for ( ; it.current(); ++it ) if ( it.current()->isSelected() ) { QString filename = it.current()->text(3); DocLnk lnk; lnk.setName( QFileInfo( filename ).baseName() ); //sets name lnk.setFile( filename ); //sets file name d->selectedFiles->addToSelection( lnk ); } currentFileListView->clearSelection(); - tabWidget->setCurrentPage( 0 ); +// tabWidget->setCurrentPage( 0 ); writeCurrentM3u(); } void PlayListWidget::removeSelected() { d->selectedFiles->removeSelected( ); writeCurrentM3u(); } void PlayListWidget::playIt( QListViewItem *it) { if(!it) return; mediaPlayerState.setPlaying(FALSE); mediaPlayerState.setPlaying(TRUE); d->selectedFiles->unSelect(); } @@ -514,33 +518,33 @@ void PlayListWidget::playIt( QListViewItem *it) { void PlayListWidget::addToSelection( QListViewItem *it) { d->setDocumentUsed = FALSE; if(it) { if ( currentTab() == CurrentPlayList ) return; // case 1: { DocLnk lnk; QString filename; filename=it->text(3); lnk.setName( QFileInfo(filename).baseName() ); //sets name lnk.setFile( filename ); //sets file name d->selectedFiles->addToSelection( lnk); writeCurrentM3u(); - tabWidget->setCurrentPage(0); +// tabWidget->setCurrentPage(0); } } void PlayListWidget::tabChanged(QWidget *) { d->tbPlay->setEnabled( true ); disconnect( audioView, SIGNAL( itemsSelected( bool ) ), d->tbPlay, SLOT( setEnabled( bool ) ) ); disconnect( videoView, SIGNAL( itemsSelected( bool ) ), d->tbPlay, SLOT( setEnabled( bool ) ) ); currentFileListView = 0; |