author | harlekin <harlekin> | 2002-08-21 00:20:22 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-21 00:20:22 (UTC) |
commit | c198ae0217f761418f7170d08a94da3864e47583 (patch) (unidiff) | |
tree | 096790ff5389ea30f61912f72338e5642edaa667 /noncore/multimedia/opieplayer2/playlistwidget.cpp | |
parent | 491f95a2c6a5676f08520e494e125ba8b20e0eae (diff) | |
download | opie-c198ae0217f761418f7170d08a94da3864e47583.zip opie-c198ae0217f761418f7170d08a94da3864e47583.tar.gz opie-c198ae0217f761418f7170d08a94da3864e47583.tar.bz2 |
fixes
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 75e2979..098322b 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <qpe/qpeapplication.h> | 6 | #include <qpe/qpeapplication.h> |
7 | #include <qpe/lnkproperties.h> | 7 | #include <qpe/lnkproperties.h> |
8 | #include <qpe/storage.h> | 8 | #include <qpe/storage.h> |
9 | #include <qpe/mimetype.h> | ||
9 | 10 | ||
10 | #include <qpe/applnk.h> | 11 | #include <qpe/applnk.h> |
11 | #include <qpopupmenu.h> | 12 | #include <qpopupmenu.h> |
@@ -307,10 +308,14 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
307 | 308 | ||
308 | 309 | ||
309 | PlayListWidget::~PlayListWidget() { | 310 | PlayListWidget::~PlayListWidget() { |
310 | if ( d->current ) { | 311 | /* fixing symptoms and not sources is entirely stupid - zecke */ |
311 | delete d->current; | 312 | // Config cfg( "OpiePlayer" ); |
312 | } | 313 | // writeConfig( cfg ); |
313 | delete d; | 314 | |
315 | if ( d->current ) { | ||
316 | delete d->current; | ||
317 | } | ||
318 | delete d; | ||
314 | } | 319 | } |
315 | 320 | ||
316 | 321 | ||
@@ -952,11 +957,13 @@ void PlayListWidget::openFile() { | |||
952 | } else if(filename.right(3) == "pls") { | 957 | } else if(filename.right(3) == "pls") { |
953 | readPls( filename ); | 958 | readPls( filename ); |
954 | } else { | 959 | } else { |
960 | /* FIXME ....... AUDIO/X-MPEGURL is bad*/ | ||
955 | DocLnk lnk; | 961 | DocLnk lnk; |
956 | 962 | ||
957 | lnk.setName(filename); //sets file name | 963 | lnk.setName(filename); //sets file name |
958 | lnk.setFile(filename); //sets File property | 964 | lnk.setFile(filename); //sets File property |
959 | lnk.setType("audio/x-mpegurl"); | 965 | //qWarning( "Mimetype: " + MimeType( QFile::encodeName(filename) ).id() ); |
966 | lnk.setType( MimeType( QFile::encodeName(filename) ).id() ); | ||
960 | lnk.setExec("opieplayer"); | 967 | lnk.setExec("opieplayer"); |
961 | lnk.setIcon("opieplayer2/MPEGPlayer"); | 968 | lnk.setIcon("opieplayer2/MPEGPlayer"); |
962 | 969 | ||
@@ -1236,7 +1243,7 @@ void PlayListWidget::populateSkinsMenu() { | |||
1236 | } | 1243 | } |
1237 | 1244 | ||
1238 | void PlayListWidget::skinsMenuActivated(int item) { | 1245 | void PlayListWidget::skinsMenuActivated(int item) { |
1239 | for(int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i--) { | 1246 | for(uint i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i--) { |
1240 | skinsMenu->setItemChecked( i, FALSE); | 1247 | skinsMenu->setItemChecked( i, FALSE); |
1241 | } | 1248 | } |
1242 | skinsMenu->setItemChecked( item, TRUE); | 1249 | skinsMenu->setItemChecked( item, TRUE); |