From 3ec63537add6165440f67c6c6ad8413a40724c13 Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Tue, 20 Dec 2005 16:54:15 +0000 Subject: [PATCH] Comics mime types are added to shared-mime-info CVS. Now we don't need to * backend/ev-document-factory.c: * comics/Makefile.am: * comics/comics-document.c: (comics_document_load): * comics/ev-cbr-mime.xml: * configure.ac: Comics mime types are added to shared-mime-info CVS. Now we don't need to install our own mime types. --- ChangeLog | 11 +++++++++++ backend/ev-document-factory.c | 4 ++-- comics/Makefile.am | 16 ---------------- comics/comics-document.c | 4 ++-- comics/ev-cbr-mime.xml | 31 ------------------------------- configure.ac | 12 +----------- 6 files changed, 16 insertions(+), 62 deletions(-) delete mode 100644 comics/ev-cbr-mime.xml diff --git a/ChangeLog b/ChangeLog index 65b09fe8..324d5986 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-12-20 Nickolay V. Shmyrev + + * backend/ev-document-factory.c: + * comics/Makefile.am: + * comics/comics-document.c: (comics_document_load): + * comics/ev-cbr-mime.xml: + * configure.ac: + + Comics mime types are added to shared-mime-info CVS. Now + we don't need to install our own mime types. + 2005-12-20 Nickolay V. Shmyrev * shell/ev-window.c: diff --git a/backend/ev-document-factory.c b/backend/ev-document-factory.c index f9118b62..1cf30141 100644 --- a/backend/ev-document-factory.c +++ b/backend/ev-document-factory.c @@ -75,8 +75,8 @@ const EvDocumentType document_types[] = { #ifdef ENABLE_COMICS /* cbr/cbz: */ - {"application/cbr", EV_BACKEND_COMICS, comics_document_get_type}, - {"application/cbz", EV_BACKEND_COMICS, comics_document_get_type}, + {"application/x-cbr", EV_BACKEND_COMICS, comics_document_get_type}, + {"application/x-cbz", EV_BACKEND_COMICS, comics_document_get_type}, #endif }; diff --git a/comics/Makefile.am b/comics/Makefile.am index 7ebf0d91..bf11eb8f 100644 --- a/comics/Makefile.am +++ b/comics/Makefile.am @@ -10,19 +10,3 @@ libcomicsdocument_la_SOURCES = \ comics-document.c \ comics-document.h -# need to respect $XDG_DATA_DIR probably -xdgmimedir = $(datadir)/mime/packages -xdgmime_DATA = ev-cbr-mime.xml - -EXTRA_DIST = $(xdgmime_DATA) - -if ENABLE_UPDATE_MIMEDB - -install-data-hook: - $(UPDATE_MIME_DB) $(DESTDIR)$(datadir)/mime - -uninstall-hook: - $(UPDATE_MIME_DB) $(DESTDIR)$(datadir)/mime - -endif # ENABLE_UPDATE_MIMEDB - diff --git a/comics/comics-document.c b/comics/comics-document.c index aa7236a4..93cd009a 100644 --- a/comics/comics-document.c +++ b/comics/comics-document.c @@ -87,12 +87,12 @@ comics_document_load (EvDocument *document, /* FIXME, use proper cbr/cbz mime types once they're * included in shared-mime-info */ - if (!strcmp (mime_type, "application/cbr")) { + if (!strcmp (mime_type, "application/x-cbr")) { comics_document->extract_command = g_strdup ("unrar p -c- -ierr"); list_files_command = g_strdup_printf ("unrar vb -c- -- %s", quoted_file); - } else if (!strcmp (mime_type, "application/cbz")) { + } else if (!strcmp (mime_type, "application/x-cbz")) { comics_document->extract_command = g_strdup ("unzip -p -C"); list_files_command = diff --git a/comics/ev-cbr-mime.xml b/comics/ev-cbr-mime.xml deleted file mode 100644 index 4a92993d..00000000 --- a/comics/ev-cbr-mime.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - CBR document - Dogfen CBR - CBR-dokument - CBR-Dokument - CBR-asiakirja - CBR-dokument - CBR-dokument - CBR документ - CBR документ - CBR-dokument - - - - - CBZ document - Dogfen CBZ - CBZ-dokument - CBZ-Dokument - CBZ-asiakirja - CBZ-dokument - CBZ-dokument - CBZ-документ - CBZ-документ - CBZ-dokument - - - \ No newline at end of file diff --git a/configure.ac b/configure.ac index 2f59eb06..3fe05b03 100644 --- a/configure.ac +++ b/configure.ac @@ -272,19 +272,9 @@ AC_ARG_ENABLE(comics, [AC_HELP_STRING([--enable-comics], [Compile with support for comic book archives])],enable_comics=yes,enable_comics=no) if test "x$enable_comics" = "xyes"; then AC_DEFINE([ENABLE_COMICS], [1], [Enable support for comics.]) - fi AM_CONDITIONAL(ENABLE_COMICS, test x$enable_comics = xyes) -AC_PATH_PROG(UPDATE_MIME_DB, update-mime-database, no) -AC_SUBST(UPDATE_MIME_DB) - -AC_ARG_ENABLE(update-mimedb, - AC_HELP_STRING([--disable-update-mimedb], - [disable the update-mime-database after install [default=no]]),, - enable_update_mimedb=yes) -AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes) - dnl ================== End of comic book checks ============================================ dnl =================== Mime types list ==================================================== @@ -301,7 +291,7 @@ if test "x$enable_tiff" = "xyes"; then EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;image/tiff" fi if test "x$enable_comics" = "xyes"; then - EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;application/cbr;application/cbz" + EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;application/x-cbr;application/x-cbz" fi AC_SUBST(EVINCE_MIME_TYPES) -- 2.43.5