-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index efb5df3..3609f5d 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -45,49 +45,49 @@ | |||
45 | #include <sys/ioctl.h> | 45 | #include <sys/ioctl.h> |
46 | #include <sys/soundcard.h> | 46 | #include <sys/soundcard.h> |
47 | 47 | ||
48 | // for setBacklight() | 48 | // for setBacklight() |
49 | #include <linux/fb.h> | 49 | #include <linux/fb.h> |
50 | #include <sys/types.h> | 50 | #include <sys/types.h> |
51 | #include <sys/stat.h> | 51 | #include <sys/stat.h> |
52 | #include <stdlib.h> | 52 | #include <stdlib.h> |
53 | 53 | ||
54 | #define BUTTONS_ON_TOOLBAR | 54 | #define BUTTONS_ON_TOOLBAR |
55 | #define SIDE_BUTTONS | 55 | #define SIDE_BUTTONS |
56 | #define CAN_SAVE_LOAD_PLAYLISTS | 56 | #define CAN_SAVE_LOAD_PLAYLISTS |
57 | 57 | ||
58 | extern AudioWidget *audioUI; | 58 | extern AudioWidget *audioUI; |
59 | extern VideoWidget *videoUI; | 59 | extern VideoWidget *videoUI; |
60 | extern MediaPlayerState *mediaPlayerState; | 60 | extern MediaPlayerState *mediaPlayerState; |
61 | 61 | ||
62 | static inline QString fullBaseName ( const QFileInfo &fi ) | 62 | static inline QString fullBaseName ( const QFileInfo &fi ) |
63 | { | 63 | { |
64 | QString str = fi. fileName ( ); | 64 | QString str = fi. fileName ( ); |
65 | return str. left ( str. findRev ( '.' )); | 65 | return str. left ( str. findRev ( '.' )); |
66 | } | 66 | } |
67 | 67 | ||
68 | 68 | ||
69 | QString audioMimes ="audio/mpeg;audio/x-wav;application/ogg;audio/x-mod"; | 69 | QString audioMimes ="audio/mpeg;audio/x-wav;audio/x-ogg;audio/x-mod"; |
70 | // class myFileSelector { | 70 | // class myFileSelector { |
71 | 71 | ||
72 | // }; | 72 | // }; |
73 | class PlayListWidgetPrivate { | 73 | class PlayListWidgetPrivate { |
74 | public: | 74 | public: |
75 | QToolButton *tbPlay, *tbFull, *tbLoop, *tbScale, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; | 75 | QToolButton *tbPlay, *tbFull, *tbLoop, *tbScale, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; |
76 | QFrame *playListFrame; | 76 | QFrame *playListFrame; |
77 | FileSelector *files; | 77 | FileSelector *files; |
78 | PlayListSelection *selectedFiles; | 78 | PlayListSelection *selectedFiles; |
79 | bool setDocumentUsed; | 79 | bool setDocumentUsed; |
80 | DocLnk *current; | 80 | DocLnk *current; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | 83 | ||
84 | class ToolButton : public QToolButton { | 84 | class ToolButton : public QToolButton { |
85 | public: | 85 | public: |
86 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) | 86 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) |
87 | : QToolButton( parent, name ) { | 87 | : QToolButton( parent, name ) { |
88 | setTextLabel( name ); | 88 | setTextLabel( name ); |
89 | setPixmap( Resource::loadPixmap( icon ) ); | 89 | setPixmap( Resource::loadPixmap( icon ) ); |
90 | setAutoRaise( TRUE ); | 90 | setAutoRaise( TRUE ); |
91 | setFocusPolicy( QWidget::NoFocus ); | 91 | setFocusPolicy( QWidget::NoFocus ); |
92 | setToggleButton( t ); | 92 | setToggleButton( t ); |
93 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); | 93 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 1a5e474..4460833 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -644,49 +644,49 @@ void PlayListWidget::openURL() { | |||
644 | } else { | 644 | } else { |
645 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | 645 | lnk.setName( QFileInfo(filename).baseName() ); //sets name |
646 | lnk.setFile( filename ); //sets file name | 646 | lnk.setFile( filename ); //sets file name |
647 | d->selectedFiles->addToSelection( lnk); | 647 | d->selectedFiles->addToSelection( lnk); |
648 | writeCurrentM3u(); | 648 | writeCurrentM3u(); |
649 | d->selectedFiles->setSelectedItem( lnk.name()); | 649 | d->selectedFiles->setSelectedItem( lnk.name()); |
650 | } | 650 | } |
651 | } | 651 | } |
652 | 652 | ||
653 | 653 | ||
654 | delete fileDlg; | 654 | delete fileDlg; |
655 | } | 655 | } |
656 | 656 | ||
657 | 657 | ||
658 | void PlayListWidget::openFile() { | 658 | void PlayListWidget::openFile() { |
659 | 659 | ||
660 | QString filename, name; | 660 | QString filename, name; |
661 | 661 | ||
662 | Config cfg( "OpiePlayer" ); | 662 | Config cfg( "OpiePlayer" ); |
663 | cfg.setGroup("Dialog"); | 663 | cfg.setGroup("Dialog"); |
664 | MimeTypes types; | 664 | MimeTypes types; |
665 | QStringList audio, video, all; | 665 | QStringList audio, video, all; |
666 | audio << "audio/*"; | 666 | audio << "audio/*"; |
667 | audio << "playlist/plain"; | 667 | audio << "playlist/plain"; |
668 | audio << "application/ogg"; | 668 | audio << "audio/x-ogg"; |
669 | audio << "audio/x-mpegurl"; | 669 | audio << "audio/x-mpegurl"; |
670 | 670 | ||
671 | video << "video/*"; | 671 | video << "video/*"; |
672 | video << "playlist/plain"; | 672 | video << "playlist/plain"; |
673 | 673 | ||
674 | all += audio; | 674 | all += audio; |
675 | all += video; | 675 | all += video; |
676 | types.insert("All Media Files", all ); | 676 | types.insert("All Media Files", all ); |
677 | types.insert("Audio", audio ); | 677 | types.insert("Audio", audio ); |
678 | types.insert("Video", video ); | 678 | types.insert("Video", video ); |
679 | 679 | ||
680 | QString str = OFileDialog::getOpenFileName( 1, | 680 | QString str = OFileDialog::getOpenFileName( 1, |
681 | cfg.readEntry("LastDirectory",QPEApplication::documentDir()),"", | 681 | cfg.readEntry("LastDirectory",QPEApplication::documentDir()),"", |
682 | types, 0 ); | 682 | types, 0 ); |
683 | 683 | ||
684 | if(str.left(2) == "//") { | 684 | if(str.left(2) == "//") { |
685 | str=str.right(str.length()-1); | 685 | str=str.right(str.length()-1); |
686 | } | 686 | } |
687 | cfg.writeEntry( "LastDirectory" ,QFileInfo( str ).dirPath() ); | 687 | cfg.writeEntry( "LastDirectory" ,QFileInfo( str ).dirPath() ); |
688 | 688 | ||
689 | if( !str.isEmpty() ) { | 689 | if( !str.isEmpty() ) { |
690 | 690 | ||
691 | qDebug( "Selected filename is " + str ); | 691 | qDebug( "Selected filename is " + str ); |
692 | filename = str; | 692 | filename = str; |