[evince] Fix MIME type lists in desktop files



commit 74fbddb63c94b36f794c6c433421e6d0eaf2ea60
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Wed Jun 25 13:15:21 2014 +0200

    Fix MIME type lists in desktop files
    
    Make sure we always use a ; betweeh mime types and a trailing ; as well
    in desktop and backend files.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732216

 backend/comics/comicsdocument.evince-backend.in.in |    2 +-
 backend/djvu/djvudocument.evince-backend.in.in     |    2 +-
 backend/dvi/dvidocument.evince-backend.in.in       |    2 +-
 backend/pdf/pdfdocument.evince-backend.in.in       |    2 +-
 backend/ps/psdocument.evince-backend.in.in         |    2 +-
 backend/tiff/tiffdocument.evince-backend.in.in     |    2 +-
 backend/xps/xpsdocument.evince-backend.in.in       |    2 +-
 configure.ac                                       |   36 +++++++++++++++++++-
 data/evince-previewer.desktop.in.in                |    2 +-
 data/evince.desktop.in.in                          |    2 +-
 10 files changed, 44 insertions(+), 10 deletions(-)
---
diff --git a/backend/comics/comicsdocument.evince-backend.in.in 
b/backend/comics/comicsdocument.evince-backend.in.in
index ad52df8..d2c23a0 100644
--- a/backend/comics/comicsdocument.evince-backend.in.in
+++ b/backend/comics/comicsdocument.evince-backend.in.in
@@ -1,4 +1,4 @@
 [Evince Backend]
 Module=comicsdocument
 _TypeDescription=Comic Books
-MimeType= COMICS_MIME_TYPES@
+MimeType= COMICS_MIME_TYPES@;
diff --git a/backend/djvu/djvudocument.evince-backend.in.in b/backend/djvu/djvudocument.evince-backend.in.in
index fa1e2f6..c834cf5 100644
--- a/backend/djvu/djvudocument.evince-backend.in.in
+++ b/backend/djvu/djvudocument.evince-backend.in.in
@@ -1,4 +1,4 @@
 [Evince Backend]
 Module=djvudocument
 _TypeDescription=DjVu Documents
-MimeType= DJVU_MIME_TYPES@
+MimeType= DJVU_MIME_TYPES@;
diff --git a/backend/dvi/dvidocument.evince-backend.in.in b/backend/dvi/dvidocument.evince-backend.in.in
index dab8c22..fa7863b 100644
--- a/backend/dvi/dvidocument.evince-backend.in.in
+++ b/backend/dvi/dvidocument.evince-backend.in.in
@@ -1,4 +1,4 @@
 [Evince Backend]
 Module=dvidocument
 _TypeDescription=DVI Documents
-MimeType= DVI_MIME_TYPES@
+MimeType= DVI_MIME_TYPES@;
diff --git a/backend/pdf/pdfdocument.evince-backend.in.in b/backend/pdf/pdfdocument.evince-backend.in.in
index 713023b..e0facb7 100644
--- a/backend/pdf/pdfdocument.evince-backend.in.in
+++ b/backend/pdf/pdfdocument.evince-backend.in.in
@@ -2,5 +2,5 @@
 Module=pdfdocument
 Resident=true
 _TypeDescription=PDF Documents
-MimeType= PDF_MIME_TYPES@
+MimeType= PDF_MIME_TYPES@;
 
diff --git a/backend/ps/psdocument.evince-backend.in.in b/backend/ps/psdocument.evince-backend.in.in
index 5643b15..ea63257 100644
--- a/backend/ps/psdocument.evince-backend.in.in
+++ b/backend/ps/psdocument.evince-backend.in.in
@@ -2,4 +2,4 @@
 Module=psdocument
 Resident=true
 _TypeDescription=PostScript Documents
-MimeType= PS_MIME_TYPES@
+MimeType= PS_MIME_TYPES@;
diff --git a/backend/tiff/tiffdocument.evince-backend.in.in b/backend/tiff/tiffdocument.evince-backend.in.in
index c850200..951571a 100644
--- a/backend/tiff/tiffdocument.evince-backend.in.in
+++ b/backend/tiff/tiffdocument.evince-backend.in.in
@@ -1,4 +1,4 @@
 [Evince Backend]
 Module=tiffdocument
 _TypeDescription=TIFF Documents
