-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.h | 1 |
3 files changed, 1 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 55b66ab..6355bec 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -166,15 +166,12 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
166 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); | 166 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); |
167 | loadList(DocLnk( currentPlaylist ) ); | 167 | loadList(DocLnk( currentPlaylist ) ); |
168 | } | 168 | } |
169 | 169 | ||
170 | 170 | ||
171 | PlayListWidget::~PlayListWidget() { | 171 | PlayListWidget::~PlayListWidget() { |
172 | if ( d->current ) { | ||
173 | delete d->current; | ||
174 | } | ||
175 | delete d; | 172 | delete d; |
176 | } | 173 | } |
177 | 174 | ||
178 | 175 | ||
179 | void PlayListWidget::initializeStates() { | 176 | void PlayListWidget::initializeStates() { |
180 | d->tbPlay->setOn( mediaPlayerState->isPlaying() ); | 177 | d->tbPlay->setOn( mediaPlayerState->isPlaying() ); |
@@ -425,16 +422,14 @@ void PlayListWidget::useSelectedDocument() { | |||
425 | 422 | ||
426 | 423 | ||
427 | const DocLnk *PlayListWidget::current() const { // this is fugly | 424 | const DocLnk *PlayListWidget::current() const { // this is fugly |
428 | assert( currentTab() == CurrentPlayList ); | 425 | assert( currentTab() == CurrentPlayList ); |
429 | 426 | ||
430 | // qDebug("playlist"); | 427 | // qDebug("playlist"); |
431 | if ( mediaPlayerState->isUsingPlaylist() ) { | 428 | if ( mediaPlayerState->isUsingPlaylist() ) |
432 | return d->selectedFiles->current(); | 429 | return d->selectedFiles->current(); |
433 | } else if ( d->setDocumentUsed && d->current ) | ||
434 | return d->current; | ||
435 | 430 | ||
436 | assert( false ); | 431 | assert( false ); |
437 | } | 432 | } |
438 | 433 | ||
439 | 434 | ||
440 | bool PlayListWidget::prev() { | 435 | bool PlayListWidget::prev() { |
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index a217c94..db7c979 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | |||
@@ -63,13 +63,12 @@ extern MediaPlayerState *mediaPlayerState; | |||
63 | 63 | ||
64 | PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags fl ) | 64 | PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags fl ) |
65 | : QMainWindow( parent, name, fl ) { | 65 | : QMainWindow( parent, name, fl ) { |
66 | 66 | ||
67 | d = new PlayListWidgetPrivate; | 67 | d = new PlayListWidgetPrivate; |
68 | d->setDocumentUsed = FALSE; | 68 | d->setDocumentUsed = FALSE; |
69 | d->current = NULL; | ||
70 | 69 | ||
71 | setBackgroundMode( PaletteButton ); | 70 | setBackgroundMode( PaletteButton ); |
72 | setToolBarsMovable( FALSE ); | 71 | setToolBarsMovable( FALSE ); |
73 | 72 | ||
74 | // Create Toolbar | 73 | // Create Toolbar |
75 | QPEToolBar *toolbar = new QPEToolBar( this ); | 74 | QPEToolBar *toolbar = new QPEToolBar( this ); |
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h index 6c35771..4eefb93 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h | |||
@@ -61,13 +61,12 @@ class QLabel; | |||
61 | class PlayListWidgetPrivate { | 61 | class PlayListWidgetPrivate { |
62 | public: | 62 | public: |
63 | QToolButton *tbPlay, *tbFull, *tbLoop, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; | 63 | QToolButton *tbPlay, *tbFull, *tbLoop, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; |
64 | QFrame *playListFrame; | 64 | QFrame *playListFrame; |
65 | PlayListSelection *selectedFiles; | 65 | PlayListSelection *selectedFiles; |
66 | bool setDocumentUsed; | 66 | bool setDocumentUsed; |
67 | DocLnk *current; | ||
68 | }; | 67 | }; |
69 | 68 | ||
70 | 69 | ||
71 | class ToolButton : public QToolButton { | 70 | class ToolButton : public QToolButton { |
72 | public: | 71 | public: |
73 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) | 72 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) |