beagle r4378 - trunk/beagle/Filters
- From: dbera svn gnome org
- To: svn-commits-list gnome org
- Subject: beagle r4378 - trunk/beagle/Filters
- Date: Wed, 9 Jan 2008 16:35:41 +0000 (GMT)
Author: dbera
Date: Wed Jan 9 16:35:40 2008
New Revision: 4378
URL: http://svn.gnome.org/viewvc/beagle?rev=4378&view=rev
Log:
Directly read the priorities from the corresponding Filters instead of hardcoding them. Reduce chances of error in the future when priorities are changed.
Modified:
trunk/beagle/Filters/FilterAudio.cs
trunk/beagle/Filters/FilterMPlayerVideo.cs
trunk/beagle/Filters/FilterTotem.cs
Modified: trunk/beagle/Filters/FilterAudio.cs
==============================================================================
--- trunk/beagle/Filters/FilterAudio.cs (original)
+++ trunk/beagle/Filters/FilterAudio.cs Wed Jan 9 16:35:40 2008
@@ -52,7 +52,7 @@
continue;
FilterFlavor flavor = FilterFlavor.NewFromMimeType (type);
- flavor.Priority = 2;// 1 + FilterTotem.Priority;
+ flavor.Priority = 1 + FilterTotem.Priority;
AddSupportedFlavor (flavor);
}
}
Modified: trunk/beagle/Filters/FilterMPlayerVideo.cs
==============================================================================
--- trunk/beagle/Filters/FilterMPlayerVideo.cs (original)
+++ trunk/beagle/Filters/FilterMPlayerVideo.cs Wed Jan 9 16:35:40 2008
@@ -75,13 +75,15 @@
public FilterMPlayerVideo ()
{
- // 1: Priority update after FilterVideo was added
+ // 1: Version update after FilterVideo was added
SetVersion (1);
PreLoad = false;
SetFileType ("video");
}
+ internal const int Priority = 0; // default
+
protected override void RegisterSupportedTypes ()
{
foreach (string s in mime_types)
Modified: trunk/beagle/Filters/FilterTotem.cs
==============================================================================
--- trunk/beagle/Filters/FilterTotem.cs (original)
+++ trunk/beagle/Filters/FilterTotem.cs Wed Jan 9 16:35:40 2008
@@ -48,6 +48,10 @@
SetFileType ("video");
}
+ internal static int Priority {
+ get { return 1 + FilterMPlayerVideo.Priority; }
+ }
+
protected override void RegisterSupportedTypes ()
{
// Get the list of mime-types from the totem-video-indexer
@@ -71,7 +75,7 @@
while ((str = pout.ReadLine ()) != null) {
FilterFlavor flavor = FilterFlavor.NewFromMimeType (str);
- flavor.Priority = 1; // Prefer Totem filter over MPlayer
+ flavor.Priority = Priority;
AddSupportedFlavor (flavor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]