author | simon <simon> | 2002-12-02 16:47:13 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 16:47:13 (UTC) |
commit | 0b30001a6e9aef6de72577ba3a4957eeb0febf54 (patch) (side-by-side diff) | |
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 @@ -385,101 +385,100 @@ void PlayListWidget::addAllVideoToList() { */ tabWidget->setCurrentPage(0); writeCurrentM3u(); d->selectedFiles->first(); } void PlayListWidget::setDocument( const QString& fileref ) { // qDebug( "<<<<<<<<set document>>>>>>>>>> "+fileref ); fromSetDocument = TRUE; if ( fileref.isNull() ) { QMessageBox::warning( this, tr( "Invalid File" ), tr( "There was a problem in getting the file." ) ); return; } clearList(); if( fileref.find( "m3u", 0, TRUE) != -1 ) { //is m3u readm3u( fileref ); } else if( DocLnk( fileref).file().find( "m3u", 0, TRUE) != -1 ) { readm3u( DocLnk( fileref).file() ); } else if( fileref.find( "pls", 0, TRUE) != -1 ) { //is pls readPls( fileref ); } else if( DocLnk( fileref).file().find( "pls", 0, TRUE) != -1 ) { readPls( DocLnk( fileref).file() ); } else { clearList(); addToSelection( DocLnk( fileref ) ); writeCurrentM3u(); d->setDocumentUsed = TRUE; mediaPlayerState->setPlaying( FALSE ); mediaPlayerState->setPlaying( TRUE ); } } void PlayListWidget::useSelectedDocument() { d->setDocumentUsed = FALSE; } const DocLnk *PlayListWidget::current() const { // this is fugly assert( currentTab() == CurrentPlayList ); // qDebug("playlist"); if ( mediaPlayerState->isUsingPlaylist() ) { return d->selectedFiles->current(); - } else if ( d->setDocumentUsed && d->current ) { + } else if ( d->setDocumentUsed && d->current ) return d->current; - } else { - return &(d->files->selectedDocument()); - } + + assert( false ); } bool PlayListWidget::prev() { if ( mediaPlayerState->isUsingPlaylist() ) { if ( mediaPlayerState->isShuffled() ) { const DocLnk *cur = current(); int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0)); for ( int i = 0; i < j; i++ ) { if ( !d->selectedFiles->next() ) d->selectedFiles->first(); } if ( cur == current() ) if ( !d->selectedFiles->next() ) { d->selectedFiles->first(); } return TRUE; } else { if ( !d->selectedFiles->prev() ) { if ( mediaPlayerState->isLooping() ) { return d->selectedFiles->last(); } else { return FALSE; } } return TRUE; } } else { return mediaPlayerState->isLooping(); } } bool PlayListWidget::next() { //qDebug("<<<<<<<<<<<<next()"); if ( mediaPlayerState->isUsingPlaylist() ) { if ( mediaPlayerState->isShuffled() ) { return prev(); } else { if ( !d->selectedFiles->next() ) { if ( mediaPlayerState->isLooping() ) { return d->selectedFiles->first(); } else { return FALSE; } } return TRUE; } 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 @@ -17,97 +17,96 @@ .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef PLAY_LIST_WIDGET_GUI_H #define PLAY_LIST_WIDGET_GUI_H #include <qmainwindow.h> #include <qpe/applnk.h> #include <qpe/resource.h> #include <qpe/qpemenubar.h> #include <qtabwidget.h> #include <qpe/fileselector.h> #include <qpushbutton.h> #include <qpopupmenu.h> #include <qaction.h> #include <qslider.h> #include <qlcdnumber.h> class PlayListWidgetPrivate; class PlayListSelection; class Config; class QPEToolBar; class QListViewItem; class QListView; class QPoint; class QAction; class QLabel; class PlayListWidgetPrivate { public: QToolButton *tbPlay, *tbFull, *tbLoop, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; QFrame *playListFrame; - FileSelector *files; PlayListSelection *selectedFiles; bool setDocumentUsed; DocLnk *current; }; class ToolButton : public QToolButton { public: ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) : QToolButton( parent, name ) { setTextLabel( name ); setPixmap( Resource::loadPixmap( icon ) ); setAutoRaise( TRUE ); setFocusPolicy( QWidget::NoFocus ); setToggleButton( t ); connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); QPEMenuToolFocusManager::manager()->addWidget( this ); } }; class MenuItem : public QAction { public: MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot ) : QAction( text, QString::null, 0, 0 ) { connect( this, SIGNAL( activated() ), handler, slot ); addTo( parent ); } }; class PlayListWidgetGui : public QMainWindow { Q_OBJECT public: PlayListWidgetGui( QWidget* parent=0, const char* name=0, WFlags fl=0 ); ~PlayListWidgetGui(); protected: QTabWidget * tabWidget; QListView *audioView, *videoView, *playlistView; QLabel *libString; QPopupMenu *pmView ; QPopupMenu *gammaMenu; QSlider *gammaSlider; QLCDNumber *gammaLCD; bool fromSetDocument; bool insanityBool; QString setDocFileRef; |