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

Bug#235217: ark: MIME Support



package ark
tags 235217 +patch
thanks

Malcolm Parsons writes:

> The current mime entry for ark to view html files is:

> application/x-tgz; ark -caption "Archiver" %s;test=test "$DISPLAY"
> != ""; priority=7

> When viewing a tar attachment to an email in mutt, it calls:

> ark /tmp/muttGKxtQ9

> Which doesn't work, as ark thinks it is a text file, not an HTML
> file.  If the mime entry is changed to:

> application/x-tgz; ark -caption "Archiver" '%s';
> nametemplate=%s.tgz; test=test "$DISPLAY" != ""; priority=7

> Then mutt calls:

> ark /tmp/mutt.tgz

> and ark then correctly views the file.

Here is a patch which fixes this for all of pkg-kde mime entries:

I'm not committing it, because the entire pkg-kde svn repo seems out
of date.

cheers
domi

Index: kdeutils/debian/kedit.mime
===================================================================
--- kdeutils/debian/kedit.mime	(revision 62)
+++ kdeutils/debian/kedit.mime	(working copy)
@@ -1,15 +1,15 @@
-text/english; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/plain; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-makefile; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-c++hdr; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-c++src; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-chdr; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-csrc; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-java; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-moc; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-pascal; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-tcl; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-tex; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-shellscript; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-c; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
-text/x-c++; kedit  -caption "Text Editor"   %s;test=test "$DISPLAY" != ""; priority=7
+text/english; kedit  -caption "Text Editor"   %s;nametemplate=%s.txt;test=test "$DISPLAY" != ""; priority=7
+text/plain; kedit  -caption "Text Editor"   %s;nametemplate=%s.txt;test=test "$DISPLAY" != ""; priority=7
+text/x-makefile; kedit  -caption "Text Editor"   %s;nametemplate=Makefile.%s;test=test "$DISPLAY" != ""; priority=7
+text/x-c++hdr; kedit  -caption "Text Editor"   %s;nametemplate=%s.hh;test=test "$DISPLAY" != ""; priority=7
+text/x-c++src; kedit  -caption "Text Editor"   %s;nametemplate=%s.cc;test=test "$DISPLAY" != ""; priority=7
+text/x-chdr; kedit  -caption "Text Editor"   %s;nametemplate=%s.h;test=test "$DISPLAY" != ""; priority=7
+text/x-csrc; kedit  -caption "Text Editor"   %s;nametemplate=%s.c;test=test "$DISPLAY" != ""; priority=7
+text/x-java; kedit  -caption "Text Editor"   %s;nametemplate=%s.java;test=test "$DISPLAY" != ""; priority=7
+text/x-moc; kedit  -caption "Text Editor"   %s;nametemplate=%s.moc;test=test "$DISPLAY" != ""; priority=7
+text/x-pascal; kedit  -caption "Text Editor"   %s;nametemplate=%s.pas;test=test "$DISPLAY" != ""; priority=7
+text/x-tcl; kedit  -caption "Text Editor"   %s;nametemplate=%s.tcl;test=test "$DISPLAY" != ""; priority=7
+text/x-tex; kedit  -caption "Text Editor"   %s;nametemplate=%s.tex;test=test "$DISPLAY" != ""; priority=7
+application/x-shellscript; kedit  -caption "Text Editor"   %s;nametemplate=%s.sh;test=test "$DISPLAY" != ""; priority=7
+text/x-c; kedit  -caption "Text Editor"   %s;nametemplate=%s.c;test=test "$DISPLAY" != ""; priority=7
+text/x-c++; kedit  -caption "Text Editor"   %s;nametemplate=%s.cc;test=test "$DISPLAY" != ""; priority=7
Index: kdeutils/debian/ark.mime
===================================================================
--- kdeutils/debian/ark.mime	(revision 62)
+++ kdeutils/debian/ark.mime	(working copy)
@@ -1,13 +1,13 @@
-application/x-gzip; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-lha; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-tar; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-tgz; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-tbz; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-zip; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-bzip; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-tzo; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-lzop; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-rar; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-zoo; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-tarz; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-archive; ark -caption "Archiver"   %s;test=test "$DISPLAY" != ""; priority=7
+application/x-gzip; ark -caption "Archiver"   %s; nametemplate=%s.gz; test=test "$DISPLAY" != ""; priority=7
+application/x-lha; ark -caption "Archiver"   %s; nametemplate=%s.lha; test=test "$DISPLAY" != ""; priority=7
+application/x-tar; ark -caption "Archiver"   %s; nametemplate=%s.tar; test=test "$DISPLAY" != ""; priority=7
+application/x-tgz; ark -caption "Archiver"   %s; nametemplate=%s.tar.gz; test=test "$DISPLAY" != ""; priority=7
+application/x-tbz; ark -caption "Archiver"   %s; nametemplate=%s.tar.bz2; test=test "$DISPLAY" != ""; priority=7
+application/x-zip; ark -caption "Archiver"   %s; nametemplate=%s.zip; test=test "$DISPLAY" != ""; priority=7
+application/x-bzip; ark -caption "Archiver"   %s; nametemplate=%s.bz2; test=test "$DISPLAY" != ""; priority=7
+application/x-tzo; ark -caption "Archiver"   %s; nametemplate=%s.tzo; test=test "$DISPLAY" != ""; priority=7
+application/x-lzop; ark -caption "Archiver"   %s; nametemplate=%s.lzo; test=test "$DISPLAY" != ""; priority=7
+application/x-rar; ark -caption "Archiver"   %s; nametemplate=%s.rar; test=test "$DISPLAY" != ""; priority=7
+application/x-zoo; ark -caption "Archiver"   %s; nametemplate=%s.zoo; test=test "$DISPLAY" != ""; priority=7
+application/x-tarz; ark -caption "Archiver"   %s; nametemplate=%s.tar.Z; test=test "$DISPLAY" != ""; priority=7
+application/x-archive; ark -caption "Archiver"   %s; nametemplate=%s.a; test=test "$DISPLAY" != ""; priority=7
Index: kdeutils/debian/changelog
===================================================================
--- kdeutils/debian/changelog	(revision 62)
+++ kdeutils/debian/changelog	(working copy)
@@ -1,3 +1,10 @@
+kdeutils (4:3.2.1) unstable; urgency=low
+
+  * debian/ark.mime, debian/kedit.mime: Fix the mime handler declaration files to
+    properly use nametemplate's.  Thanks Malcolm Parsons. closes:235217.
+
+ --
+
 kdeutils (4:3.2.0-0pre1v1) experimental; urgency=low
 
   * New upstream release.
