[Xfce4-commits] <parole:0.5> Actually use the media-filters provided by Parole (really fixes Bug #10434) Also add new filters: audio, video, playlist
Simon Steinbeiss
noreply at xfce.org
Mon Dec 2 12:36:03 CET 2013
Updating branch refs/heads/0.5
to 8cfb851c964f10089ce3e3adaa921e1589693713 (commit)
from 2540493620d3750da06e557e97ba166dd9be62a7 (commit)
commit 8cfb851c964f10089ce3e3adaa921e1589693713
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Mon Dec 2 12:35:37 2013 +0100
Actually use the media-filters provided by Parole (really fixes Bug #10434)
Also add new filters: audio, video, playlist
src/parole-mediachooser.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/parole-mediachooser.c b/src/parole-mediachooser.c
index 8372f32..474305b 100644
--- a/src/parole-mediachooser.c
+++ b/src/parole-mediachooser.c
@@ -195,7 +195,7 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
GtkWidget *file_chooser;
GtkBuilder *builder;
GtkWidget *recursive;
- GtkFileFilter *filter, *all_files;
+ GtkFileFilter *filter, *audio_filter, *video_filter, *playlist_filter, *all_files;
gboolean scan_recursive;
gboolean replace_playlist;
gboolean play;
@@ -211,12 +211,19 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
file_chooser = GTK_WIDGET (gtk_builder_get_object (builder, "filechooserwidget"));
/* Set filters for the filechooser */
- filter = gtk_file_filter_new();
- gtk_file_filter_set_name( filter, _("Supported files") );
- gtk_file_filter_add_mime_type (GTK_FILE_FILTER (filter), "audio/*");
- gtk_file_filter_add_mime_type (GTK_FILE_FILTER (filter), "video/*");
+ filter = parole_get_supported_files_filter();
+ gtk_file_filter_add_mime_type (GTK_FILE_FILTER (filter), "application/x-cd-image");
gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(file_chooser), filter );
+ audio_filter = parole_get_supported_audio_filter();
+ gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(file_chooser), audio_filter );
+
+ video_filter = parole_get_supported_video_filter();
+ gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(file_chooser), video_filter );
+
+ playlist_filter = parole_get_supported_playlist_filter();
+ gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(file_chooser), playlist_filter );
+
all_files = gtk_file_filter_new();
gtk_file_filter_set_name( all_files, _("All files") );
gtk_file_filter_add_pattern ( all_files, "*");
More information about the Xfce4-commits
mailing list