author | llornkcor <llornkcor> | 2002-06-13 04:46:12 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-13 04:46:12 (UTC) |
commit | 7ab4c2b4684287ac5f629445abcedb34ebfce9f3 (patch) (unidiff) | |
tree | 28a17efdd2ac4a3b2193b27e14dbd96740fffc66 | |
parent | 7239ae505999b64c74479c460daba256baf82798 (diff) | |
download | opie-7ab4c2b4684287ac5f629445abcedb34ebfce9f3.zip opie-7ab4c2b4684287ac5f629445abcedb34ebfce9f3.tar.gz opie-7ab4c2b4684287ac5f629445abcedb34ebfce9f3.tar.bz2 |
bugfix: menu select play works again
-rw-r--r-- | core/multimedia/opieplayer/audiodevice.cpp | 4 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 25 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.h | 2 |
3 files changed, 14 insertions, 17 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp index e0989d0..3262e38 100644 --- a/core/multimedia/opieplayer/audiodevice.cpp +++ b/core/multimedia/opieplayer/audiodevice.cpp | |||
@@ -19,6 +19,7 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | // L.J.Potter added better error code Fri 02-15-2002 14:37:47 | 20 | // L.J.Potter added better error code Fri 02-15-2002 14:37:47 |
21 | 21 | ||
22 | |||
22 | #include <stdlib.h> | 23 | #include <stdlib.h> |
23 | #include <stdio.h> | 24 | #include <stdio.h> |
24 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
@@ -188,6 +189,7 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume, | |||
188 | 189 | ||
189 | AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { | 190 | AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { |
190 | qDebug("creating new audio device"); | 191 | qDebug("creating new audio device"); |
192 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; | ||
191 | d = new AudioDevicePrivate; | 193 | d = new AudioDevicePrivate; |
192 | d->frequency = f; | 194 | d->frequency = f; |
193 | d->channels = chs; | 195 | d->channels = chs; |
@@ -203,7 +205,6 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { | |||
203 | int fragments = 0x10000 * 8 + sound_fragment_shift; | 205 | int fragments = 0x10000 * 8 + sound_fragment_shift; |
204 | int capabilities = 0; | 206 | int capabilities = 0; |
205 | 207 | ||
206 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; | ||
207 | 208 | ||
208 | #ifdef KEEP_DEVICE_OPEN | 209 | #ifdef KEEP_DEVICE_OPEN |
209 | if ( AudioDevicePrivate::dspFd == 0 ) { | 210 | if ( AudioDevicePrivate::dspFd == 0 ) { |
@@ -264,7 +265,6 @@ AudioDevice::~AudioDevice() { | |||
264 | delete d->unwrittenBuffer; | 265 | delete d->unwrittenBuffer; |
265 | delete d; | 266 | delete d; |
266 | #endif | 267 | #endif |
267 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; | ||
268 | 268 | ||
269 | } | 269 | } |
270 | 270 | ||
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 930560e..d7447b7 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -840,21 +840,18 @@ void PlayListWidget::btnPlay(bool b) { | |||
840 | break; | 840 | break; |
841 | case 1: | 841 | case 1: |
842 | { | 842 | { |
843 | // if(audioView->selectedItem()) { | 843 | addToSelection( audioView->currentItem() ); |
844 | addToSelection( audioView->selectedItem() ); | ||
845 | mediaPlayerState->setPlaying(b); | 844 | mediaPlayerState->setPlaying(b); |
846 | d->selectedFiles->removeSelected( ); | 845 | d->selectedFiles->removeSelected( ); |
847 | tabWidget->setCurrentPage(1); | 846 | tabWidget->setCurrentPage(1); |
848 | d->selectedFiles->unSelect(); | 847 | d->selectedFiles->unSelect(); |
849 | insanityBool=FALSE; | 848 | insanityBool=FALSE; |
850 | // audioView->clearSelection(); | 849 | // audioView->clearSelection(); |
851 | // } | ||
852 | } | 850 | } |
853 | break; | 851 | break; |
854 | case 2: | 852 | case 2: |
855 | { | 853 | { |
856 | // if(videoView->selectedItem() ) { | 854 | addToSelection( videoView->currentItem() ); |
857 | addToSelection( videoView->selectedItem() ); | ||
858 | mediaPlayerState->setPlaying(b); | 855 | mediaPlayerState->setPlaying(b); |
859 | qApp->processEvents(); | 856 | qApp->processEvents(); |
860 | d->selectedFiles->removeSelected( ); | 857 | d->selectedFiles->removeSelected( ); |
@@ -862,7 +859,6 @@ void PlayListWidget::btnPlay(bool b) { | |||
862 | d->selectedFiles->unSelect(); | 859 | d->selectedFiles->unSelect(); |
863 | insanityBool=FALSE; | 860 | insanityBool=FALSE; |
864 | // videoView->clearSelection(); | 861 | // videoView->clearSelection(); |
865 | // } | ||
866 | } | 862 | } |
867 | break; | 863 | break; |
868 | }; | 864 | }; |
@@ -888,16 +884,17 @@ void PlayListWidget::viewPressed( int mouse, QListViewItem *item, const QPoint& | |||
888 | case 1: | 884 | case 1: |
889 | break; | 885 | break; |
890 | case 2:{ | 886 | case 2:{ |
891 | QPopupMenu m; | 887 | |
892 | m.insertItem( tr( "Play" ), this, SLOT( playSelected() )); | 888 | QPopupMenu m; |
893 | m.insertItem( tr( "Add to Playlist" ), this, SLOT( addSelected() )); | 889 | m.insertItem( tr( "Play" ), this, SLOT( playSelected() )); |
894 | m.insertSeparator(); | 890 | m.insertItem( tr( "Add to Playlist" ), this, SLOT( addSelected() )); |
895 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) | 891 | m.insertSeparator(); |
896 | m.insertItem( tr( "Properties" ), this, SLOT( listDelete() )); | 892 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) |
893 | m.insertItem( tr( "Properties" ), this, SLOT( listDelete() )); | ||
897 | 894 | ||
898 | m.exec( QCursor::pos() ); | 895 | m.exec( QCursor::pos() ); |
899 | } | 896 | } |
900 | break; | 897 | break; |
901 | }; | 898 | }; |
902 | } | 899 | } |
903 | 900 | ||
diff --git a/core/multimedia/opieplayer/playlistwidget.h b/core/multimedia/opieplayer/playlistwidget.h index 6569f35..5837ed3 100644 --- a/core/multimedia/opieplayer/playlistwidget.h +++ b/core/multimedia/opieplayer/playlistwidget.h | |||
@@ -57,7 +57,7 @@ public: | |||
57 | /* QTimer * menuTimer; */ | 57 | /* QTimer * menuTimer; */ |
58 | FileSelector* playLists; | 58 | FileSelector* playLists; |
59 | QPushButton *tbDeletePlaylist; | 59 | QPushButton *tbDeletePlaylist; |
60 | int fd; | 60 | int fd, selected; |
61 | public slots: | 61 | public slots: |
62 | bool first(); | 62 | bool first(); |
63 | bool last(); | 63 | bool last(); |