-MimeType= TIFF_MIME_TYPES@
+MimeType= TIFF_MIME_TYPES@;
diff --git a/backend/xps/xpsdocument.evince-backend.in.in b/backend/xps/xpsdocument.evince-backend.in.in
index 2feeb2b..cf6abb5 100644
--- a/backend/xps/xpsdocument.evince-backend.in.in
+++ b/backend/xps/xpsdocument.evince-backend.in.in
@@ -2,4 +2,4 @@
 Module=xpsdocument
 Resident=true
 _TypeDescription=XPS Documents
-MimeType= XPS_MIME_TYPES@
+MimeType= XPS_MIME_TYPES@;
diff --git a/configure.ac b/configure.ac
index 0241a3c..2839c6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -652,6 +652,11 @@ dnl =================== Mime types list ========================================
 if test "x$enable_pdf" = "xyes" ; then
         
PDF_MIME_TYPES="application/pdf;application/x-bzpdf;application/x-gzpdf;application/x-xzpdf;application/x-ext-pdf"
         APPDATA_PDF_MIME_TYPES=$(echo "<mimetype>$PDF_MIME_TYPES</mimetype>" | sed -e 's/;/<\/mimetype>\n    
<mimetype>/g')
+        if test -z "$EVINCE_MIME_TYPES"; then
+           EVINCE_MIME_TYPES="${PDF_MIME_TYPES}"
+        else
+           EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES};${PDF_MIME_TYPES}"
+        fi
 fi
 AC_SUBST(PDF_MIME_TYPES)
 AC_SUBST(APPDATA_PDF_MIME_TYPES)
@@ -659,6 +664,11 @@ AM_SUBST_NOTMAKE(APPDATA_PDF_MIME_TYPES)
 if test "x$enable_ps" = "xyes" ; then
         
PS_MIME_TYPES="application/postscript;application/x-bzpostscript;application/x-gzpostscript;image/x-eps;image/x-bzeps;image/x-gzeps;application/x-ext-ps;application/x-ext-eps"
         APPDATA_PS_MIME_TYPES=$(echo "<mimetype>$PS_MIME_TYPES</mimetype>" | sed -e 's/;/<\/mimetype>\n    
<mimetype>/g')
+        if test -z "$EVINCE_MIME_TYPES"; then
+           EVINCE_MIME_TYPES="${PS_MIME_TYPES}"
+        else
+           EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES};${PS_MIME_TYPES}"
+        fi
 fi
 AC_SUBST(PS_MIME_TYPES)
 AC_SUBST(APPDATA_PS_MIME_TYPES)
@@ -666,6 +676,11 @@ AM_SUBST_NOTMAKE(APPDATA_PS_MIME_TYPES)
 if test "x$enable_dvi" = "xyes"; then
         DVI_MIME_TYPES="application/x-dvi;application/x-bzdvi;application/x-gzdvi;application/x-ext-dvi"
         APPDATA_DVI_MIME_TYPES=$(echo "<mimetype>$DVI_MIME_TYPES</mimetype>" | sed -e 's/;/<\/mimetype>\n    
<mimetype>/g')
+        if test -z "$EVINCE_MIME_TYPES"; then
+           EVINCE_MIME_TYPES="${DVI_MIME_TYPES}"
+        else
+           EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES};${DVI_MIME_TYPES}"
+        fi
 fi
 AC_SUBST(DVI_MIME_TYPES)
 AC_SUBST(APPDATA_DVI_MIME_TYPES)
@@ -673,6 +688,11 @@ AM_SUBST_NOTMAKE(APPDATA_DVI_MIME_TYPES)
 if test "x$enable_djvu" = "xyes"; then
         DJVU_MIME_TYPES="image/vnd.djvu;application/x-ext-djv;application/x-ext-djvu"
         APPDATA_DJVU_MIME_TYPES=$(echo "<mimetype>$DJVU_MIME_TYPES</mimetype>" | sed -e 's/;/<\/mimetype>\n  
  <mimetype>/g')
+        if test -z "$EVINCE_MIME_TYPES"; then
+           EVINCE_MIME_TYPES="${DJVU_MIME_TYPES}"
+        else
+           EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES};${DJVU_MIME_TYPES}"
+        fi
 fi
 AC_SUBST(DJVU_MIME_TYPES)
 AC_SUBST(APPDATA_DJVU_MIME_TYPES)
