summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-15 19:06:52 (UTC)
committer harlekin <harlekin>2002-08-15 19:06:52 (UTC)
commitcff42f8a8808ef9fd9b65376649857e0e0c2ccc3 (patch) (unidiff)
tree7cf3cca6b2ebb35cd9ffc0ce8adc5568a27ad7d7
parent8cd40434c7011022a8e1706698e5c5075681bd1e (diff)
downloadopie-cff42f8a8808ef9fd9b65376649857e0e0c2ccc3.zip
opie-cff42f8a8808ef9fd9b65376649857e0e0c2ccc3.tar.gz
opie-cff42f8a8808ef9fd9b65376649857e0e0c2ccc3.tar.bz2
stop now working as supposed
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp1
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp2
4 files changed, 8 insertions, 7 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 3b20873..d554141 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -162,24 +162,25 @@ int Lib::subVersion() {
162} 162}
163int Lib::play( const QString& fileName, 163int Lib::play( const QString& fileName,
164 int startPos, 164 int startPos,
165 int start_time ) { 165 int start_time ) {
166 QString str = fileName.stripWhiteSpace(); 166 QString str = fileName.stripWhiteSpace();
167 //workaround OpiePlayer bug 167 //workaround OpiePlayer bug
168 if (str.right(1) == QString::fromLatin1("/") ) 168 if (str.right(1) == QString::fromLatin1("/") )
169 str = str.mid( str.length() -1 ); 169 str = str.mid( str.length() -1 );
170 return xine_play( m_xine, QFile::encodeName(str.utf8() ).data(), 170 return xine_play( m_xine, QFile::encodeName(str.utf8() ).data(),
171 startPos, start_time); 171 startPos, start_time);
172} 172}
173void Lib::stop() { 173void Lib::stop() {
174 qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>");
174 xine_stop(m_xine ); 175 xine_stop(m_xine );
175} 176}
176void Lib::pause(){ 177void Lib::pause(){
177 xine_set_speed( m_xine, SPEED_PAUSE ); 178 xine_set_speed( m_xine, SPEED_PAUSE );
178} 179}
179int Lib::speed() { 180int Lib::speed() {
180 return xine_get_speed( m_xine ); 181 return xine_get_speed( m_xine );
181} 182}
182void Lib::setSpeed( int speed ) { 183void Lib::setSpeed( int speed ) {
183 xine_set_speed( m_xine, speed ); 184 xine_set_speed( m_xine, speed );
184} 185}
185int Lib::status(){ 186int Lib::status(){
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 51fbb8b..93819f2 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -39,48 +39,48 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name )
39 connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); 39 connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
40 connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); 40 connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
41 41
42 connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); 42 connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) );
43 connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); 43 connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) );
44 connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); 44 connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
45 connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); 45 connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
46 46
47 connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); 47 connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) );
48 connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); 48 connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) );
49 connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); 49 connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
50 connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); 50 connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
51 51
52 volControl = new VolumeControl; 52 volControl = new VolumeControl;
53 53
54} 54}
55 55
56MediaPlayer::~MediaPlayer() { 56MediaPlayer::~MediaPlayer() {
57 delete xineControl; 57 delete xineControl;
58 delete volControl; 58 delete volControl;
59} 59}
60 60
61void MediaPlayer::pauseCheck( bool b ) { 61void MediaPlayer::pauseCheck( bool b ) {
62 if ( b && !mediaPlayerState->playing() ) { 62 if ( b && !mediaPlayerState->playing() ) {
63 mediaPlayerState->setPaused( FALSE ); 63 mediaPlayerState->setPaused( FALSE );
64 } 64 }
65} 65}
66 66
67void MediaPlayer::play() { 67void MediaPlayer::play() {
68 mediaPlayerState->setPlaying( FALSE ); 68 mediaPlayerState->setPlaying( FALSE );
69 mediaPlayerState->setPlaying( TRUE ); 69 mediaPlayerState->setPlaying( TRUE );
70} 70}
71 71
72void MediaPlayer::setPlaying( bool play ) { 72void MediaPlayer::setPlaying( bool play ) {
73 if ( !play ) { 73 if ( !play ) {
74 mediaPlayerState->setPaused( FALSE ); 74 //mediaPlayerState->setPaused( TRUE );
75 return; 75 return;
76 } 76 }
77 77
78 if ( mediaPlayerState->paused() ) { 78 if ( mediaPlayerState->paused() ) {
79 mediaPlayerState->setPaused( FALSE ); 79 mediaPlayerState->setPaused( FALSE );
80 return; 80 return;
81 } 81 }
82 82
83 const DocLnk *playListCurrent = playList->current(); 83 const DocLnk *playListCurrent = playList->current();
84 if ( playListCurrent != NULL ) { 84 if ( playListCurrent != NULL ) {
85 currentFile = playListCurrent; 85 currentFile = playListCurrent;
86 } 86 }
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index c210ffb..77e2095 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -676,25 +676,25 @@ void PlayListWidget::addSelected() {
676 } 676 }
677 tabWidget->setCurrentPage(0); 677 tabWidget->setCurrentPage(0);
678 } 678 }
679 break; 679 break;
680 }; 680 };
681} 681}
682 682
683void PlayListWidget::removeSelected() { 683void PlayListWidget::removeSelected() {
684 d->selectedFiles->removeSelected( ); 684 d->selectedFiles->removeSelected( );
685} 685}
686 686
687void PlayListWidget::playIt( QListViewItem *it) { 687void PlayListWidget::playIt( QListViewItem *it) {
688 if(it==NULL) return; 688 // if(it==NULL) return;
689 qDebug("playIt"); 689 qDebug("playIt");
690 mediaPlayerState->setPlaying(FALSE); 690 mediaPlayerState->setPlaying(FALSE);
691 mediaPlayerState->setPlaying(TRUE); 691 mediaPlayerState->setPlaying(TRUE);
692 d->selectedFiles->unSelect(); 692 d->selectedFiles->unSelect();
693} 693}
694 694
695void PlayListWidget::addToSelection( QListViewItem *it) { 695void PlayListWidget::addToSelection( QListViewItem *it) {
696 d->setDocumentUsed = FALSE; 696 d->setDocumentUsed = FALSE;
697 697
698 if(it) { 698 if(it) {
699 switch (tabWidget->currentPageIndex()) { 699 switch (tabWidget->currentPageIndex()) {
700 case 1: { 700 case 1: {
@@ -1224,31 +1224,31 @@ void PlayListWidget::readPls(const QString &filename) {
1224 d->selectedFiles->addToSelection( lnk); 1224 d->selectedFiles->addToSelection( lnk);
1225 } 1225 }
1226 } 1226 }
1227 i++; 1227 i++;
1228 } 1228 }
1229} 1229}
1230 1230
1231void PlayListWidget::pmViewActivated(int index) { 1231void PlayListWidget::pmViewActivated(int index) {
1232qDebug("%d", index); 1232qDebug("%d", index);
1233switch(index) { 1233switch(index) {
1234 case -16: 1234 case -16:
1235 { 1235 {
1236 1236
1237 mediaPlayerState->toggleFullscreen(); 1237 mediaPlayerState->toggleFullscreen();
1238 bool b=mediaPlayerState->fullscreen(); 1238 bool b=mediaPlayerState->fullscreen();
1239 pmView->setItemChecked( index,b); 1239 pmView->setItemChecked( index,b);
1240 Config cfg( "OpiePlayer" ); 1240 Config cfg( "OpiePlayer" );
1241 cfg.writeEntry("FullScreen", b); 1241 cfg.writeEntry("FullScreen", b);
1242 1242
1243 } 1243 }
1244 break; 1244 break;
1245}; 1245};
1246} 1246}
1247 1247
1248void PlayListWidget::populateSkinsMenu() { 1248void PlayListWidget::populateSkinsMenu() {
1249 int item=0; 1249 int item=0;
1250 defaultSkinIndex=0; 1250 defaultSkinIndex=0;
1251 QString skinName; 1251 QString skinName;
1252 Config cfg( "OpiePlayer" ); 1252 Config cfg( "OpiePlayer" );
1253 cfg.setGroup("Options"); 1253 cfg.setGroup("Options");
1254 QString skin = cfg.readEntry("Skin","default"); 1254 QString skin = cfg.readEntry("Skin","default");
@@ -1259,25 +1259,25 @@ void PlayListWidget::populateSkinsMenu() {
1259 const QFileInfoList *skinslist = skinsDir.entryInfoList(); 1259 const QFileInfoList *skinslist = skinsDir.entryInfoList();
1260 QFileInfoListIterator it( *skinslist ); 1260 QFileInfoListIterator it( *skinslist );
1261 QFileInfo *fi; 1261 QFileInfo *fi;
1262 while ( (fi=it.current()) ) { 1262 while ( (fi=it.current()) ) {
1263 skinName = fi->fileName(); 1263 skinName = fi->fileName();
1264 qDebug( fi->fileName()); 1264 qDebug( fi->fileName());
1265 if( skinName != "." && skinName != ".." && skinName !="CVS") 1265 if( skinName != "." && skinName != ".." && skinName !="CVS")
1266 item = skinsMenu->insertItem( fi->fileName()); 1266 item = skinsMenu->insertItem( fi->fileName());
1267 if( skinName == "default") 1267 if( skinName == "default")
1268 defaultSkinIndex = item; 1268 defaultSkinIndex = item;
1269 if( skinName == skin) 1269 if( skinName == skin)
1270 skinsMenu->setItemChecked( item, TRUE); 1270 skinsMenu->setItemChecked( item, TRUE);
1271 1271
1272 ++it; 1272 ++it;
1273 } 1273 }
1274} 1274}
1275 1275
1276void PlayListWidget::skinsMenuActivated(int item) { 1276void PlayListWidget::skinsMenuActivated(int item) {
1277 for(int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i--) { 1277 for(int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i--) {
1278 skinsMenu->setItemChecked( i, FALSE); 1278 skinsMenu->setItemChecked( i, FALSE);
1279 } 1279 }
1280 skinsMenu->setItemChecked( item, TRUE); 1280 skinsMenu->setItemChecked( item, TRUE);
1281 1281
1282 Config cfg( "OpiePlayer" ); 1282 Config cfg( "OpiePlayer" );
1283 cfg.setGroup("Options"); 1283 cfg.setGroup("Options");
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 17112a2..8fd2743 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -107,25 +107,25 @@ void XineControl::play( const QString& fileName ) {
107 length(); 107 length();
108 position(); 108 position();
109} 109}
110 110
111void XineControl::nextMedia() { 111void XineControl::nextMedia() {
112 mediaPlayerState->setNext(); 112 mediaPlayerState->setNext();
113} 113}
114 114
115void XineControl::stop( bool isSet ) { 115void XineControl::stop( bool isSet ) {
116 if ( !isSet) { 116 if ( !isSet) {
117 libXine->stop( ); 117 libXine->stop( );
118 mediaPlayerState->setList(); 118 mediaPlayerState->setList();
119 //mediaPlayerState->setPlaying( false ); 119 // mediaPlayerState->setPlaying( false );
120 120
121#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 121#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
122 if ( disabledSuspendScreenSaver ) { 122 if ( disabledSuspendScreenSaver ) {
123 disabledSuspendScreenSaver = FALSE; 123 disabledSuspendScreenSaver = FALSE;
124 // Re-enable the suspend mode 124 // Re-enable the suspend mode
125 QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; 125 QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
126 } 126 }
127#endif 127#endif
128 128
129 } else { 129 } else {
130 // play again 130 // play again
131 } 131 }