[totem] Add support for URI scheme handlers



commit 74833ef98e515104a5ef10b0e59af0b5a0244ed7
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Oct 5 11:06:41 2010 +0100

    Add support for URI scheme handlers

 data/desktop.sh           |    7 +++++++
 data/mime-functions.sh    |    4 ++--
 data/mime-type-include.sh |    2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/data/desktop.sh b/data/desktop.sh
index 4c47664..2bb4693 100755
--- a/data/desktop.sh
+++ b/data/desktop.sh
@@ -10,4 +10,11 @@ for i in $MIMETYPES ; do
 	echo_mime;
 done
 
+# URI scheme handlers
+SCHEMES="pnm mms net rtp rtsp mmsh uvox icy icyx"
+
+for i in $SCHEMES ; do
+	printf "x-scheme-handler/$i";
+done
+
 echo ""
diff --git a/data/mime-functions.sh b/data/mime-functions.sh
index 0ea9c40..370f35b 100644
--- a/data/mime-functions.sh
+++ b/data/mime-functions.sh
@@ -2,13 +2,13 @@
 
 get_audio_mimetypes ()
 {
-	MIMETYPES=`grep -v '^#' $1 | grep "\/" | grep audio | grep -v "audio/x-pn-realaudio" | grep -v "audio/x-scpls" | grep -v "audio/mpegurl" | grep -v "audio/x-mpegurl"`
+	MIMETYPES=`grep -v '^#' $1 | grep "\/" | grep audio | grep -v "audio/x-pn-realaudio" | grep -v "audio/x-scpls" | grep -v "audio/mpegurl" | grep -v "audio/x-mpegurl" | grep -v x-scheme-handler/`
 	MIMETYPES="$MIMETYPES application/x-flac"
 }
 
 get_video_mimetypes ()
 {
-	MIMETYPES=`grep -v '^#' $1 | grep -v x-content/ | grep -v audio | grep -v "application/x-flac" | grep -v "text/google-video-pointer" | grep -v "application/x-quicktime-media-link" | grep -v "application/smil" | grep -v "application/smil+xml" | grep -v "application/x-smil" | grep -v "application/xspf+xml"`
+	MIMETYPES=`grep -v '^#' $1 | grep -v x-content/ | grep -v audio | grep -v "application/x-flac" | grep -v "text/google-video-pointer" | grep -v "application/x-quicktime-media-link" | grep -v "application/smil" | grep -v "application/smil+xml" | grep -v "application/x-smil" | grep -v "application/xspf+xml" | grep -v x-scheme-handler/`
 	MIMETYPES="$MIMETYPES audio/x-pn-realaudio"
 }
 
diff --git a/data/mime-type-include.sh b/data/mime-type-include.sh
index 9c269b1..3560839 100755
--- a/data/mime-type-include.sh
+++ b/data/mime-type-include.sh
@@ -22,7 +22,7 @@ if [ x"$1" = "x--nautilus" ] ; then
 	exit 0
 fi
 
-MIMETYPES=`grep -v '^#' $1 | grep -v x-content/`
+MIMETYPES=`grep -v '^#' $1 | grep -v x-content/ | grep -v x-scheme-handler/`
 
 echo "/* generated with mime-types-include.sh, don't edit */"
 echo "const char *mime_types[] = {"



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