← Back to team overview

gnome-split-team team mailing list archive

[Branch ~respawneral/gnome-split/mainline] Rev 239: MIME type association

 

------------------------------------------------------------
revno: 239
committer: Guillaume Mazoyer <respawneral@xxxxxxxxx>
branch nick: gnome-split
timestamp: Sat 2010-11-06 17:00:20 +0100
message:
  MIME type association
  
  Add mime-types to the mime-type database. In this
  way, GNOME Split will be able to be launched
  when opening a chunk.
modified:
  Makefile
  configure


--
lp:gnome-split
https://code.launchpad.net/~respawneral/gnome-split/mainline

Your team GNOME Split developers is subscribed to branch lp:gnome-split.
To unsubscribe from this branch go to https://code.launchpad.net/~respawneral/gnome-split/mainline/+edit-subscription
=== modified file 'Makefile'
--- Makefile	2010-07-08 15:21:25 +0000
+++ Makefile	2010-11-06 16:00:20 +0000
@@ -78,6 +78,7 @@
 	 	tmp/stamp/install-pixmaps \
 	 	tmp/stamp/install-translations \
 		$(DESTDIR)$(PREFIX)/share/applications/gnome-split.desktop \
+		$(DESTDIR)$(PREFIX)/share/mime/packages/gnome-split.xml \
 		$(DESTDIR)$(PREFIX)/bin/gnome-split
 
 $(DESTDIR)$(PREFIX):
@@ -109,6 +110,12 @@
 	@/bin/echo -e "INSTALL\t$@"
 	cp -f tmp/launcher/gnome-split.desktop $@
 
+$(DESTDIR)$(PREFIX)/share/mime/packages/gnome-split.xml: \
+		$(DESTDIR)$(PREFIX)/share/mime/packages \
+		tmp/launcher/gnome-split.xml
+	@/bin/echo -e "INSTALL\t$@"
+	cp -f tmp/launcher/gnome-split.xml $@
+
 tmp/gnome-split.jar: tmp/stamp/compile
 	@/bin/echo -e "$(JAR_CMD)\t$@"
 	$(JAR) -cf tmp/gnome-split.jar -C tmp/classes .
@@ -154,6 +161,8 @@
 	rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/gnome-split.png
 	@/bin/echo -e "RM\t$(DESTDIR)$(PREFIX)/share/applications/gnome-split.desktop"
 	rm -f $(DESTDIR)$(PREFIX)/share/applications/gnome-split.desktop
+	@/bin/echo -e "RM\t$(DESTDIR)$(PREFIX)/share/mime/packages/gnome-split.xml"
+	rm -f $(DESTDIR)$(PREFIX)/share/mime/packages/gnome-split.xml
 	@/bin/echo -e "RM\t$(DESTDIR)$(PREFIX)/bin/gnome-split"
 	rm -f $(DESTDIR)$(PREFIX)/bin/gnome-split
 	@/bin/echo -e "RM\t$(DESTDIR)$(JARDIR)/gnome-split-$(VERSION).jar"

=== modified file 'configure'
--- configure	2010-09-08 22:17:00 +0000
+++ configure	2010-11-06 16:00:20 +0000
@@ -1538,5 +1538,34 @@
 
 close DESKTOP;
 
+open MIMETYPE, ">tmp/launcher/gnome-split.xml";
+
+print MIMETYPE <<HERE;
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+  <mime-type type="application/x-extension-xtm">
+    <comment>Xtremsplit file</comment>
+    <glob pattern="*.xtm"/>
+  </mime-type>
+  <mime-type type="application/x-extension-gsp">
+    <comment>GNOME Split file</comment>
+    <glob pattern="*.gsp"/>
+  </mime-type>
+  <mime-type type="application/x-extension-yct">
+    <comment>YoyoCut file</comment>
+    <glob pattern="*.yct"/>
+  </mime-type>
+  <mime-type type="application/x-extension-kk">
+    <comment>KFK file</comment>
+    <glob pattern="*.kk*"/>
+  </mime-type>
+  <mime-type type="application/x-generic-chunk">
+    <comment>First chunk of a split file</comment>
+    <glob pattern="*.000"/>
+    <glob pattern="*.001"/>
+  </mime-type>
+</mime-info>
+HERE
+
 output "ok\n";
 output "\n";