diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-07-09 18:59:51 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-07-09 18:59:51 +0000 |
| commit | 50a04bd30fa5664788d99440f638b73a84a8947b (patch) | |
| tree | cb0651aee518d1f09b6f8b9d170381da636f6619 /src | |
| parent | e85b77286f66edecdc3707065e39b31f2e220f5a (diff) | |
| download | qmmp-50a04bd30fa5664788d99440f638b73a84a8947b.tar.gz qmmp-50a04bd30fa5664788d99440f638b73a84a8947b.tar.bz2 qmmp-50a04bd30fa5664788d99440f638b73a84a8947b.zip | |
fixed translation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@444 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/qmmp/decoder.cpp | 25 | ||||
| -rw-r--r-- | src/qmmp/decoder.h | 2 | ||||
| -rw-r--r-- | src/ui/mainwindow.cpp | 5 |
3 files changed, 10 insertions, 22 deletions
diff --git a/src/qmmp/decoder.cpp b/src/qmmp/decoder.cpp index bd77408a5..952a21db2 100644 --- a/src/qmmp/decoder.cpp +++ b/src/qmmp/decoder.cpp @@ -265,28 +265,13 @@ FileTag *Decoder::createTag(const QString& source) return 0; } -QString Decoder::filter() +QStringList Decoder::filters() { - QString allflt(tr("All Supported Bitstreams (")); - QString flt; - checkFactories(); - DecoderFactory *fact; - foreach(fact, *factories) - { - if (isEnabled(fact)) - { - allflt +=fact->properties().filter.toLower() +" "; - flt += fact->properties().description + " (" + fact->properties().filter + ")"; - flt += ";;"; - } - } - if (!flt.isEmpty ()) - flt = flt.left(flt.size ()-2); - - allflt += ");;"; - - return allflt + flt; + QStringList filters; + foreach(DecoderFactory *fact, *factories) + filters << fact->properties().description + " (" + fact->properties().filter + ")"; + return filters; } QStringList Decoder::nameFilters() diff --git a/src/qmmp/decoder.h b/src/qmmp/decoder.h index 0522679ad..5d413f1b4 100644 --- a/src/qmmp/decoder.h +++ b/src/qmmp/decoder.h @@ -158,7 +158,7 @@ public: static DecoderFactory *findByMime(const QString&); static DecoderFactory *findByContent(QIODevice *); static FileTag *createTag(const QString&); - static QString filter(); + static QStringList filters(); static QStringList nameFilters(); static QList<DecoderFactory*> *decoderFactories(); static QStringList decoderFiles(); diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 6641ccb4b..1c63dba54 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -442,9 +442,12 @@ void MainWindow::addDir() void MainWindow::addFile() { + QStringList filters; + filters << tr("All Supported Bitstreams")+" (" + Decoder::nameFilters().join (" ") +")"; + filters << Decoder::filters(); FileDialog::popup(this, FileDialog::AddDirsFiles, &m_lastDir, m_playListModel, SLOT(addFileList(const QStringList&)), - tr("Select one or more files to open"), Decoder::filter()); + tr("Select one or more files to open"), filters.join(";;")); } void MainWindow::clear() |
