From 331bedb9cefa5567b900fe46381e89aa057f9f72 Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Fri, 11 Jul 2008 07:22:01 +0000 Subject: [PATCH] Added support for 7-zip based cb7 comic book. Patch by Kartik Rustagi. 2008-07-11 Nickolay V. Shmyrev * backend/comics/comics-document.c (comics_document_load): * backend/comics/comicsdocument.evince-backend.in: * configure.ac: * thumbnailer/evince-thumbnailer-comics.schemas.in: Added support for 7-zip based cb7 comic book. Patch by Kartik Rustagi. Fixes bug #532312. svn path=/trunk/; revision=3068 --- ChangeLog | 10 +++++++ backend/comics/comics-document.c | 6 +++++ .../comics/comicsdocument.evince-backend.in | 2 +- configure.ac | 2 +- .../evince-thumbnailer-comics.schemas.in | 26 +++++++++++++++++++ 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f7943c92..04adffd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-07-11 Nickolay V. Shmyrev + + * backend/comics/comics-document.c (comics_document_load): + * backend/comics/comicsdocument.evince-backend.in: + * configure.ac: + * thumbnailer/evince-thumbnailer-comics.schemas.in: + + Added support for 7-zip based cb7 comic book. Patch by + Kartik Rustagi. Fixes bug #532312. + 2008-06-24 Bastien Nocera * shell/ev-window.c: Use Alt+Left to rotate left, and Alt+Right diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c index 2d8404e0..b2f7b7ac 100644 --- a/backend/comics/comics-document.c +++ b/backend/comics/comics-document.c @@ -144,6 +144,12 @@ comics_document_load (EvDocument *document, list_files_command = g_strdup_printf ("zipinfo -1 -- %s", quoted_file); comics_document->regex_arg = TRUE; + } else if (!strcmp (mime_type, "application/x-cb7")) { + comics_document->extract_command = + g_strdup ("7zr x -so"); + list_files_command = + g_strdup_printf ("7zr l -- %s", quoted_file); + comics_document->regex_arg = TRUE; } g_object_unref (file_info); diff --git a/backend/comics/comicsdocument.evince-backend.in b/backend/comics/comicsdocument.evince-backend.in index df1a97ee..d46161d2 100644 --- a/backend/comics/comicsdocument.evince-backend.in +++ b/backend/comics/comicsdocument.evince-backend.in @@ -1,4 +1,4 @@ [Evince Backend] Module=comicsdocument _TypeDescription=Comic Books -MimeType=application/x-cbr;application/x-cbz; +MimeType=application/x-cbr;application/x-cbz;application/x-cb7; diff --git a/configure.ac b/configure.ac index f22879b3..ca47db96 100644 --- a/configure.ac +++ b/configure.ac @@ -408,7 +408,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/x-cbr;application/x-cbz;" + EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-cbr;application/x-cbz;application/x-cb7" fi if test "x$enable_pixbuf" = "xyes"; then EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/*;" diff --git a/thumbnailer/evince-thumbnailer-comics.schemas.in b/thumbnailer/evince-thumbnailer-comics.schemas.in index 4d62411c..814cb800 100644 --- a/thumbnailer/evince-thumbnailer-comics.schemas.in +++ b/thumbnailer/evince-thumbnailer-comics.schemas.in @@ -51,5 +51,31 @@ + + + /schemas/desktop/gnome/thumbnailers/application@x-cb7/enable + /desktop/gnome/thumbnailers/application@x-cb7/enable + evince + bool + true + + + + + + + + + /schemas/desktop/gnome/thumbnailers/application@x-cb7/command + /desktop/gnome/thumbnailers/application@x-cb7/command + evince + string + evince-thumbnailer -s %s %u %o + + + + + + -- 2.43.5