diff --git a/MainWindow.cpp b/MainWindow.cpp index 0f7351f..ba5af16 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -145,8 +145,8 @@ main (int argc, char **argv) #ifdef Q_OS_MACX /** This is soooo wrong, there must exsist a flag for * static plugins - */ Q_IMPORT_PLUGIN(QJpegPlugin); + */ #endif MainWindow *mw = new MainWindow (NULL); diff --git a/Playlist.cpp b/Playlist.cpp index 50558a0..03ffd1f 100644 --- a/Playlist.cpp +++ b/Playlist.cpp @@ -4,6 +4,7 @@ #include "PlaylistShade.h" #include "PlaylistMenu.h" +#include "FileDialog.h" #include #include @@ -344,20 +345,26 @@ PlaylistWidget::diveDir (const QString &dir) void PlaylistWidget::menuAddDir () { + /* QString dir; dir = QFileDialog::getExistingDirectory (this, "Select files to play", QDir::homePath ()); - diveDir (dir); + */ + + FileDialog fd (this, "playlist_add_dir"); + QString dir = fd.getDirectory (); + if (!dir.isNull ()) + diveDir (dir); } void PlaylistWidget::menuAddFile () { QStringList files; + FileDialog fd (this, "playlist_add_files"); - files = QFileDialog::getOpenFileNames (this, "Select files to play", - QDir::homePath()); + files = fd.getFiles (); for (int i = 0; i < files.count(); i++) { XMMSHandler::getInstance ().playlistAddURL ("file://" + files.value(i)); diff --git a/promoe.pro b/promoe.pro index 2d85d2d..93bc7db 100644 --- a/promoe.pro +++ b/promoe.pro @@ -8,7 +8,7 @@ SOURCES += XmmsQT4.cpp \ Button.cpp \ TextBar.cpp \ NumberDisplay.cpp \ - TimeDisplay.cpp \ + TimeDisplay.cpp \ XMMSHandler.cpp \ SmallNumberDisplay.cpp \ StereoMono.cpp \ @@ -25,6 +25,7 @@ SOURCES += XmmsQT4.cpp \ VolumeSlider.cpp \ ClutterBar.cpp \ Equalizer.cpp \ + FileDialog.cpp HEADERS += XmmsQT4.h \ @@ -54,14 +55,16 @@ HEADERS += XmmsQT4.h \ VolumeSlider.h \ ClutterBar.h \ Equalizer.h \ + FileDialog.h RESOURCES = promoe.qrc macx:RC_FILE = promoe.icns +macx:INCLUDEPATH = /sw/include QT += network -macx:QTPLUGIN += qjpeg +;macx:QTPLUGIN += qjpeg QMAKE_LFLAGS += -L$$[QT_INSTALL_PLUGINS]/imageformats CONFIG += link_pkgconfig