summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistselection.cpp6
-rw-r--r--core/multimedia/opieplayer/playlistselection.h1
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp8
3 files changed, 11 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp
index 756e3b4..6259b3f 100644
--- a/core/multimedia/opieplayer/playlistselection.cpp
+++ b/core/multimedia/opieplayer/playlistselection.cpp
@@ -116,68 +116,72 @@ void PlayListSelection::removeSelected() {
116 delete item; 116 delete item;
117 setSelected( currentItem(), TRUE ); 117 setSelected( currentItem(), TRUE );
118 ensureItemVisible( selectedItem() ); 118 ensureItemVisible( selectedItem() );
119} 119}
120 120
121 121
122void PlayListSelection::moveSelectedUp() { 122void PlayListSelection::moveSelectedUp() {
123 QListViewItem *item = selectedItem(); 123 QListViewItem *item = selectedItem();
124 if ( item && item->itemAbove() ) 124 if ( item && item->itemAbove() )
125 item->itemAbove()->moveItem( item ); 125 item->itemAbove()->moveItem( item );
126 ensureItemVisible( selectedItem() ); 126 ensureItemVisible( selectedItem() );
127} 127}
128 128
129 129
130void PlayListSelection::moveSelectedDown() { 130void PlayListSelection::moveSelectedDown() {
131 QListViewItem *item = selectedItem(); 131 QListViewItem *item = selectedItem();
132 if ( item && item->itemBelow() ) 132 if ( item && item->itemBelow() )
133 item->moveItem( item->itemBelow() ); 133 item->moveItem( item->itemBelow() );
134 ensureItemVisible( selectedItem() ); 134 ensureItemVisible( selectedItem() );
135} 135}
136 136
137 137
138bool PlayListSelection::prev() { 138bool PlayListSelection::prev() {
139 QListViewItem *item = selectedItem(); 139 QListViewItem *item = selectedItem();
140 if ( item && item->itemAbove() ) 140 if ( item && item->itemAbove() )
141 setSelected( item->itemAbove(), TRUE ); 141 setSelected( item->itemAbove(), TRUE );
142 else 142 else
143 return FALSE; 143 return FALSE;
144 ensureItemVisible( selectedItem() ); 144 ensureItemVisible( selectedItem() );
145 return TRUE; 145 return TRUE;
146} 146}
147 147
148
149bool PlayListSelection::next() { 148bool PlayListSelection::next() {
150 QListViewItem *item = selectedItem(); 149 QListViewItem *item = selectedItem();
151 if ( item && item->itemBelow() ) 150 if ( item && item->itemBelow() )
152 setSelected( item->itemBelow(), TRUE ); 151 setSelected( item->itemBelow(), TRUE );
153 else 152 else
154 return FALSE; 153 return FALSE;
155 ensureItemVisible( selectedItem() ); 154 ensureItemVisible( selectedItem() );
156 return TRUE; 155 return TRUE;
157} 156}
158 157
159 158
160bool PlayListSelection::first() { 159bool PlayListSelection::first() {
161 QListViewItem *item = firstChild(); 160 QListViewItem *item = firstChild();
162 if ( item ) 161 if ( item )
163 setSelected( item, TRUE ); 162 setSelected( item, TRUE );
164 else 163 else
165 return FALSE; 164 return FALSE;
166 ensureItemVisible( selectedItem() ); 165 ensureItemVisible( selectedItem() );
167 return TRUE; 166 return TRUE;
168} 167}
169 168
170 169
171bool PlayListSelection::last() { 170bool PlayListSelection::last() {
172 QListViewItem *prevItem = NULL; 171 QListViewItem *prevItem = NULL;
173 QListViewItem *item = firstChild(); 172 QListViewItem *item = firstChild();
174 while ( ( item = item->nextSibling() ) ) 173 while ( ( item = item->nextSibling() ) )
175 prevItem = item; 174 prevItem = item;
176 if ( prevItem ) 175 if ( prevItem )
177 setSelected( prevItem, TRUE ); 176 setSelected( prevItem, TRUE );
178 else 177 else
179 return FALSE; 178 return FALSE;
180 ensureItemVisible( selectedItem() ); 179 ensureItemVisible( selectedItem() );
181 return TRUE; 180 return TRUE;
182} 181}
183 182
183void PlayListSelection::unSelect()
184{
185 QListViewItem *item = selectedItem();
186 setSelected( currentItem(), FALSE);
187} \ No newline at end of file
diff --git a/core/multimedia/opieplayer/playlistselection.h b/core/multimedia/opieplayer/playlistselection.h
index b0d249c..ba37271 100644
--- a/core/multimedia/opieplayer/playlistselection.h
+++ b/core/multimedia/opieplayer/playlistselection.h
@@ -8,53 +8,54 @@
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef PLAY_LIST_SELECTION_H 20#ifndef PLAY_LIST_SELECTION_H
21#define PLAY_LIST_SELECTION_H 21#define PLAY_LIST_SELECTION_H
22 22
23#include <qlist.h> 23#include <qlist.h>
24#include <qlistview.h> 24#include <qlistview.h>
25#include <qpe/applnk.h> 25#include <qpe/applnk.h>
26 26
27 27
28class PlayListSelection : public QListView { 28class PlayListSelection : public QListView {
29 Q_OBJECT 29 Q_OBJECT
30public: 30public:
31 PlayListSelection( QWidget *parent, const char *name=0 ); 31 PlayListSelection( QWidget *parent, const char *name=0 );
32 ~PlayListSelection(); 32 ~PlayListSelection();
33 33
34 const DocLnk *current(); // retrieve the current playlist entry (media file link) 34 const DocLnk *current(); // retrieve the current playlist entry (media file link)
35public slots: 35public slots:
36 void addToSelection( const DocLnk & ); // Add a media file to the playlist 36 void addToSelection( const DocLnk & ); // Add a media file to the playlist
37 void removeSelected(); // Remove a media file from the playlist 37 void removeSelected(); // Remove a media file from the playlist
38 void moveSelectedUp(); // Move the media file up the playlist so it is played earlier 38 void moveSelectedUp(); // Move the media file up the playlist so it is played earlier
39 void moveSelectedDown(); // Move the media file down the playlist so it is played later 39 void moveSelectedDown(); // Move the media file down the playlist so it is played later
40 void unSelect();
40 bool prev(); 41 bool prev();
41 bool next(); 42 bool next();
42 bool first(); 43 bool first();
43 bool last(); 44 bool last();
44 45
45protected: 46protected:
46 virtual void contentsMouseMoveEvent(QMouseEvent *); 47 virtual void contentsMouseMoveEvent(QMouseEvent *);
47/* #ifdef USE_PLAYLIST_BACKGROUND */ 48/* #ifdef USE_PLAYLIST_BACKGROUND */
48 virtual void drawBackground( QPainter *p, const QRect &r ); 49 virtual void drawBackground( QPainter *p, const QRect &r );
49 virtual void paintEmptyArea( QPainter *p, const QRect &r ) { drawBackground( p, r ); }; 50 virtual void paintEmptyArea( QPainter *p, const QRect &r ) { drawBackground( p, r ); };
50/* #endif */ 51/* #endif */
51 52
52private: 53private:
53 QList<DocLnk> selectedList; 54 QList<DocLnk> selectedList;
54 const DocLnk *lnk; 55 const DocLnk *lnk;
55}; 56};
56 57
57 58
58#endif // PLAY_LIST_SELECTION_H 59#endif // PLAY_LIST_SELECTION_H
59 60
60 61
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index cf665c8..db6533a 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -142,65 +142,65 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
142 d->tbPlay = new ToolButton( bar, tr( "Play" ), "mpegplayer/play", 142 d->tbPlay = new ToolButton( bar, tr( "Play" ), "mpegplayer/play",
143 this , SLOT( btnPlay(bool) ), TRUE ); 143 this , SLOT( btnPlay(bool) ), TRUE );
144 d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"mpegplayer/shuffle", 144 d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"mpegplayer/shuffle",
145 mediaPlayerState, SLOT(setShuffled(bool)), TRUE ); 145 mediaPlayerState, SLOT(setShuffled(bool)), TRUE );
146 d->tbLoop = new ToolButton( bar, tr( "Loop" ),"mpegplayer/loop", 146 d->tbLoop = new ToolButton( bar, tr( "Loop" ),"mpegplayer/loop",
147 mediaPlayerState, SLOT(setLooping(bool)), TRUE ); 147 mediaPlayerState, SLOT(setLooping(bool)), TRUE );
148 tbDeletePlaylist->hide(); 148 tbDeletePlaylist->hide();
149 149
150 QPopupMenu *pmPlayList = new QPopupMenu( this ); 150 QPopupMenu *pmPlayList = new QPopupMenu( this );
151 menu->insertItem( tr( "File" ), pmPlayList ); 151 menu->insertItem( tr( "File" ), pmPlayList );
152 new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); 152 new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) );
153 new MenuItem( pmPlayList, tr( "Add all audio files" ), this, SLOT( addAllMusicToList() ) ); 153 new MenuItem( pmPlayList, tr( "Add all audio files" ), this, SLOT( addAllMusicToList() ) );
154 new MenuItem( pmPlayList, tr( "Add all video files" ), this, SLOT( addAllVideoToList() ) ); 154 new MenuItem( pmPlayList, tr( "Add all video files" ), this, SLOT( addAllVideoToList() ) );
155 new MenuItem( pmPlayList, tr( "Add all files" ), this, SLOT( addAllToList() ) ); 155 new MenuItem( pmPlayList, tr( "Add all files" ), this, SLOT( addAllToList() ) );
156 new MenuItem( pmPlayList, tr( "Save PlayList" ), this, SLOT( saveList() ) ); 156 new MenuItem( pmPlayList, tr( "Save PlayList" ), this, SLOT( saveList() ) );
157 // new MenuItem( pmPlayList, tr( "Load PlayList" ), this, SLOT( loadList() ) ); 157 // new MenuItem( pmPlayList, tr( "Load PlayList" ), this, SLOT( loadList() ) );
158 158
159 QPopupMenu *pmView = new QPopupMenu( this ); 159 QPopupMenu *pmView = new QPopupMenu( this );
160 menu->insertItem( tr( "View" ), pmView ); 160 menu->insertItem( tr( "View" ), pmView );
161 161
162 fullScreenButton = new QAction(tr("Full Screen"), Resource::loadPixmap("fullscreen"), QString::null, 0, this, 0); 162 fullScreenButton = new QAction(tr("Full Screen"), Resource::loadPixmap("fullscreen"), QString::null, 0, this, 0);
163 connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) ); 163 connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) );
164 fullScreenButton->addTo(pmView); 164 fullScreenButton->addTo(pmView);
165 scaleButton = new QAction(tr("Scale"), Resource::loadPixmap("mpegplayer/scale"), QString::null, 0, this, 0); 165 scaleButton = new QAction(tr("Scale"), Resource::loadPixmap("mpegplayer/scale"), QString::null, 0, this, 0);
166 connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) ); 166 connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) );
167 scaleButton->addTo(pmView); 167 scaleButton->addTo(pmView);
168 168
169 QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); 169 QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton );
170 QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); 170 QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton );
171 171
172 QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton ); 172 QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton );
173 173
174 tabWidget = new QTabWidget( hbox6, "tabWidget" ); 174 tabWidget = new QTabWidget( hbox6, "tabWidget" );
175 tabWidget->setTabShape(QTabWidget::Triangular); 175 tabWidget->setTabShape(QTabWidget::Triangular);
176 176
177 QWidget *pTab; 177 QWidget *pTab;
178 pTab = new QWidget( tabWidget, "pTab" ); 178 pTab = new QWidget( tabWidget, "pTab" );
179// playlistView = new QListView( pTab, "playlistview" ); 179// playlistView = new QListView( pTab, "playlistview" );
180// playlistView->setMinimumSize(236,260); 180// playlistView->setMinimumSize(236,260);
181 tabWidget->insertTab( pTab,"Playlist"); 181 tabWidget->insertTab( pTab,"Playlist");
182 182
183 183
184 // Add the playlist area 184 // Add the playlist area
185 185
186 QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton ); 186 QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton );
187 d->playListFrame = vbox3; 187 d->playListFrame = vbox3;
188 d->playListFrame ->setMinimumSize(235,260); 188 d->playListFrame ->setMinimumSize(235,260);
189 189
190 QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton ); 190 QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton );
191 191
192 d->selectedFiles = new PlayListSelection( hbox2); 192 d->selectedFiles = new PlayListSelection( hbox2);
193 QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton ); 193 QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton );
194 194
195 QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold); 195 QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold);
196 connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), 196 connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
197 this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) ); 197 this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) );
198 198
199 199
200 QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch 200 QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch
201 new ToolButton( vbox1, tr( "Move Up" ), "mpegplayer/up", d->selectedFiles, SLOT(moveSelectedUp()) ); 201 new ToolButton( vbox1, tr( "Move Up" ), "mpegplayer/up", d->selectedFiles, SLOT(moveSelectedUp()) );
202 new ToolButton( vbox1, tr( "Remove" ), "mpegplayer/cut", d->selectedFiles, SLOT(removeSelected()) ); 202 new ToolButton( vbox1, tr( "Remove" ), "mpegplayer/cut", d->selectedFiles, SLOT(removeSelected()) );
203 new ToolButton( vbox1, tr( "Move Down" ), "mpegplayer/down", d->selectedFiles, SLOT(moveSelectedDown()) ); 203 new ToolButton( vbox1, tr( "Move Down" ), "mpegplayer/down", d->selectedFiles, SLOT(moveSelectedDown()) );
204 QVBox *stretch2 = new QVBox( vbox1 ); stretch2->setBackgroundMode( PaletteButton ); // add stretch 204 QVBox *stretch2 = new QVBox( vbox1 ); stretch2->setBackgroundMode( PaletteButton ); // add stretch
205 205
206 QWidget *aTab; 206 QWidget *aTab;
@@ -453,76 +453,76 @@ void PlayListWidget::setDocument(const QString& fileref) {
453 setCaption("OpiePlayer"); 453 setCaption("OpiePlayer");
454 454
455 } else { //is playlist 455 } else { //is playlist
456 clearList(); 456 clearList();
457 loadList(DocLnk(fileref)); 457 loadList(DocLnk(fileref));
458 d->selectedFiles->first(); 458 d->selectedFiles->first();
459 } 459 }
460} 460}
461 461
462 462
463void PlayListWidget::setActiveWindow() { 463void PlayListWidget::setActiveWindow() {
464 // When we get raised we need to ensure that it switches views 464 // When we get raised we need to ensure that it switches views
465 char origView = mediaPlayerState->view(); 465 char origView = mediaPlayerState->view();
466 mediaPlayerState->setView( 'l' ); // invalidate 466 mediaPlayerState->setView( 'l' ); // invalidate
467 mediaPlayerState->setView( origView ); // now switch back 467 mediaPlayerState->setView( origView ); // now switch back
468} 468}
469 469
470 470
471void PlayListWidget::useSelectedDocument() { 471void PlayListWidget::useSelectedDocument() {
472 d->setDocumentUsed = FALSE; 472 d->setDocumentUsed = FALSE;
473} 473}
474 474
475 475
476const DocLnk *PlayListWidget::current() { // this is fugly 476const DocLnk *PlayListWidget::current() { // this is fugly
477 477
478// if( fromSetDocument) { 478// if( fromSetDocument) {
479// qDebug("from setDoc"); 479// qDebug("from setDoc");
480// DocLnkSet files; 480// DocLnkSet files;
481// Global::findDocuments(&files, "video/*;audio/*"); 481// Global::findDocuments(&files, "video/*;audio/*");
482// QListIterator<DocLnk> dit( files.children() ); 482// QListIterator<DocLnk> dit( files.children() );
483// for ( ; dit.current(); ++dit ) { 483// for ( ; dit.current(); ++dit ) {
484// if(dit.current()->linkFile() == setDocFileRef) { 484// if(dit.current()->linkFile() == setDocFileRef) {
485// qDebug(setDocFileRef); 485// qDebug(setDocFileRef);
486// return dit; 486// return dit;
487// } 487// }
488// } 488// }
489// } else 489// } else
490// qDebug("current"); 490// qDebug("current");
491// switch (tabWidget->currentPageIndex()) { 491// switch (tabWidget->currentPageIndex()) {
492// case 0: //playlist 492// case 0: //playlist
493// { 493// {
494 qDebug("playlist"); 494 qDebug("playlist");
495 if ( mediaPlayerState->playlist() ) { 495 if ( mediaPlayerState->playlist() ) {
496 return d->selectedFiles->current(); 496 return d->selectedFiles->current();
497 } 497 }
498 else if ( d->setDocumentUsed && d->current ) { 498 else if ( d->setDocumentUsed && d->current ) {
499 return d->current; 499 return d->current;
500 } else { 500 } else {
501 return d->files->selected(); 501 return d->files->selected();
502 } 502 }
503// } 503// }
504// break; 504// break;
505// case 1://audio 505// case 1://audio
506// { 506// {
507// qDebug("audioView"); 507// qDebug("audioView");
508// Global::findDocuments(&files, "audio/*"); 508// Global::findDocuments(&files, "audio/*");
509// QListIterator<DocLnk> dit( files.children() ); 509// QListIterator<DocLnk> dit( files.children() );
510// for ( ; dit.current(); ++dit ) { 510// for ( ; dit.current(); ++dit ) {
511// if( dit.current()->name() == audioView->currentItem()->text(0) && !insanityBool) { 511// if( dit.current()->name() == audioView->currentItem()->text(0) && !insanityBool) {
512// qDebug("here"); 512// qDebug("here");
513// insanityBool=TRUE; 513// insanityBool=TRUE;
514// return dit; 514// return dit;
515// } 515// }
516// } 516// }
517// } 517// }
518// break; 518// break;
519// case 2: // video 519// case 2: // video
520// { 520// {
521// qDebug("videoView"); 521// qDebug("videoView");
522// Global::findDocuments(&vFiles, "video/*"); 522// Global::findDocuments(&vFiles, "video/*");
523// QListIterator<DocLnk> Vdit( vFiles.children() ); 523// QListIterator<DocLnk> Vdit( vFiles.children() );
524// for ( ; Vdit.current(); ++Vdit ) { 524// for ( ; Vdit.current(); ++Vdit ) {
525// if( Vdit.current()->name() == videoView->currentItem()->text(0) && !insanityBool) { 525// if( Vdit.current()->name() == videoView->currentItem()->text(0) && !insanityBool) {
526// insanityBool=TRUE; 526// insanityBool=TRUE;
527// return Vdit; 527// return Vdit;
528// } 528// }
@@ -784,74 +784,76 @@ void PlayListWidget::tabChanged(QWidget *widg) {
784 d->tbRemoveFromList->setEnabled(FALSE); 784 d->tbRemoveFromList->setEnabled(FALSE);
785 d->tbAddToList->setEnabled(TRUE); 785 d->tbAddToList->setEnabled(TRUE);
786 } 786 }
787 break; 787 break;
788 case 3: 788 case 3:
789 { 789 {
790 if( tbDeletePlaylist->isHidden()) 790 if( tbDeletePlaylist->isHidden())
791 tbDeletePlaylist->show(); 791 tbDeletePlaylist->show();
792 playLists->reread(); 792 playLists->reread();
793 } 793 }
794 break; 794 break;
795 }; 795 };
796} 796}
797 797
798 798
799/* 799/*
800 play button is pressed*/ 800 play button is pressed*/
801void PlayListWidget::btnPlay(bool b) { 801void PlayListWidget::btnPlay(bool b) {
802// mediaPlayerState->setPlaying(b); 802// mediaPlayerState->setPlaying(b);
803 switch ( tabWidget->currentPageIndex()) { 803 switch ( tabWidget->currentPageIndex()) {
804 case 0: 804 case 0:
805 { 805 {
806 mediaPlayerState->setPlaying(b); 806 mediaPlayerState->setPlaying(b);
807 } 807 }
808 break; 808 break;
809 case 1: 809 case 1:
810 { 810 {
811 addToSelection( audioView->selectedItem() ); 811 addToSelection( audioView->selectedItem() );
812 mediaPlayerState->setPlaying(b); 812 mediaPlayerState->setPlaying(b);
813// qApp->processEvents(); 813// qApp->processEvents();
814 d->selectedFiles->removeSelected( ); 814 d->selectedFiles->removeSelected( );
815 tabWidget->setCurrentPage(1); 815 tabWidget->setCurrentPage(1);
816 d->selectedFiles->unSelect();
816// mediaPlayerState->setPlaying(FALSE); 817// mediaPlayerState->setPlaying(FALSE);
817 } 818 }
818 break; 819 break;
819 case 2: 820 case 2:
820 { 821 {
821 addToSelection( videoView->selectedItem() ); 822 addToSelection( videoView->selectedItem() );
822 mediaPlayerState->setPlaying(b); 823 mediaPlayerState->setPlaying(b);
823 qApp->processEvents(); 824 qApp->processEvents();
824 d->selectedFiles->removeSelected( ); 825 d->selectedFiles->removeSelected( );
825 tabWidget->setCurrentPage(2); 826 tabWidget->setCurrentPage(2);
827 d->selectedFiles->unSelect();
826// mediaPlayerState->setPlaying(FALSE); 828// mediaPlayerState->setPlaying(FALSE);
827 } 829 }
828 break; 830 break;
829 }; 831 };
830 832
831 833
832 834
833 835
834} 836}
835 837
836void PlayListWidget::deletePlaylist() { 838void PlayListWidget::deletePlaylist() {
837 switch( QMessageBox::information( this, (tr("Remove Playlist?")), 839 switch( QMessageBox::information( this, (tr("Remove Playlist?")),
838 (tr("You really want to delete\nthis playlist?")), 840 (tr("You really want to delete\nthis playlist?")),
839 (tr("Yes")), (tr("No")), 0 )){ 841 (tr("Yes")), (tr("No")), 0 )){
840 case 0: // Yes clicked, 842 case 0: // Yes clicked,
841 QFile().remove(playLists->selected()->file()); 843 QFile().remove(playLists->selected()->file());
842 QFile().remove(playLists->selected()->linkFile()); 844 QFile().remove(playLists->selected()->linkFile());
843 playLists->reread(); 845 playLists->reread();
844 break; 846 break;
845 case 1: // Cancel 847 case 1: // Cancel
846 break; 848 break;
847 }; 849 };
848 850
849} 851}
850 852
851void PlayListWidget::viewPressed( int mouse, QListViewItem *item, const QPoint& point, int i) 853void PlayListWidget::viewPressed( int mouse, QListViewItem *item, const QPoint& point, int i)
852{ 854{
853 switch (mouse) { 855 switch (mouse) {
854 case 1: 856 case 1:
855 break; 857 break;
856 case 2:{ 858 case 2:{
857 QPopupMenu m; 859 QPopupMenu m;