After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 532312 - Comic Book compresses with 7zip (aka .cb7)
Comic Book compresses with 7zip (aka .cb7)
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
2.22.x
Other All
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-09 09:37 UTC by Gian Luca Ruggero
Modified: 2008-07-11 07:22 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
this is a patch for this bug (984 bytes, patch)
2008-07-04 23:00 UTC, kartik
needs-work Details | Review
this is the patch in unified format (1.11 KB, patch)
2008-07-07 21:29 UTC, kartik
needs-work Details | Review
i have made the changes suggested by you in this patch (1.11 KB, patch)
2008-07-09 19:35 UTC, kartik
none Details | Review
I am sorry, this is the one (2.91 KB, patch)
2008-07-11 01:26 UTC, kartik
committed Details | Review

Description Gian Luca Ruggero 2008-05-09 09:37:31 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...)
Comment 1 Nickolay V. Shmyrev 2008-05-09 10:01:18 UTC
Ok
Comment 2 kartik 2008-07-04 23:00:16 UTC
Created attachment 114009 [details] [review]
this is a patch for this bug

this patch includes support for mime type application/x-cb7
Comment 3 Bastien Nocera 2008-07-04 23:34:15 UTC
Please generate a unified diff with '-u'.
Comment 4 kartik 2008-07-06 19:55:57 UTC
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 5 kartik 2008-07-07 21:12:25 UTC
Comment on attachment 114009 [details] [review]
this is a patch for this bug
Comment 6 kartik 2008-07-07 21:29:41 UTC
Created attachment 114150 [details] [review]
this is the patch in unified format
Comment 7 Nickolay V. Shmyrev 2008-07-08 21:43:06 UTC
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.
Comment 8 kartik 2008-07-09 19:35:54 UTC
Created attachment 114270 [details] [review]
i have made the changes suggested by you in this patch
Comment 9 Nickolay V. Shmyrev 2008-07-09 20:16:29 UTC
Are you sure you attached the right one?
Comment 10 kartik 2008-07-11 01:26:34 UTC
Created attachment 114358 [details] [review]
I am sorry, this is the one
Comment 11 Nickolay V. Shmyrev 2008-07-11 07:22:21 UTC
Applied, thanks a lot!