mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
FEATURE:204195
Add support for application/x-cbt filetypes using KArchive/KTar support. All kinds of tar (.cbt) files should now be supported. Changed appropriate .desktop files to detect as well. svn path=/trunk/KDE/kdegraphics/okular/; revision=1072400
This commit is contained in:
parent
f5bbebd879
commit
da899f862e
|
@ -15,6 +15,7 @@
|
|||
#include <klocale.h>
|
||||
#include <kmimetype.h>
|
||||
#include <kzip.h>
|
||||
#include <ktar.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
@ -57,6 +58,16 @@ bool Document::open( const QString &fileName )
|
|||
if ( mime->is( "application/x-cbz" ) || mime->name() == "application/zip" ) {
|
||||
mArchive = new KZip( fileName );
|
||||
|
||||
if ( !processArchive() ) {
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* We have a TAR archive
|
||||
*/
|
||||
} else if ( mime->is( "application/x-cbt" ) || mime->name() == "application/x-gzip" ||
|
||||
mime->name() == "application/x-tar" || mime->name() == "application/x-bzip" ) {
|
||||
mArchive = new KTar( fileName );
|
||||
|
||||
if ( !processArchive() ) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ Comment[x-test]=xxComic book backend for Okularxx
|
|||
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/x-cbz;application/x-cbr;application/x-cbt;
|
||||
X-KDE-Library=okularGenerator_comicbook
|
||||
X-KDE-Priority=1
|
||||
X-KDE-okularAPIVersion=1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Desktop Entry]
|
||||
MimeType=application/x-cbz;application/x-cbr;
|
||||
MimeType=application/x-cbz;application/x-cbr;application/x-cbt;
|
||||
Terminal=false
|
||||
Name=Okular
|
||||
Name[ar]=اوكلار
|
||||
|
@ -111,4 +111,4 @@ Type=Application
|
|||
InitialPreference=7
|
||||
Categories=Qt;KDE;Graphics;Viewer;
|
||||
NoDisplay=true
|
||||
X-KDE-Keywords=cbr, cbz, Comic Book
|
||||
X-KDE-Keywords=cbr, cbz, cbt, Comic Book
|
||||
|
|
|
@ -53,4 +53,4 @@ Name[zh_TW]=Okular
|
|||
X-KDE-ServiceTypes=KParts/ReadOnlyPart
|
||||
X-KDE-Library=okularpart
|
||||
Type=Service
|
||||
MimeType=application/x-cbz;application/x-cbr;
|
||||
MimeType=application/x-cbz;application/x-cbr;application/x-cbt;
|
||||
|
|
Loading…
Reference in a new issue