Index: kdegraphics/debian/kfax.mime
===================================================================
--- kdegraphics/debian/kfax.mime	(revision 62)
+++ kdegraphics/debian/kfax.mime	(working copy)
@@ -1 +1 @@
-image/fax-g3; kviewshell fax %s -caption "Fax Viewer"   ;test=test "$DISPLAY" != ""; priority=5
+image/fax-g3; kviewshell fax %s -caption "Fax Viewer"   ;nametemplate=%s.g3; test=test "$DISPLAY" != ""; priority=5
Index: kdegraphics/debian/kview.mime
===================================================================
--- kdegraphics/debian/kview.mime	(revision 62)
+++ kdegraphics/debian/kview.mime	(working copy)
@@ -1,9 +1,9 @@
-image/gif; kview   %s;test=test "$DISPLAY" != ""; priority=5
-image/x-xpm; kview   %s;test=test "$DISPLAY" != ""; priority=5
-image/x-xbm; kview   %s;test=test "$DISPLAY" != ""; priority=5
-image/jpeg; kview   %s;test=test "$DISPLAY" != ""; priority=5
-image/bmp; kview   %s;test=test "$DISPLAY" != ""; priority=5
-image/x-ms-bmp; kview  %s;test=test "$DISPLAY" != ""; priority=5
-image/png; kview   %s;test=test "$DISPLAY" != ""; priority=5
-video/x-mng; kview %s;test=test "$DISPLAY" != ""; priority=5
-image/x-jng; kview %s;test=test "$DISPLAY" != ""; priority=5
+image/gif; kview   %s;nametemplate=%s.gif;test=test "$DISPLAY" != ""; priority=5
+image/x-xpm; kview   %s;nametemplate=%s.xpm;test=test "$DISPLAY" != ""; priority=5
+image/x-xbm; kview   %s;nametemplate=%s.xbm;test=test "$DISPLAY" != ""; priority=5
+image/jpeg; kview   %s;nametemplate=%s.jpeg;test=test "$DISPLAY" != ""; priority=5
+image/bmp; kview   %s;nametemplate=%s.bmp;test=test "$DISPLAY" != ""; priority=5
+image/x-ms-bmp; kview  %s;nametemplate=%s.bmp;test=test "$DISPLAY" != ""; priority=5
+image/png; kview   %s;nametemplate=%s.png;test=test "$DISPLAY" != ""; priority=5
+video/x-mng; kview %s;nametemplate=%s.mng;test=test "$DISPLAY" != ""; priority=5
+image/x-jng; kview %s;nametemplate=%s.jng;test=test "$DISPLAY" != ""; priority=5
Index: kdegraphics/debian/kghostview.mime
===================================================================
--- kdegraphics/debian/kghostview.mime	(revision 62)
+++ kdegraphics/debian/kghostview.mime	(working copy)
@@ -1,3 +1,3 @@
-application/pdf; kghostview %s -caption "PS/PDF Viewer"  ;test=test "$DISPLAY" != ""; priority=5
-application/postscript; kghostview %s -caption "PS/PDF Viewer"  ;test=test "$DISPLAY" != ""; priority=5
-image/x-eps; kghostview %s -caption "PS/PDF Viewer"  ;test=test "$DISPLAY" != ""; priority=5
+application/pdf; kghostview %s -caption "PS/PDF Viewer"  ;nametemplate=%s.pdf;test=test "$DISPLAY" != ""; priority=5
+application/postscript; kghostview %s -caption "PS/PDF Viewer"  ;nametemplate=%s.ps;test=test "$DISPLAY" != ""; priority=5
+image/x-eps; kghostview %s -caption "PS/PDF Viewer"  ;nametemplate=%s.eps;test=test "$DISPLAY" != ""; priority=5
Index: kdegraphics/debian/kdvi.mime
===================================================================
--- kdegraphics/debian/kdvi.mime	(revision 62)
+++ kdegraphics/debian/kdvi.mime	(working copy)
@@ -1 +1 @@
-application/x-dvi; kviewshell dvi %s -caption "DVI Viewer"   ;test=test "$DISPLAY" != ""; priority=4
+application/x-dvi; kviewshell dvi %s -caption "DVI Viewer"   ;nametemplate=%s.dvi;test=test "$DISPLAY" != ""; priority=4
Index: kdegraphics/debian/changelog
===================================================================
--- kdegraphics/debian/changelog	(revision 62)
+++ kdegraphics/debian/changelog	(working copy)
@@ -1,3 +1,11 @@
+kdegraphics (4:3.2.1) unstable; urgency=low
+
+  * debian/kfax.mime, debian/kview.mime, debian/kghostview.mime, debian/kdvi.mime: 
+    Fix the mime handler declaration files to properly use nametemplate's.
+    Thanks, Malcolm Parsons.
+
+ --
+
 kdegraphics (4:3.2.0-0pre1v1) experimental; urgency=low
 
   * New upstrem release.
