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 | |
parent | 491f95a2c6a5676f08520e494e125ba8b20e0eae (diff) | |
download | opie-c198ae0217f761418f7170d08a94da3864e47583.zip opie-c198ae0217f761418f7170d08a94da3864e47583.tar.gz opie-c198ae0217f761418f7170d08a94da3864e47583.tar.bz2 |
fixes
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 5 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 11 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index c187f52..b2143a0 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -103,16 +103,17 @@ Lib::Lib(XineVideoWidget* widget) { | |||
103 | m_audioOutput, m_config ); | 103 | m_audioOutput, m_config ); |
104 | // install the event handler | 104 | // install the event handler |
105 | xine_register_event_listener( m_xine, xine_event_handler, this ); | 105 | xine_register_event_listener( m_xine, xine_event_handler, this ); |
106 | } | 106 | } |
107 | 107 | ||
108 | Lib::~Lib() { | 108 | Lib::~Lib() { |
109 | delete m_config; | 109 | free( m_config ); |
110 | xine_remove_event_listener( m_xine, xine_event_handler ); | 110 | xine_remove_event_listener( m_xine, xine_event_handler ); |
111 | xine_exit( m_xine ); | 111 | xine_exit( m_xine ); |
112 | delete m_videoOutput; | 112 | /* FIXME either free or delete but valgrind bitches against both */ |
113 | //free( m_videoOutput ); | ||
113 | //delete m_audioOutput; | 114 | //delete m_audioOutput; |
114 | 115 | ||
115 | } | 116 | } |
116 | 117 | ||
117 | void Lib::resize ( const QSize &s ) | 118 | void Lib::resize ( const QSize &s ) |
118 | { | 119 | { |
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 | |||
@@ -3,12 +3,13 @@ | |||
3 | #include <qpe/qpemenubar.h> | 3 | #include <qpe/qpemenubar.h> |
4 | #include <qpe/qpetoolbar.h> | 4 | #include <qpe/qpetoolbar.h> |
5 | #include <qpe/fileselector.h> | 5 | #include <qpe/fileselector.h> |
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> |
12 | #include <qpe/config.h> | 13 | #include <qpe/config.h> |
13 | #include <qpe/global.h> | 14 | #include <qpe/global.h> |
14 | #include <qpe/resource.h> | 15 | #include <qpe/resource.h> |
@@ -304,12 +305,16 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
304 | 305 | ||
305 | initializeStates(); | 306 | initializeStates(); |
306 | } | 307 | } |
307 | 308 | ||
308 | 309 | ||
309 | PlayListWidget::~PlayListWidget() { | 310 | PlayListWidget::~PlayListWidget() { |
311 | /* fixing symptoms and not sources is entirely stupid - zecke */ | ||
312 | // Config cfg( "OpiePlayer" ); | ||
313 | // writeConfig( cfg ); | ||
314 | |||
310 | if ( d->current ) { | 315 | if ( d->current ) { |
311 | delete d->current; | 316 | delete d->current; |
312 | } | 317 | } |
313 | delete d; | 318 | delete d; |
314 | } | 319 | } |
315 | 320 | ||
@@ -949,17 +954,19 @@ void PlayListWidget::openFile() { | |||
949 | qDebug("Selected filename is "+filename); | 954 | qDebug("Selected filename is "+filename); |
950 | if(filename.right(3) == "m3u") { | 955 | if(filename.right(3) == "m3u") { |
951 | readm3u( filename ); | 956 | readm3u( filename ); |
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 | ||
963 | if(!lnk.writeLink()) { | 970 | if(!lnk.writeLink()) { |
964 | qDebug("Writing doclink did not work"); | 971 | qDebug("Writing doclink did not work"); |
965 | } | 972 | } |
@@ -1233,13 +1240,13 @@ void PlayListWidget::populateSkinsMenu() { | |||
1233 | 1240 | ||
1234 | ++it; | 1241 | ++it; |
1235 | } | 1242 | } |
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); |
1243 | 1250 | ||
1244 | Config cfg( "OpiePlayer" ); | 1251 | Config cfg( "OpiePlayer" ); |
1245 | cfg.setGroup("Options"); | 1252 | cfg.setGroup("Options"); |
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 53837c7..ffda2e4 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -376,13 +376,13 @@ void VideoWidget::makeVisible() { | |||
376 | if ( mediaPlayerState->fullscreen() ) { | 376 | if ( mediaPlayerState->fullscreen() ) { |
377 | setBackgroundMode( QWidget::NoBackground ); | 377 | setBackgroundMode( QWidget::NoBackground ); |
378 | showFullScreen(); | 378 | showFullScreen(); |
379 | resize( qApp->desktop()->size() ); | 379 | resize( qApp->desktop()->size() ); |
380 | slider->hide(); | 380 | slider->hide(); |
381 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); | 381 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); |
382 | 382 | qApp->processEvents(); | |
383 | } else { | 383 | } else { |
384 | showNormal(); | 384 | showNormal(); |
385 | showMaximized(); | 385 | showMaximized(); |
386 | setBackgroundPixmap( *pixBg ); | 386 | setBackgroundPixmap( *pixBg ); |
387 | if ( mediaPlayerState->streaming() ) { | 387 | if ( mediaPlayerState->streaming() ) { |
388 | slider->hide(); | 388 | slider->hide(); |