author | llornkcor <llornkcor> | 2002-11-10 18:46:52 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-10 18:46:52 (UTC) |
commit | 6078687cb1e389751503ae171ed1bea72846a4de (patch) (unidiff) | |
tree | 5d725ae35ece948a9184f89c6aa7fb3a89a5c469 /noncore/multimedia/opieplayer2 | |
parent | 49e5bbbd35bef879faca0d680f1c4d64a61b7b32 (diff) | |
download | opie-6078687cb1e389751503ae171ed1bea72846a4de.zip opie-6078687cb1e389751503ae171ed1bea72846a4de.tar.gz opie-6078687cb1e389751503ae171ed1bea72846a4de.tar.bz2 |
added must restart messagebox when changing skins
Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (ignore whitespace changes)
-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 86130d5..040ef71 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -47,24 +47,26 @@ | |||
47 | #include "playlistwidget.h" | 47 | #include "playlistwidget.h" |
48 | #include "mediaplayerstate.h" | 48 | #include "mediaplayerstate.h" |
49 | #include "inputDialog.h" | 49 | #include "inputDialog.h" |
50 | #include "om3u.h" | 50 | #include "om3u.h" |
51 | 51 | ||
52 | //only needed for the random play | 52 | //only needed for the random play |
53 | #include <stdlib.h> | 53 | #include <stdlib.h> |
54 | 54 | ||
55 | #include "audiowidget.h" | 55 | #include "audiowidget.h" |
56 | #include "videowidget.h" | 56 | #include "videowidget.h" |
57 | 57 | ||
58 | extern MediaPlayerState *mediaPlayerState; | 58 | extern MediaPlayerState *mediaPlayerState; |
59 | // extern AudioWidget *audioUI; | ||
60 | // extern VideoWidget *videoUI; | ||
59 | 61 | ||
60 | QString audioMimes ="audio/mpeg;audio/x-wav;audio/x-ogg"; | 62 | QString audioMimes ="audio/mpeg;audio/x-wav;audio/x-ogg"; |
61 | // no m3u's here please | 63 | // no m3u's here please |
62 | 64 | ||
63 | PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | 65 | PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) |
64 | : PlayListWidgetGui( parent, name, fl ) { | 66 | : PlayListWidgetGui( parent, name, fl ) { |
65 | 67 | ||
66 | d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), | 68 | d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), |
67 | "opieplayer2/add_to_playlist", | 69 | "opieplayer2/add_to_playlist", |
68 | this , SLOT(addSelected() ) ); | 70 | this , SLOT(addSelected() ) ); |
69 | d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), | 71 | d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), |
70 | "opieplayer2/remove_from_playlist", | 72 | "opieplayer2/remove_from_playlist", |
@@ -288,25 +290,25 @@ void PlayListWidget::addAllVideoToList() { | |||
288 | if( QFileInfo( dit.current()->file() ).exists() ) { | 290 | if( QFileInfo( dit.current()->file() ).exists() ) { |
289 | d->selectedFiles->addToSelection( **dit ); | 291 | d->selectedFiles->addToSelection( **dit ); |
290 | } | 292 | } |
291 | } | 293 | } |
292 | writeCurrentM3u(); | 294 | writeCurrentM3u(); |
293 | } | 295 | } |
294 | 296 | ||
295 | 297 | ||
296 | void PlayListWidget::setDocument( const QString& fileref ) { | 298 | void PlayListWidget::setDocument( const QString& fileref ) { |
297 | qDebug( "<<<<<<<<set document>>>>>>>>>> "+fileref ); | 299 | qDebug( "<<<<<<<<set document>>>>>>>>>> "+fileref ); |
298 | fromSetDocument = TRUE; | 300 | fromSetDocument = TRUE; |
299 | if ( fileref.isNull() ) { | 301 | if ( fileref.isNull() ) { |
300 | QMessageBox::critical( 0, tr( "Invalid File" ), | 302 | QMessageBox::warning( this, tr( "Invalid File" ), |
301 | tr( "There was a problem in getting the file." ) ); | 303 | tr( "There was a problem in getting the file." ) ); |
302 | return; | 304 | return; |
303 | } | 305 | } |
304 | 306 | ||
305 | clearList(); | 307 | clearList(); |
306 | if( fileref.find( "m3u", 0, TRUE) != -1 ) { //is m3u | 308 | if( fileref.find( "m3u", 0, TRUE) != -1 ) { //is m3u |
307 | readm3u( fileref ); | 309 | readm3u( fileref ); |
308 | } else if( DocLnk( fileref).file().find( "m3u", 0, TRUE) != -1 ) { | 310 | } else if( DocLnk( fileref).file().find( "m3u", 0, TRUE) != -1 ) { |
309 | readm3u( DocLnk( fileref).file() ); | 311 | readm3u( DocLnk( fileref).file() ); |
310 | } else if( fileref.find( "pls", 0, TRUE) != -1 ) { //is pls | 312 | } else if( fileref.find( "pls", 0, TRUE) != -1 ) { //is pls |
311 | readPls( fileref ); | 313 | readPls( fileref ); |
312 | } else if( DocLnk( fileref).file().find( "pls", 0, TRUE) != -1 ) { | 314 | } else if( DocLnk( fileref).file().find( "pls", 0, TRUE) != -1 ) { |
@@ -1054,25 +1056,27 @@ void PlayListWidget::populateSkinsMenu() { | |||
1054 | } | 1056 | } |
1055 | } | 1057 | } |
1056 | 1058 | ||
1057 | void PlayListWidget::skinsMenuActivated( int item ) { | 1059 | void PlayListWidget::skinsMenuActivated( int item ) { |
1058 | for( int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { | 1060 | for( int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { |
1059 | skinsMenu->setItemChecked( i, FALSE ); | 1061 | skinsMenu->setItemChecked( i, FALSE ); |
1060 | } | 1062 | } |
1061 | skinsMenu->setItemChecked( item, TRUE ); | 1063 | skinsMenu->setItemChecked( item, TRUE ); |
1062 | 1064 | ||
1063 | Config cfg( "OpiePlayer" ); | 1065 | Config cfg( "OpiePlayer" ); |
1064 | cfg.setGroup("Options"); | 1066 | cfg.setGroup("Options"); |
1065 | cfg.writeEntry("Skin", skinsMenu->text( item ) ); | 1067 | cfg.writeEntry("Skin", skinsMenu->text( item ) ); |
1066 | } | 1068 | QMessageBox::warning( this, tr( "OpiePlayer" ), |
1069 | tr( "You must <b>restart</b> Opieplayer<br>to see your changes." ) ); | ||
1070 | } | ||
1067 | 1071 | ||
1068 | int PlayListWidget::whichList() { | 1072 | int PlayListWidget::whichList() { |
1069 | return tabWidget->currentPageIndex(); | 1073 | return tabWidget->currentPageIndex(); |
1070 | } | 1074 | } |
1071 | 1075 | ||
1072 | QString PlayListWidget::currentFileListPathName() { | 1076 | QString PlayListWidget::currentFileListPathName() { |
1073 | switch (whichList()) { | 1077 | switch (whichList()) { |
1074 | case 1: | 1078 | case 1: |
1075 | return audioView->currentItem()->text(3); | 1079 | return audioView->currentItem()->text(3); |
1076 | break; | 1080 | break; |
1077 | case 2: | 1081 | case 2: |
1078 | return videoView->currentItem()->text(3); | 1082 | return videoView->currentItem()->text(3); |