GNOME Bugzilla – Bug 532312
Comic Book compresses with 7zip (aka .cb7)
Last modified: 2008-07-11 07:22:21 UTC
Evince support by default comic book .cbr and .cbz (simple compressed image folders...) Can you please add support for .cb7 files (aka folder compresses with 7zip .7z and renamed to .cbz). I assume you should implement a application/x-cb7 mime-type and add some code to the already present comic-book section... (I'm useless with C...) Thank you very much, Actam btw: 7zip is GPL as zip and compress more... (a little bit more, but still something...)
Ok
Created attachment 114009 [details] [review] this is a patch for this bug this patch includes support for mime type application/x-cb7
Please generate a unified diff with '-u'.
Comment on attachment 114009 [details] [review] this is a patch for this bug Index: repo/evinceed/backend/comics/comics-document.c =================================================================== --- repo/evinceed/backend/comics/comics-document.c (revision 3065) +++ repo/evinceed/backend/comics/comics-document.c (working copy) @@ -144,6 +144,12 @@ 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); Index: repo/evinceed/backend/comics/comicsdocument.evince-backend.in =================================================================== --- repo/evinceed/backend/comics/comicsdocument.evince-backend.in (revision 3065) +++ repo/evinceed/backend/comics/comicsdocument.evince-backend.in (working copy) @@ -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;
Comment on attachment 114009 [details] [review] this is a patch for this bug
Created attachment 114150 [details] [review] this is the patch in unified format
Unfortunately there are few other places where you need to add cb7: 1) configure.ac: if test "x$enable_comics" = "xyes"; then EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-cbr;application/x-cbz;" fi This way evince will open cb7 files from nautilus. 2) thumbnailer/evince-thumbnailer-comics.schemas.in This way evince will show thumbnails for cb7 documents in nautilus.
Created attachment 114270 [details] [review] i have made the changes suggested by you in this patch
Are you sure you attached the right one?
Created attachment 114358 [details] [review] I am sorry, this is the one
Applied, thanks a lot!