author | llornkcor <llornkcor> | 2002-11-10 18:46:52 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-10 18:46:52 (UTC) |
commit | 6078687cb1e389751503ae171ed1bea72846a4de (patch) (side-by-side diff) | |
tree | 5d725ae35ece948a9184f89c6aa7fb3a89a5c469 | |
parent | 49e5bbbd35bef879faca0d680f1c4d64a61b7b32 (diff) | |
download | opie-6078687cb1e389751503ae171ed1bea72846a4de.zip opie-6078687cb1e389751503ae171ed1bea72846a4de.tar.gz opie-6078687cb1e389751503ae171ed1bea72846a4de.tar.bz2 |
added must restart messagebox when changing skins
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 86130d5..040ef71 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -35,48 +35,50 @@ #include <qpe/qpeapplication.h> #include <qpe/storage.h> #include <qpe/mimetype.h> #include <qpe/global.h> #include <qpe/resource.h> #include <qdir.h> #include <qmessagebox.h> #include <qregexp.h> #include <qtextstream.h> #include "playlistselection.h" #include "playlistwidget.h" #include "mediaplayerstate.h" #include "inputDialog.h" #include "om3u.h" //only needed for the random play #include <stdlib.h> #include "audiowidget.h" #include "videowidget.h" extern MediaPlayerState *mediaPlayerState; +// extern AudioWidget *audioUI; +// extern VideoWidget *videoUI; QString audioMimes ="audio/mpeg;audio/x-wav;audio/x-ogg"; // no m3u's here please PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) : PlayListWidgetGui( parent, name, fl ) { d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer2/add_to_playlist", this , SLOT(addSelected() ) ); d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer2/remove_from_playlist", this , SLOT(removeSelected() ) ); d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer2/play", this , SLOT( btnPlay( bool) ), TRUE ); d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle", mediaPlayerState, SLOT( setShuffled( bool ) ), TRUE ); d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop", mediaPlayerState, SLOT( setLooping( bool ) ), TRUE ); (void)new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); (void)new MenuItem( pmPlayList, tr( "Add all audio files" ), this, SLOT( addAllMusicToList() ) ); (void)new MenuItem( pmPlayList, tr( "Add all video files" ), @@ -276,49 +278,49 @@ void PlayListWidget::addAllMusicToList() { d->selectedFiles->addToSelection( **dit ); } } writeCurrentM3u(); } void PlayListWidget::addAllVideoToList() { if(!videoScan) scanForVideo(); QListIterator<DocLnk> dit( vFiles.children() ); for ( ; dit.current(); ++dit ) { if( QFileInfo( dit.current()->file() ).exists() ) { d->selectedFiles->addToSelection( **dit ); } } writeCurrentM3u(); } void PlayListWidget::setDocument( const QString& fileref ) { qDebug( "<<<<<<<<set document>>>>>>>>>> "+fileref ); fromSetDocument = TRUE; if ( fileref.isNull() ) { - QMessageBox::critical( 0, tr( "Invalid File" ), + QMessageBox::warning( this, tr( "Invalid File" ), tr( "There was a problem in getting the file." ) ); return; } clearList(); if( fileref.find( "m3u", 0, TRUE) != -1 ) { //is m3u readm3u( fileref ); } else if( DocLnk( fileref).file().find( "m3u", 0, TRUE) != -1 ) { readm3u( DocLnk( fileref).file() ); } else if( fileref.find( "pls", 0, TRUE) != -1 ) { //is pls readPls( fileref ); } else if( DocLnk( fileref).file().find( "pls", 0, TRUE) != -1 ) { readPls( DocLnk( fileref).file() ); } else { clearList(); addToSelection( DocLnk( fileref ) ); writeCurrentM3u(); d->setDocumentUsed = TRUE; mediaPlayerState->setPlaying( FALSE ); mediaPlayerState->setPlaying( TRUE ); } } @@ -1042,41 +1044,43 @@ void PlayListWidget::populateSkinsMenu() { skinName = fi->fileName(); // qDebug( fi->fileName() ); if( skinName != "." && skinName != ".." && skinName !="CVS" ) { item = skinsMenu->insertItem( fi->fileName() ) ; } if( skinName == "default" ) { defaultSkinIndex = item; } if( skinName == skin ) { skinsMenu->setItemChecked( item, TRUE ); } ++it; } } void PlayListWidget::skinsMenuActivated( int item ) { for( int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { skinsMenu->setItemChecked( i, FALSE ); } skinsMenu->setItemChecked( item, TRUE ); Config cfg( "OpiePlayer" ); cfg.setGroup("Options"); cfg.writeEntry("Skin", skinsMenu->text( item ) ); + QMessageBox::warning( this, tr( "OpiePlayer" ), + tr( "You must <b>restart</b> Opieplayer<br>to see your changes." ) ); } int PlayListWidget::whichList() { return tabWidget->currentPageIndex(); } QString PlayListWidget::currentFileListPathName() { switch (whichList()) { case 1: return audioView->currentItem()->text(3); break; case 2: return videoView->currentItem()->text(3); break; }; return ""; } |