summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-09-11 00:51:09 (UTC)
committer llornkcor <llornkcor>2002-09-11 00:51:09 (UTC)
commit6013fac8a6ea871453565faf0f8b51c62465cf71 (patch) (unidiff)
treee93c0418bef8bd0f1ebcbd8dda42111ba4aeefba
parentd478be344e2ba383a1e38d2a1705de1cdbe2e838 (diff)
downloadopie-6013fac8a6ea871453565faf0f8b51c62465cf71.zip
opie-6013fac8a6ea871453565faf0f8b51c62465cf71.tar.gz
opie-6013fac8a6ea871453565faf0f8b51c62465cf71.tar.bz2
fix for 2.3.4
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp39
1 files changed, 5 insertions, 34 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 8d66407..5be0d6d 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -269,27 +269,13 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
269 QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold); 269 QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold);
270 270
271 tabWidget->insertTab( vTab,tr("Video")); 271 tabWidget->insertTab( vTab,tr("Video"));
272// populateVideoView();
273 272
274//playlists list
275 QWidget *LTab; 273 QWidget *LTab;
276 LTab = new QWidget( tabWidget, "LTab" ); 274 LTab = new QWidget( tabWidget, "LTab" );
277 playLists = new FileSelector( "playlist/plain", LTab, "fileselector" , FALSE, FALSE); //buggy 275 playLists = new FileSelector( "playlist/plain", LTab, "fileselector" , FALSE, FALSE); //buggy
278 playLists->setMinimumSize(233,260); 276 playLists->setMinimumSize(233,260);
279 tabWidget->insertTab(LTab,tr("Lists")); 277 tabWidget->insertTab(LTab,tr("Lists"));
280 278
281// connect( playLists, SIGNAL( newSelected( const DocLnk &) ), this, SLOT( newFile( const DocLnk & ) ) );
282
283// add the library area
284
285// connect( audioView, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int)),
286// this, SLOT( fauxPlay( QListViewItem *) ) );
287// connect( videoView, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int)),
288// this, SLOT( fauxPlay( QListViewItem *)) );
289
290// connect( audioView, SIGNAL( clicked( QListViewItem *) ), this, SLOT( fauxPlay( QListViewItem *) ) );
291// connect( videoView, SIGNAL( clicked( QListViewItem *) ), this, SLOT( fauxPlay( QListViewItem *) ) );
292
293 connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist())); 279 connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist()));
294 connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) ); 280 connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) );
295 connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) ); 281 connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) );
@@ -320,14 +306,12 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
320 connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) ); 306 connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) );
321 307
322 connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) ); 308 connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) );
323// connect( d->selectedFiles, SIGNAL( fileSelected( const DocLnk & ) ), this, SLOT( addToSelection( const DocLnk & ) ) );
324 309
325 setCentralWidget( vbox5 ); 310 setCentralWidget( vbox5 );
326 311
327 Config cfg( "OpiePlayer" ); 312 Config cfg( "OpiePlayer" );
328 readConfig( cfg ); 313 readConfig( cfg );
329 QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); 314 QString currentPlaylist = cfg.readEntry("CurrentPlaylist","");
330// qDebug("currentList is "+currentPlaylist);
331 loadList(DocLnk( currentPlaylist)); 315 loadList(DocLnk( currentPlaylist));
332 setCaption(tr("OpiePlayer: ")+ currentPlaylist ); 316 setCaption(tr("OpiePlayer: ")+ currentPlaylist );
333 317
@@ -351,13 +335,7 @@ void PlayListWidget::initializeStates() {
351 d->tbPlay->setOn( mediaPlayerState->playing() ); 335 d->tbPlay->setOn( mediaPlayerState->playing() );
352 d->tbLoop->setOn( mediaPlayerState->looping() ); 336 d->tbLoop->setOn( mediaPlayerState->looping() );
353 d->tbShuffle->setOn( mediaPlayerState->shuffled() ); 337 d->tbShuffle->setOn( mediaPlayerState->shuffled() );
354// d->tbFull->setOn( mediaPlayerState->fullscreen() );
355// d->tbScale->setOn( mediaPlayerState->scaled() );
356// d->tbScale->setEnabled( mediaPlayerState->fullscreen() );
357// setPlaylist( mediaPlayerState->playlist() );
358 setPlaylist( true); 338 setPlaylist( true);
359// d->selectedFiles->first();
360
361} 339}
362 340
363 341
@@ -375,7 +353,6 @@ void PlayListWidget::readConfig( Config& cfg ) {
375 } 353 }
376 } 354 }
377 d->selectedFiles->setSelectedItem( currentString); 355 d->selectedFiles->setSelectedItem( currentString);
378// d->selectedFiles->setSelectedItem( (const QString &)currentString);
379} 356}
380 357
381 358
@@ -416,12 +393,6 @@ void PlayListWidget::writeConfig( Config& cfg ) const {
416 393
417 394
418void PlayListWidget::addToSelection( const DocLnk& lnk ) { 395void PlayListWidget::addToSelection( const DocLnk& lnk ) {
419// qDebug("add");
420// if( lnk.file().find(" ",0,TRUE) != -1 || lnk.file().find("%20",0,TRUE) != -1) {
421// QMessageBox::message("Note","You are trying to play\na malformed url.");
422
423// } else {
424
425 d->setDocumentUsed = FALSE; 396 d->setDocumentUsed = FALSE;
426 if ( mediaPlayerState->playlist() ) { 397 if ( mediaPlayerState->playlist() ) {
427 if(QFileInfo(lnk.file()).exists() || lnk.file().left(4) == "http" ) 398 if(QFileInfo(lnk.file()).exists() || lnk.file().left(4) == "http" )
@@ -429,7 +400,6 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) {
429 } 400 }
430 else 401 else
431 mediaPlayerState->setPlaying( TRUE ); 402 mediaPlayerState->setPlaying( TRUE );
432// }
433} 403}
434 404
435 405
@@ -537,7 +507,7 @@ const DocLnk *PlayListWidget::current() { // this is fugly
537 else if ( d->setDocumentUsed && d->current ) { 507 else if ( d->setDocumentUsed && d->current ) {
538 return d->current; 508 return d->current;
539 } else { 509 } else {
540 return d->files->selected(); 510 return &(d->files->selectedDocument());
541 } 511 }
542 } 512 }
543 break; 513 break;
@@ -893,9 +863,9 @@ void PlayListWidget::deletePlaylist() {
893 (tr("You really want to delete\nthis playlist?")), 863 (tr("You really want to delete\nthis playlist?")),
894 (tr("Yes")), (tr("No")), 0 )){ 864 (tr("Yes")), (tr("No")), 0 )){
895 case 0: // Yes clicked, 865 case 0: // Yes clicked,
896 QFile().remove(playLists->selected()->file()); 866// QFile().remove(playLists->selected()->file());
897 QFile().remove(playLists->selected()->linkFile()); 867// QFile().remove(playLists->selected()->linkFile());
898 playLists->reread(); 868// playLists->reread();
899 break; 869 break;
900 case 1: // Cancel 870 case 1: // Cancel
901 break; 871 break;
@@ -1036,6 +1006,7 @@ void PlayListWidget::populateAudioView() {
1036 size=0; 1006 size=0;
1037 else 1007 else
1038 size = QFile( dit.current()->file() ).size(); 1008 size = QFile( dit.current()->file() ).size();
1009 qDebug(dit.current()->name());
1039 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), 1010 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(),
1040 QString::number(size ), storage); 1011 QString::number(size ), storage);
1041 newItem->setPixmap(0, Resource::loadPixmap( "opieplayer/musicfile" )); 1012 newItem->setPixmap(0, Resource::loadPixmap( "opieplayer/musicfile" ));