summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp2
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp10
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp11
3 files changed, 15 insertions, 8 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 0ced256..c54a00f 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -576,49 +576,49 @@ void LauncherView::itemClicked( int btn, QIconViewItem *item )
576 } 576 }
577} 577}
578 578
579void LauncherView::itemPressed( int btn, QIconViewItem *item ) 579void LauncherView::itemPressed( int btn, QIconViewItem *item )
580{ 580{
581 if ( item ) { 581 if ( item ) {
582 AppLnk *appLnk = ((LauncherItem *)item)->appLnk(); 582 AppLnk *appLnk = ((LauncherItem *)item)->appLnk();
583 if ( btn == RightButton ) 583 if ( btn == RightButton )
584 emit rightPressed( appLnk ); 584 emit rightPressed( appLnk );
585/* 585/*
586 else if ( btn == LeftButton ) 586 else if ( btn == LeftButton )
587 emit clicked( appLnk ); 587 emit clicked( appLnk );
588*/ 588*/
589 item->setSelected(FALSE); 589 item->setSelected(FALSE);
590 } 590 }
591} 591}
592 592
593void LauncherView::internalPopulate( AppLnkSet *folder, const QString& typefilter ) 593void LauncherView::internalPopulate( AppLnkSet *folder, const QString& typefilter )
594{ 594{
595 QListIterator<AppLnk> it( folder->children() ); 595 QListIterator<AppLnk> it( folder->children() );
596 icons->setTypeFilter(typefilter,FALSE); 596 icons->setTypeFilter(typefilter,FALSE);
597 597
598 while ( it.current() ) { 598 while ( it.current() ) {
599 // show only the icons for existing files 599 // show only the icons for existing files
600 if (!QFile(it.current()->file()).exists() ) 600 if (!QFile(it.current()->file()).exists() & it.current()->file().left(4) != "http")
601 { 601 {
602 //maybe insert some .desktop file deletion code later 602 //maybe insert some .desktop file deletion code later
603 //maybe dir specific 603 //maybe dir specific
604 } 604 }
605 else 605 else
606 { 606 {
607 icons->addItem(*it,FALSE); 607 icons->addItem(*it,FALSE);
608 } 608 }
609 ++it; 609 ++it;
610 } 610 }
611 611
612 icons->sort(); 612 icons->sort();
613} 613}
614 614
615bool LauncherView::removeLink(const QString& linkfile) 615bool LauncherView::removeLink(const QString& linkfile)
616{ 616{
617 return icons->removeLink(linkfile); 617 return icons->removeLink(linkfile);
618} 618}
619 619
620void LauncherView::sort() 620void LauncherView::sort()
621{ 621{
622 icons->sort(); 622 icons->sort();
623} 623}
624 624
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 65dc5fb..8d66407 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -1009,52 +1009,56 @@ void PlayListWidget::scanForVideo() {
1009 } 1009 }
1010 Global::findDocuments(&vFiles, "video/*"); 1010 Global::findDocuments(&vFiles, "video/*");
1011 videoScan = TRUE; 1011 videoScan = TRUE;
1012} 1012}
1013 1013
1014void PlayListWidget::populateAudioView() { 1014void PlayListWidget::populateAudioView() {
1015 1015
1016 audioView->clear(); 1016 audioView->clear();
1017 StorageInfo storageInfo; 1017 StorageInfo storageInfo;
1018 const QList<FileSystem> &fs = storageInfo.fileSystems(); 1018 const QList<FileSystem> &fs = storageInfo.fileSystems();
1019 if(!audioScan) scanForAudio(); 1019 if(!audioScan) scanForAudio();
1020 1020
1021 QListIterator<DocLnk> dit( files.children() ); 1021 QListIterator<DocLnk> dit( files.children() );
1022 QListIterator<FileSystem> it ( fs ); 1022 QListIterator<FileSystem> it ( fs );
1023 1023
1024 QString storage; 1024 QString storage;
1025 for ( ; dit.current(); ++dit ) { 1025 for ( ; dit.current(); ++dit ) {
1026 for( ; it.current(); ++it ){ 1026 for( ; it.current(); ++it ){
1027 const QString name = (*it)->name(); 1027 const QString name = (*it)->name();
1028 const QString path = (*it)->path(); 1028 const QString path = (*it)->path();
1029 if(dit.current()->file().find(path) != -1 ) storage=name; 1029 if(dit.current()->file().find(path) != -1 ) storage=name;
1030 } 1030 }
1031 1031
1032 QListViewItem * newItem; 1032 QListViewItem * newItem;
1033 if ( QFile( dit.current()->file()).exists() ) { 1033 if ( QFile( dit.current()->file()).exists() || dit.current()->file().left(4) == "http" ) {
1034// qDebug(dit.current()->name()); 1034 long size;
1035 if( dit.current()->file().left(4) == "http" )
1036 size=0;
1037 else
1038 size = QFile( dit.current()->file() ).size();
1035 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), 1039 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(),
1036 QString::number( QFile( dit.current()->file()).size() ), storage); 1040 QString::number(size ), storage);
1037 newItem->setPixmap(0, Resource::loadPixmap( "opieplayer/musicfile" )); 1041 newItem->setPixmap(0, Resource::loadPixmap( "opieplayer/musicfile" ));
1038 } 1042 }
1039 } 1043 }
1040 1044
1041} 1045}
1042 1046
1043void PlayListWidget::populateVideoView() { 1047void PlayListWidget::populateVideoView() {
1044 videoView->clear(); 1048 videoView->clear();
1045 StorageInfo storageInfo; 1049 StorageInfo storageInfo;
1046 const QList<FileSystem> &fs = storageInfo.fileSystems(); 1050 const QList<FileSystem> &fs = storageInfo.fileSystems();
1047 1051
1048 if(!videoScan ) scanForVideo(); 1052 if(!videoScan ) scanForVideo();
1049 1053
1050 QListIterator<DocLnk> Vdit( vFiles.children() ); 1054 QListIterator<DocLnk> Vdit( vFiles.children() );
1051 QListIterator<FileSystem> it ( fs ); 1055 QListIterator<FileSystem> it ( fs );
1052 videoView->clear(); 1056 videoView->clear();
1053 QString storage; 1057 QString storage;
1054 for ( ; Vdit.current(); ++Vdit ) { 1058 for ( ; Vdit.current(); ++Vdit ) {
1055 for( ; it.current(); ++it ){ 1059 for( ; it.current(); ++it ){
1056 const QString name = (*it)->name(); 1060 const QString name = (*it)->name();
1057 const QString path = (*it)->path(); 1061 const QString path = (*it)->path();
1058 if( Vdit.current()->file().find(path) != -1 ) storage=name; 1062 if( Vdit.current()->file().find(path) != -1 ) storage=name;
1059 } 1063 }
1060 1064
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 603a7a3..6c4d07f 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -708,52 +708,55 @@ void PlayListWidget::scanForVideo() {
708} 708}
709 709
710void PlayListWidget::populateAudioView() { 710void PlayListWidget::populateAudioView() {
711 audioView->clear(); 711 audioView->clear();
712 StorageInfo storageInfo; 712 StorageInfo storageInfo;
713 const QList<FileSystem> &fs = storageInfo.fileSystems(); 713 const QList<FileSystem> &fs = storageInfo.fileSystems();
714 if(!audioScan) { 714 if(!audioScan) {
715 scanForAudio(); 715 scanForAudio();
716 } 716 }
717 717
718 QListIterator<DocLnk> dit( files.children() ); 718 QListIterator<DocLnk> dit( files.children() );
719 QListIterator<FileSystem> it ( fs ); 719 QListIterator<FileSystem> it ( fs );
720 720
721 QString storage; 721 QString storage;
722 for ( ; dit.current(); ++dit ) { 722 for ( ; dit.current(); ++dit ) {
723 for( ; it.current(); ++it ){ 723 for( ; it.current(); ++it ){
724 const QString name = (*it)->name(); 724 const QString name = (*it)->name();
725 const QString path = (*it)->path(); 725 const QString path = (*it)->path();
726 if(dit.current()->file().find(path) != -1 ) { 726 if(dit.current()->file().find(path) != -1 ) {
727 storage = name; 727 storage = name;
728 } 728 }
729 } 729 }
730 730
731 QListViewItem * newItem; 731 QListViewItem * newItem;
732 if ( QFile( dit.current()->file()).exists() ) { 732 if ( QFile( dit.current()->file()).exists() || dit.current()->file().left(4) == "http" ) {
733 // qDebug(dit.current()->name()); 733 long size;
734 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), 734 if( dit.current()->file().left(4) == "http" )
735 QString::number( QFile( dit.current()->file()).size() ), storage); 735 size=0;
736 else
737 size = QFile( dit.current()->file() ).size();
738 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), QString::number(size ), storage);
736 newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) ); 739 newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) );
737 } 740 }
738 } 741 }
739} 742}
740 743
741 744
742void PlayListWidget::populateVideoView() { 745void PlayListWidget::populateVideoView() {
743 videoView->clear(); 746 videoView->clear();
744 StorageInfo storageInfo; 747 StorageInfo storageInfo;
745 const QList<FileSystem> &fs = storageInfo.fileSystems(); 748 const QList<FileSystem> &fs = storageInfo.fileSystems();
746 749
747 if(!videoScan ) { 750 if(!videoScan ) {
748 scanForVideo(); 751 scanForVideo();
749 } 752 }
750 753
751 QListIterator<DocLnk> Vdit( vFiles.children() ); 754 QListIterator<DocLnk> Vdit( vFiles.children() );
752 QListIterator<FileSystem> it ( fs ); 755 QListIterator<FileSystem> it ( fs );
753 videoView->clear(); 756 videoView->clear();
754 QString storage; 757 QString storage;
755 for ( ; Vdit.current(); ++Vdit ) { 758 for ( ; Vdit.current(); ++Vdit ) {
756 for( ; it.current(); ++it ) { 759 for( ; it.current(); ++it ) {
757 const QString name = (*it)->name(); 760 const QString name = (*it)->name();
758 const QString path = (*it)->path(); 761 const QString path = (*it)->path();
759 if( Vdit.current()->file().find(path) != -1 ) { 762 if( Vdit.current()->file().find(path) != -1 ) {