[gnome-subtitles] Fix part of bug #607228 - Video file extensions.



commit 2863dc2b7cd0ec621a0f5a36998b66a74ec8c9b6
Author: Arx Cruz <arxcruz gmail com>
Date:   Mon Dec 20 00:00:30 2010 +0000

    Fix part of bug #607228 - Video file extensions.

 src/GnomeSubtitles/Dialog/VideoOpenDialog.cs |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs b/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs
index ad778f1..ab01d09 100644
--- a/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs
+++ b/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs
@@ -1,6 +1,6 @@
 /*
  * This file is part of Gnome Subtitles.
- * Copyright (C) 2006-2009 Pedro Castro
+ * Copyright (C) 2006-2010 Pedro Castro
  *
  * Gnome Subtitles is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,7 +26,6 @@ namespace GnomeSubtitles.Dialog {
 
 public class VideoOpenDialog : GladeDialog {
 	protected FileChooserDialog dialog = null;
-	private static string[] extensions = { "avi", "mpeg", "mpg", "mp4", "ogm", "divx", "xvid", "mov", "ogg", "mkv" };
 	private Uri chosenUri = null;
 	
 	/* Constant strings */
@@ -52,7 +51,6 @@ public class VideoOpenDialog : GladeDialog {
 	
 	/* Private methods */
 
-	/* TODO check how other players are setting up the filters, possibly using MIME types. */
 	private void SetFilters () {
 
 		/* First filter corresponds to all files */
@@ -64,9 +62,7 @@ public class VideoOpenDialog : GladeDialog {
 		/* Second filter corresponds to video files */
 		FileFilter videoFilesFilter = new FileFilter();
 		videoFilesFilter.Name = Catalog.GetString("All Video Files");
-		foreach (string extension in extensions) {
-			videoFilesFilter.AddPattern("*." + extension);
-		}
+		videoFilesFilter.AddMimeType("video/*");
 		dialog.AddFilter(videoFilesFilter);
 		
 		/* Set active filter */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]