author | simon <simon> | 2002-12-02 16:47:13 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 16:47:13 (UTC) |
commit | 0b30001a6e9aef6de72577ba3a4957eeb0febf54 (patch) (unidiff) | |
tree | faa9f4c0970c64520507ed48e8eb25008927e05a | |
parent | cb03905d1be2f8b98f770201bc4cb98f75c80c1d (diff) | |
download | opie-0b30001a6e9aef6de72577ba3a4957eeb0febf54.zip opie-0b30001a6e9aef6de72577ba3a4957eeb0febf54.tar.gz opie-0b30001a6e9aef6de72577ba3a4957eeb0febf54.tar.bz2 |
- removed unused (and uninitialized) FileSelector *PlayListWidgetPrivate::files
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.h | 1 |
2 files changed, 3 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index b04fe8d..55b66ab 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -409,53 +409,52 @@ void PlayListWidget::setDocument( const QString& fileref ) { | |||
409 | readPls( DocLnk( fileref).file() ); | 409 | readPls( DocLnk( fileref).file() ); |
410 | } else { | 410 | } else { |
411 | clearList(); | 411 | clearList(); |
412 | addToSelection( DocLnk( fileref ) ); | 412 | addToSelection( DocLnk( fileref ) ); |
413 | writeCurrentM3u(); | 413 | writeCurrentM3u(); |
414 | 414 | ||
415 | d->setDocumentUsed = TRUE; | 415 | d->setDocumentUsed = TRUE; |
416 | mediaPlayerState->setPlaying( FALSE ); | 416 | mediaPlayerState->setPlaying( FALSE ); |
417 | mediaPlayerState->setPlaying( TRUE ); | 417 | mediaPlayerState->setPlaying( TRUE ); |
418 | } | 418 | } |
419 | } | 419 | } |
420 | 420 | ||
421 | 421 | ||
422 | void PlayListWidget::useSelectedDocument() { | 422 | void PlayListWidget::useSelectedDocument() { |
423 | d->setDocumentUsed = FALSE; | 423 | d->setDocumentUsed = FALSE; |
424 | } | 424 | } |
425 | 425 | ||
426 | 426 | ||
427 | const DocLnk *PlayListWidget::current() const { // this is fugly | 427 | const DocLnk *PlayListWidget::current() const { // this is fugly |
428 | assert( currentTab() == CurrentPlayList ); | 428 | assert( currentTab() == CurrentPlayList ); |
429 | 429 | ||
430 | // qDebug("playlist"); | 430 | // qDebug("playlist"); |
431 | if ( mediaPlayerState->isUsingPlaylist() ) { | 431 | if ( mediaPlayerState->isUsingPlaylist() ) { |
432 | return d->selectedFiles->current(); | 432 | return d->selectedFiles->current(); |
433 | } else if ( d->setDocumentUsed && d->current ) { | 433 | } else if ( d->setDocumentUsed && d->current ) |
434 | return d->current; | 434 | return d->current; |
435 | } else { | 435 | |
436 | return &(d->files->selectedDocument()); | 436 | assert( false ); |
437 | } | ||
438 | } | 437 | } |
439 | 438 | ||
440 | 439 | ||
441 | bool PlayListWidget::prev() { | 440 | bool PlayListWidget::prev() { |
442 | if ( mediaPlayerState->isUsingPlaylist() ) { | 441 | if ( mediaPlayerState->isUsingPlaylist() ) { |
443 | if ( mediaPlayerState->isShuffled() ) { | 442 | if ( mediaPlayerState->isShuffled() ) { |
444 | const DocLnk *cur = current(); | 443 | const DocLnk *cur = current(); |
445 | int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0)); | 444 | int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0)); |
446 | for ( int i = 0; i < j; i++ ) { | 445 | for ( int i = 0; i < j; i++ ) { |
447 | if ( !d->selectedFiles->next() ) | 446 | if ( !d->selectedFiles->next() ) |
448 | d->selectedFiles->first(); | 447 | d->selectedFiles->first(); |
449 | } | 448 | } |
450 | if ( cur == current() ) | 449 | if ( cur == current() ) |
451 | if ( !d->selectedFiles->next() ) { | 450 | if ( !d->selectedFiles->next() ) { |
452 | d->selectedFiles->first(); | 451 | d->selectedFiles->first(); |
453 | } | 452 | } |
454 | return TRUE; | 453 | return TRUE; |
455 | } else { | 454 | } else { |
456 | if ( !d->selectedFiles->prev() ) { | 455 | if ( !d->selectedFiles->prev() ) { |
457 | if ( mediaPlayerState->isLooping() ) { | 456 | if ( mediaPlayerState->isLooping() ) { |
458 | return d->selectedFiles->last(); | 457 | return d->selectedFiles->last(); |
459 | } else { | 458 | } else { |
460 | return FALSE; | 459 | return FALSE; |
461 | } | 460 | } |
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h index 61fd40d..6c35771 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h | |||
@@ -41,49 +41,48 @@ | |||
41 | 41 | ||
42 | #include <qtabwidget.h> | 42 | #include <qtabwidget.h> |
43 | #include <qpe/fileselector.h> | 43 | #include <qpe/fileselector.h> |
44 | #include <qpushbutton.h> | 44 | #include <qpushbutton.h> |
45 | #include <qpopupmenu.h> | 45 | #include <qpopupmenu.h> |
46 | #include <qaction.h> | 46 | #include <qaction.h> |
47 | #include <qslider.h> | 47 | #include <qslider.h> |
48 | #include <qlcdnumber.h> | 48 | #include <qlcdnumber.h> |
49 | 49 | ||
50 | class PlayListWidgetPrivate; | 50 | class PlayListWidgetPrivate; |
51 | class PlayListSelection; | 51 | class PlayListSelection; |
52 | 52 | ||
53 | class Config; | 53 | class Config; |
54 | class QPEToolBar; | 54 | class QPEToolBar; |
55 | class QListViewItem; | 55 | class QListViewItem; |
56 | class QListView; | 56 | class QListView; |
57 | class QPoint; | 57 | class QPoint; |
58 | class QAction; | 58 | class QAction; |
59 | class QLabel; | 59 | class QLabel; |
60 | 60 | ||
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 | FileSelector *files; | ||
66 | PlayListSelection *selectedFiles; | 65 | PlayListSelection *selectedFiles; |
67 | bool setDocumentUsed; | 66 | bool setDocumentUsed; |
68 | DocLnk *current; | 67 | DocLnk *current; |
69 | }; | 68 | }; |
70 | 69 | ||
71 | 70 | ||
72 | class ToolButton : public QToolButton { | 71 | class ToolButton : public QToolButton { |
73 | public: | 72 | public: |
74 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) | 73 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) |
75 | : QToolButton( parent, name ) { | 74 | : QToolButton( parent, name ) { |
76 | setTextLabel( name ); | 75 | setTextLabel( name ); |
77 | setPixmap( Resource::loadPixmap( icon ) ); | 76 | setPixmap( Resource::loadPixmap( icon ) ); |
78 | setAutoRaise( TRUE ); | 77 | setAutoRaise( TRUE ); |
79 | setFocusPolicy( QWidget::NoFocus ); | 78 | setFocusPolicy( QWidget::NoFocus ); |
80 | setToggleButton( t ); | 79 | setToggleButton( t ); |
81 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); | 80 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); |
82 | QPEMenuToolFocusManager::manager()->addWidget( this ); | 81 | QPEMenuToolFocusManager::manager()->addWidget( this ); |
83 | } | 82 | } |
84 | }; | 83 | }; |
85 | 84 | ||
86 | 85 | ||
87 | class MenuItem : public QAction { | 86 | class MenuItem : public QAction { |
88 | 87 | ||
89 | public: | 88 | public: |