Added playlist extensions to combobox in "file open" dialog.
This commit is contained in:
parent
571625a032
commit
ac53f70488
@ -217,6 +217,10 @@
|
|||||||
<source>All supported types</source>
|
<source>All supported types</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Playlists</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -221,6 +221,10 @@
|
|||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation>Alle Dateien</translation>
|
<translation>Alle Dateien</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Playlists</source>
|
||||||
|
<translation>Wiedergabelisten</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>DropBox</name>
|
<name>DropBox</name>
|
||||||
|
@ -222,6 +222,10 @@
|
|||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation>Todos los archivos</translation>
|
<translation>Todos los archivos</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Playlists</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>DropBox</name>
|
<name>DropBox</name>
|
||||||
|
@ -222,6 +222,10 @@
|
|||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation>Tous les fichiers</translation>
|
<translation>Tous les fichiers</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Playlists</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>DropBox</name>
|
<name>DropBox</name>
|
||||||
|
@ -221,6 +221,10 @@
|
|||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation>Tutti i files</translation>
|
<translation>Tutti i files</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Playlists</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>DropBox</name>
|
<name>DropBox</name>
|
||||||
|
Binary file not shown.
@ -40,6 +40,8 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
|
|
||||||
|
static const char *g_playlistExt = "*.m3u *.m3u8 *.pls *.asx *.wpl";
|
||||||
|
|
||||||
#define PROBE_DECODER(DEC) if(DEC::isDecoderAvailable() && DEC::isFormatSupported(containerType, containerProfile, formatType, formatProfile, formatVersion)) { return new DEC(); }
|
#define PROBE_DECODER(DEC) if(DEC::isDecoderAvailable() && DEC::isFormatSupported(containerType, containerProfile, formatType, formatProfile, formatVersion)) { return new DEC(); }
|
||||||
#define GET_FILETYPES(DEC) (DEC::isDecoderAvailable() ? DEC::supportedTypes() : QStringList())
|
#define GET_FILETYPES(DEC) (DEC::isDecoderAvailable() ? DEC::supportedTypes() : QStringList())
|
||||||
|
|
||||||
@ -83,6 +85,7 @@ QStringList DecoderRegistry::getSupportedTypes(void)
|
|||||||
types << GET_FILETYPES(ADPCMDecoder);
|
types << GET_FILETYPES(ADPCMDecoder);
|
||||||
|
|
||||||
QStringList extensions;
|
QStringList extensions;
|
||||||
|
extensions << QString(g_playlistExt).split(" ", QString::SkipEmptyParts);
|
||||||
QRegExp regExp("\\((.+)\\)", Qt::CaseInsensitive);
|
QRegExp regExp("\\((.+)\\)", Qt::CaseInsensitive);
|
||||||
|
|
||||||
for(int i = 0; i < types.count(); i++)
|
for(int i = 0; i < types.count(); i++)
|
||||||
@ -92,7 +95,7 @@ QStringList DecoderRegistry::getSupportedTypes(void)
|
|||||||
extensions << regExp.cap(1).split(" ", QString::SkipEmptyParts);
|
extensions << regExp.cap(1).split(" ", QString::SkipEmptyParts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!extensions.empty())
|
if(!extensions.empty())
|
||||||
{
|
{
|
||||||
extensions.removeDuplicates();
|
extensions.removeDuplicates();
|
||||||
@ -100,6 +103,8 @@ QStringList DecoderRegistry::getSupportedTypes(void)
|
|||||||
types.prepend(QString("%1 (%2)").arg(tr("All supported types"), extensions.join(" ")));
|
types.prepend(QString("%1 (%2)").arg(tr("All supported types"), extensions.join(" ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
types << QString("%1 (%2)").arg(tr("Playlists"), g_playlistExt);
|
||||||
types << QString("%1 (*.*)").arg(tr("All files"));
|
types << QString("%1 (*.*)").arg(tr("All files"));
|
||||||
|
|
||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user