Index: kdeadmin/debian/changelog
===================================================================
--- kdeadmin/debian/changelog	(revision 62)
+++ kdeadmin/debian/changelog	(working copy)
@@ -1,3 +1,10 @@
+kdeadmin (4:3.2.1) unstable; urgency=low
+
+  * debian/kpackage.mime: Fix the mime handler declaration files to
+    properly use nametemplate's.  Thanks Malcolm Parsons.
+
+ --
+
 kdeadmin (4:3.2.0-0pre1v1) experimental; urgency=low
 
   * New upstream release.
Index: kdeadmin/debian/kpackage.mime
===================================================================
--- kdeadmin/debian/kpackage.mime	(revision 62)
+++ kdeadmin/debian/kpackage.mime	(working copy)
@@ -1,2 +1,2 @@
-application/x-rpm; kpackage -caption "Package Manager"   %s;test=test "$DISPLAY" != ""; priority=7
-application/x-debian-package; kpackage -caption "Package Manager"   %s;test=test "$DISPLAY" != ""; priority=7
+application/x-rpm; kpackage -caption "Package Manager"   %s;nametemplate=%s.rpm;test=test "$DISPLAY" != ""; priority=7
+application/x-debian-package; kpackage -caption "Package Manager"   %s;nametemplate=%s.deb;test=test "$DISPLAY" != ""; priority=7
Index: kdemultimedia/debian/noatun.mime
===================================================================
--- kdemultimedia/debian/noatun.mime	(revision 62)
+++ kdemultimedia/debian/noatun.mime	(working copy)
@@ -1,6 +1,6 @@
-audio/mpeg; noatun %s; test=test "$DISPLAY" != "" 
-audio/mpegurl; noatun %s; test=test "$DISPLAY" != "" 
-audio/x-wav; noatun %s; test=test "$DISPLAY" != "" 
-audio/x-mp3; noatun %s; test=test "$DISPLAY" != ""
-audio/x-ogg; noatun %s; test=test "$DISPLAY" != ""
-audio/x-mp2; noatun %s; test=test "$DISPLAY" != ""
+audio/mpeg; noatun %s; nametemplate=%s.mpeg;test=test "$DISPLAY" != "" 
+audio/mpegurl; noatun %s; nametemplate=%s.m3u;test=test "$DISPLAY" != "" 
+audio/x-wav; noatun %s; nametemplate=%s.wav;test=test "$DISPLAY" != "" 
+audio/x-mp3; noatun %s; nametemplate=%s.mp3;test=test "$DISPLAY" != ""
+audio/x-ogg; noatun %s; nametemplate=%s.ogg;test=test "$DISPLAY" != ""
+audio/x-mp2; noatun %s; nametemplate=%s.mp2;test=test "$DISPLAY" != ""
Index: kdemultimedia/debian/changelog
===================================================================
--- kdemultimedia/debian/changelog	(revision 62)
+++ kdemultimedia/debian/changelog	(working copy)
@@ -1,3 +1,10 @@
+kdemultimedia (4:3.2.1) unstable; urgency=low
+
+  * debian/noatun.mime: Fix the mime handler declaration files to
+    properly use nametemplate's.  Thanks Malcolm Parsons.
+
+ --
+
 kdemultimedia (4:3.2.0-0pre1v1) experimental; urgency=low
 
   * New upstream release.

Reply to: