Bug 179101 - Comicbook generator should accept files with .zip and .rar extensions
Summary: Comicbook generator should accept files with .zip and .rar extensions
Status: CLOSED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: Comicbook backend (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-30 02:17 UTC by David Palacio
Modified: 2009-05-09 22:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Palacio 2008-12-30 02:17:37 UTC
Version:           0.7.80 (using 4.1.86 (KDE 4.1.86 (KDE 4.2 >= 20081221)), Debian packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.26-1-amd64

I wrote a ruby program that uses the Okular part as it's main widget. Right now I have to either modify a Comicbook generator desktop file or duplicate the generator code to let the part open .zip & .rar files (it is very annoying to rename those files before being able to open them). IMO, the Comicbook generator should handle those extensions as well.

In my tests the following patch has two effects: 1) The part will be able to open .zip and .rar files as comicbooks. 2) The Okular shell will *not* be associated with these extensions

Index: libokularGenerator_comicbook.desktop
===================================================================
--- libokularGenerator_comicbook.desktop        (revisión: 900827)
+++ libokularGenerator_comicbook.desktop        (copia de trabajo)
@@ -61,7 +61,7 @@
 Comment[zh_CN]=Okular 的 Comic book 格式后端
 Comment[zh_TW]=Okular 的 Comic book 後端
 X-KDE-ServiceTypes=okular/Generator
-MimeType=application/x-cbz;application/x-cbr;
+MimeType=application/zip;application/x-cbz;application/x-rar;application/x-cbr;
 X-KDE-Library=okularGenerator_comicbook
 X-KDE-Priority=1
 X-KDE-okularAPIVersion=1


Cons:
* Nothing important. Associating zips and rars with this generator makes sense and little for any other. If there were ever any conflict, the Generator selection window would popup.
Comment 1 Pino Toscano 2008-12-30 11:36:22 UTC
> IMO, the Comicbook generator should handle those extensions as well.

I don't happen to agree here.
A ComicBook is just a zip/rar/etc with a different extension; not having it means that basically you don't have a ComicBook.
What is the *real* problem you want to solve?

> 2) The Okular shell will *not* be associated with these extensions

Wrong, as `okular somefile.zip` from console will work.
Comment 2 David Palacio 2008-12-30 21:45:46 UTC
> What is the *real* problem you want to solve?
My *real* problem is that most of the comicbooks I have seen come with .zip and .rar extensions. Some in read-only filesystems.
Comment 3 David Palacio 2009-01-11 19:16:07 UTC
Nevermind. KParts::OpenUrlArguments