[totem] data: Separate the support URI schemes to another file



commit 96601954b736c31a9daa83acac777ea6946d4182
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Dec 1 18:09:24 2010 +0000

    data: Separate the support URI schemes to another file
    
    So that we can use it in scripts.

 data/Makefile.am          |    3 ++-
 data/desktop.sh           |   12 +++++++-----
 data/uri-schemes-list.txt |    9 +++++++++
 3 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 74966be..0e3c2c4 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -57,7 +57,7 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 totem.desktop.in: totem.desktop.in.in mime-type-list.txt desktop.sh
 	$(AM_V_GEN) cat totem.desktop.in.in | sed 's,@FULL_LIBEXECDIR@,$(FULL_LIBEXECDIR),' > $@ &&\
-	$(SHELL) $(srcdir)/desktop.sh $(srcdir)/mime-type-list.txt >> $@
+	$(SHELL) $(srcdir)/desktop.sh $(srcdir)/mime-type-list.txt $(srcdir)/uri-schemes-list.txt >> $@
 
 EXTRA_DIST += desktop.sh
 CLEANFILES += \
@@ -74,6 +74,7 @@ nautilus-audio-mime-types.h: mime-type-include.sh mime-type-list.txt mime-functi
 EXTRA_DIST += \
 	mime-type-include.sh	\
 	mime-type-list.txt	\
+	uri-schemes-list.txt	\
 	mime-functions.sh
 CLEANFILES += \
 	totem-mime-types.h		\
diff --git a/data/desktop.sh b/data/desktop.sh
index e168c8f..925f607 100755
--- a/data/desktop.sh
+++ b/data/desktop.sh
@@ -4,17 +4,19 @@ echo_mime () {
 	printf "$i;";
 }
 
+echo_handler () {
+	printf "x-scheme-handler/$i;";
+}
+
 MIMETYPES=`grep -v ^# $1`
 printf MimeType=;
 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;"
+MIMETYPES=`grep -v ^# $2`
+for i in $MIMETYPES ; do
+	echo_handler;
 done
 
 echo ""
diff --git a/data/uri-schemes-list.txt b/data/uri-schemes-list.txt
new file mode 100644
index 0000000..68ec833
--- /dev/null
+++ b/data/uri-schemes-list.txt
@@ -0,0 +1,9 @@
+pnm
+mms
+net
+rtp
+rtsp
+mmsh
+uvox
+icy
+icyx



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