summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-06-13 04:46:12 (UTC)
committer llornkcor <llornkcor>2002-06-13 04:46:12 (UTC)
commit7ab4c2b4684287ac5f629445abcedb34ebfce9f3 (patch) (side-by-side diff)
tree28a17efdd2ac4a3b2193b27e14dbd96740fffc66
parent7239ae505999b64c74479c460daba256baf82798 (diff)
downloadopie-7ab4c2b4684287ac5f629445abcedb34ebfce9f3.zip
opie-7ab4c2b4684287ac5f629445abcedb34ebfce9f3.tar.gz
opie-7ab4c2b4684287ac5f629445abcedb34ebfce9f3.tar.bz2
bugfix: menu select play works again
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp4
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp9
-rw-r--r--core/multimedia/opieplayer/playlistwidget.h2
3 files changed, 6 insertions, 9 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 @@
**********************************************************************/
// L.J.Potter added better error code Fri 02-15-2002 14:37:47
+
#include <stdlib.h>
#include <stdio.h>
#include <qpe/qpeapplication.h>
@@ -188,6 +189,7 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
qDebug("creating new audio device");
+ QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
d = new AudioDevicePrivate;
d->frequency = f;
d->channels = chs;
@@ -203,7 +205,6 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
int fragments = 0x10000 * 8 + sound_fragment_shift;
int capabilities = 0;
- QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
#ifdef KEEP_DEVICE_OPEN
if ( AudioDevicePrivate::dspFd == 0 ) {
@@ -264,7 +265,6 @@ AudioDevice::~AudioDevice() {
delete d->unwrittenBuffer;
delete d;
#endif
- QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
}
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) {
break;
case 1:
{
-// if(audioView->selectedItem()) {
- addToSelection( audioView->selectedItem() );
+ addToSelection( audioView->currentItem() );
mediaPlayerState->setPlaying(b);
d->selectedFiles->removeSelected( );
tabWidget->setCurrentPage(1);
d->selectedFiles->unSelect();
insanityBool=FALSE;
// audioView->clearSelection();
-// }
}
break;
case 2:
{
-// if(videoView->selectedItem() ) {
- addToSelection( videoView->selectedItem() );
+ addToSelection( videoView->currentItem() );
mediaPlayerState->setPlaying(b);
qApp->processEvents();
d->selectedFiles->removeSelected( );
@@ -862,7 +859,6 @@ void PlayListWidget::btnPlay(bool b) {
d->selectedFiles->unSelect();
insanityBool=FALSE;
// videoView->clearSelection();
-// }
}
break;
};
@@ -888,6 +884,7 @@ void PlayListWidget::viewPressed( int mouse, QListViewItem *item, const QPoint&
case 1:
break;
case 2:{
+
QPopupMenu m;
m.insertItem( tr( "Play" ), this, SLOT( playSelected() ));
m.insertItem( tr( "Add to Playlist" ), this, SLOT( addSelected() ));
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:
/* QTimer * menuTimer; */
FileSelector* playLists;
QPushButton *tbDeletePlaylist;
- int fd;
+ int fd, selected;
public slots:
bool first();
bool last();