[Xfce4-commits] [apps/parole] 01/01: Use playlist extensions instead of mimetypes

noreply at xfce.org noreply at xfce.org
Tue Jun 24 12:47:47 CEST 2014


This is an automated email from the git hooks/post-receive script.

bluesabre pushed a commit to branch master
in repository apps/parole.

commit d4a28b5e1cbe356bdc0eb30b147badad24a5059b
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Tue Jun 24 06:47:40 2014 -0400

    Use playlist extensions instead of mimetypes
---
 src/misc/parole-filters.c |   25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/src/misc/parole-filters.c b/src/misc/parole-filters.c
index cc56aa4..f273fc8 100644
--- a/src/misc/parole-filters.c
+++ b/src/misc/parole-filters.c
@@ -35,13 +35,12 @@
 #include "parole-pl-parser.h"
 #include "data/mime/parole-mime-types.h"
 
-static char *playlist_mime_types[] = {
-    "audio/x-mpegurl",
-    "audio/playlist",
-    "audio/x-scpls",
-    "audio/x-ms-asx",
-    "application/xml",
-    "application/xspf+xml",
+static char *playlist_file_extensions[] = {
+    "*.asx",
+    "*.m3u",
+    "*.pls",
+    "*.wax",
+    "*.xspf"
 };
 
 /**
@@ -162,8 +161,8 @@ GtkFileFilter *parole_get_supported_files_filter (void)
     
     gtk_file_filter_set_name (filter, _("All supported files"));
     
-    for ( i = 0; i < G_N_ELEMENTS (playlist_mime_types); i++)
-        gtk_file_filter_add_mime_type (filter, playlist_mime_types[i]);
+    for ( i = 0; i < G_N_ELEMENTS (playlist_file_extensions); i++)
+        gtk_file_filter_add_pattern (filter, playlist_file_extensions[i]);
     
     return filter;
     
@@ -178,8 +177,8 @@ GtkRecentFilter *parole_get_supported_recent_files_filter (void)
     
     gtk_recent_filter_set_name (filter, _("All supported files"));
     
-    for ( i = 0; i < G_N_ELEMENTS (playlist_mime_types); i++)
-        gtk_recent_filter_add_mime_type (filter, playlist_mime_types[i]);
+    for ( i = 0; i < G_N_ELEMENTS (playlist_file_extensions); i++)
+        gtk_recent_filter_add_pattern (filter, playlist_file_extensions[i]);
     
     return filter;
     
@@ -205,8 +204,8 @@ GtkFileFilter   *parole_get_supported_playlist_filter   (void)
     
     gtk_file_filter_set_name (filter, _("Playlist files"));
     
-    for ( i = 0; i < G_N_ELEMENTS (playlist_mime_types); i++)
-        gtk_file_filter_add_mime_type (filter, playlist_mime_types[i]);
+    for ( i = 0; i < G_N_ELEMENTS (playlist_file_extensions); i++)
+        gtk_file_filter_add_pattern (filter, playlist_file_extensions[i]);
     
     return filter;
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list