OSDN Git Service

Added playlist extensions to combobox in "file open" dialog.
authorlordmulder <mulder2@gmx.de>
Sun, 30 Jan 2011 21:19:53 +0000 (22:19 +0100)
committerlordmulder <mulder2@gmx.de>
Sun, 30 Jan 2011 21:19:53 +0000 (22:19 +0100)
etc/Translation/Blank.ts
etc/Translation/LameXP_DE.ts
etc/Translation/LameXP_ES.ts
etc/Translation/LameXP_FR.ts
etc/Translation/LameXP_IT.ts
res/localization/LameXP_DE.qm
src/Registry_Decoder.cpp

index 92c475a..e37edd2 100644 (file)
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <source>Playlists</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <source>All files</source>
         <translation type="unfinished"></translation>
     </message>
index 976aaea..f0c2c0f 100644 (file)
         <source>All files</source>
         <translation>Alle Dateien</translation>
     </message>
+    <message>
+        <source>Playlists</source>
+        <translation>Wiedergabelisten</translation>
+    </message>
 </context>
 <context>
     <name>DropBox</name>
index 8db357a..4347c69 100644 (file)
         <source>All files</source>
         <translation>Todos los archivos</translation>
     </message>
+    <message>
+        <source>Playlists</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>DropBox</name>
index b4730b6..c1dffd1 100644 (file)
         <source>All files</source>
         <translation>Tous les fichiers</translation>
     </message>
+    <message>
+        <source>Playlists</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>DropBox</name>
index 89767bc..2a76e08 100644 (file)
         <source>All files</source>
         <translation>Tutti i files</translation>
     </message>
+    <message>
+        <source>Playlists</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>DropBox</name>
index 0424a77..685baeb 100644 (file)
Binary files a/res/localization/LameXP_DE.qm and b/res/localization/LameXP_DE.qm differ
index ae70a58..bb08a62 100644 (file)
@@ -40,6 +40,8 @@
 #include <QStringList>
 #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 GET_FILETYPES(DEC) (DEC::isDecoderAvailable() ? DEC::supportedTypes() : QStringList())
 
@@ -83,6 +85,7 @@ QStringList DecoderRegistry::getSupportedTypes(void)
        types << GET_FILETYPES(ADPCMDecoder);
 
        QStringList extensions;
+       extensions << QString(g_playlistExt).split(" ", QString::SkipEmptyParts);
        QRegExp regExp("\\((.+)\\)", Qt::CaseInsensitive);
 
        for(int i = 0; i < types.count(); i++)
@@ -92,7 +95,7 @@ QStringList DecoderRegistry::getSupportedTypes(void)
                        extensions << regExp.cap(1).split(" ", QString::SkipEmptyParts);
                }
        }
-       
+
        if(!extensions.empty())
        {
                extensions.removeDuplicates();
@@ -100,6 +103,8 @@ QStringList DecoderRegistry::getSupportedTypes(void)
                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"));
+
        return types;
 }