@@ -680,6 +700,11 @@ AM_SUBST_NOTMAKE(APPDATA_DJVU_MIME_TYPES)
 if test "x$enable_tiff" = "xyes"; then
         TIFF_MIME_TYPES="image/tiff"
         APPDATA_TIFF_MIME_TYPES=$(echo "<mimetype>$TIFF_MIME_TYPES</mimetype>" | sed -e 's/;/<\/mimetype>\n  
  <mimetype>/g')
+        if test -z "$EVINCE_MIME_TYPES"; then
+           EVINCE_MIME_TYPES="${TIFF_MIME_TYPES}"
+        else
+           EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES};${TIFF_MIME_TYPES}"
+        fi
 fi
 AC_SUBST(TIFF_MIME_TYPES)
 AC_SUBST(APPDATA_TIFF_MIME_TYPES)
@@ -687,6 +712,11 @@ AM_SUBST_NOTMAKE(APPDATA_TIFF_MIME_TYPES)
 if test "x$enable_comics" = "xyes"; then
         
COMICS_MIME_TYPES="application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;application/x-ext-cbr;application/x-ext-cbz;application/x-ext-cb7;application/x-ext-cbt"
         APPDATA_COMICS_MIME_TYPES=$(echo "<mimetype>$COMICS_MIME_TYPES</mimetype>" | sed -e 
's/;/<\/mimetype>\n    <mimetype>/g')
+        if test -z "$EVINCE_MIME_TYPES"; then
+           EVINCE_MIME_TYPES="${COMICS_MIME_TYPES}"
+        else
+           EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES};${COMICS_MIME_TYPES}"
+        fi
 fi
 AC_SUBST(COMICS_MIME_TYPES)
 AC_SUBST(APPDATA_COMICS_MIME_TYPES)
@@ -694,12 +724,16 @@ AM_SUBST_NOTMAKE(APPDATA_COMICS_MIME_TYPES)
 if test "x$enable_xps" = "xyes"; then
         XPS_MIME_TYPES="application/oxps;application/vnd.ms-xpsdocument"
         APPDATA_XPS_MIME_TYPES=$(echo "<mimetype>$XPS_MIME_TYPES</mimetype>" | sed -e 's/;/<\/mimetype>\n    
<mimetype>/g')
+        if test -z "$EVINCE_MIME_TYPES"; then
+           EVINCE_MIME_TYPES="${XPS_MIME_TYPES}"
+        else
+           EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES};${XPS_MIME_TYPES}"
+        fi
 fi
 AC_SUBST(XPS_MIME_TYPES)
 AC_SUBST(APPDATA_XPS_MIME_TYPES)
 AM_SUBST_NOTMAKE(APPDATA_XPS_MIME_TYPES)
 
-EVINCE_MIME_TYPES="${PDF_MIME_TYPES}${PS_MIME_TYPES}${DVI_MIME_TYPES}${DJVU_MIME_TYPES}${TIFF_MIME_TYPES}${COMICS_MIME_TYPES}${XPS_MIME_TYPES}"
 AC_SUBST(EVINCE_MIME_TYPES)
 
 AC_CHECK_FUNC(localtime_r, AC_DEFINE(HAVE_LOCALTIME_R, 1, [Defines if localtime_r is available on your 
system]))
diff --git a/data/evince-previewer.desktop.in.in b/data/evince-previewer.desktop.in.in
index 259797f..97738b7 100644
--- a/data/evince-previewer.desktop.in.in
+++ b/data/evince-previewer.desktop.in.in
@@ -14,4 +14,4 @@ X-GNOME-Bugzilla-Product=evince
 X-GNOME-Bugzilla-Component=BugBuddyBugs
 X-GNOME-Bugzilla-Version= VERSION@
 Categories=GNOME;GTK;Office;Viewer;Graphics;2DGraphics;VectorGraphics;
-MimeType= EVINCE_MIME_TYPES@
+MimeType= EVINCE_MIME_TYPES@;
diff --git a/data/evince.desktop.in.in b/data/evince.desktop.in.in
index bbca536..c5c0f7d 100644
--- a/data/evince.desktop.in.in
+++ b/data/evince.desktop.in.in
@@ -14,4 +14,4 @@ X-GNOME-Bugzilla-Product=evince
 X-GNOME-Bugzilla-Component=BugBuddyBugs
 X-GNOME-Bugzilla-Version= VERSION@
 Categories=GNOME;GTK;Office;Viewer;Graphics;2DGraphics;VectorGraphics;
-MimeType= EVINCE_MIME_TYPES@
+MimeType= EVINCE_MIME_TYPES@;


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