[totem] Register totem thumbnailer



commit 0bac1fe06a00ae1d1d01e814b039c9dbde356479
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Thu Dec 30 13:59:14 2010 +0100

    Register totem thumbnailer
    
    This was removed in commit 9b403af7a43fe953dd6237f69a378086bd05d087 when
    migrating to GSettings. This is a new version that doesn't use GConf.
    Closes: bgo#638346.

 data/Makefile.am          |   16 ++++++++++++++++
 data/thumbnailer.sh       |   21 +++++++++++++++++++++
 data/totem.thumbnailer.in |    3 +++
 3 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 068a839..a4dc0d7 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -65,6 +65,22 @@ CLEANFILES += \
 	$(desktop_in_files)	\
 	$(desktop_DATA)
 
+# Thumbnailer
+thumbnailerdir = $(datadir)/thumbnailers
+thumbnailer_in_files = totem.thumbnailer.in
+thumbnailer_DATA = $(thumbnailer_in_files:.thumbnailer.in=.thumbnailer)
+
+totem.thumbnailer: $(thumbnailer_in_files) mime-type-list.txt thumbnailer.sh
+	$(AM_V_GEN)sed -e "s|\ BINDIR\@|$(bindir)|" $< > $@ &&\
+	$(SHELL) $(srcdir)/thumbnailer.sh $(srcdir)/mime-type-list.txt >> $@
+
+EXTRA_DIST += \
+	$(thumbnailer_in_files) \
+	thumbnailer.sh
+
+CLEANFILES += \
+	$(thumbnailer_DATA)
+
 # Content type handling
 nodist_noinst_HEADERS = totem-mime-types.h nautilus-audio-mime-types.h
 totem-mime-types.h: mime-type-include.sh mime-type-list.txt mime-functions.sh
diff --git a/data/thumbnailer.sh b/data/thumbnailer.sh
new file mode 100755
index 0000000..30b64a2
--- /dev/null
+++ b/data/thumbnailer.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+. `dirname $0`/mime-functions.sh
+
+echo_mime () {
+	printf "$i;";
+}
+
+printf MimeType=;
+
+get_video_mimetypes $1;
+for i in $MIMETYPES ; do
+	echo_mime;
+done
+
+get_audio_mimetypes $1;
+for i in $MIMETYPES ; do
+	echo_mime;
+done
+
+echo ""
diff --git a/data/totem.thumbnailer.in b/data/totem.thumbnailer.in
new file mode 100644
index 0000000..45be6e2
--- /dev/null
+++ b/data/totem.thumbnailer.in
@@ -0,0 +1,3 @@
+[Thumbnailer Entry]
+TryExec= BINDIR@/totem-video-thumbnailer
+Exec= BINDIR@/totem-video-thumbnailer -s %s %u %o



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