From 60775f37e255b3e41b7fbb80dcb04d65a763ad98 Mon Sep 17 00:00:00 2001 From: Ruslan Nigmatullin Date: Tue, 28 Jan 2014 06:22:56 +0400 Subject: [PATCH 1/2] Added ability to disable bzip2 support --- zlibrary/core/src/filesystem/ZLFSPluginManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zlibrary/core/src/filesystem/ZLFSPluginManager.cpp b/zlibrary/core/src/filesystem/ZLFSPluginManager.cpp index 96360f64d..9886983b8 100644 --- a/zlibrary/core/src/filesystem/ZLFSPluginManager.cpp +++ b/zlibrary/core/src/filesystem/ZLFSPluginManager.cpp @@ -23,7 +23,9 @@ #include "ZLFSPluginManager.h" #include "zip/ZLFSCompressorGzip.h" -#include "bzip2/ZLFSCompressorBzip2.h" +#ifndef NO_BZIP2_SUPPORT +# include "bzip2/ZLFSCompressorBzip2.h" +#endif #include "zip/ZLFSArchiverZip.h" #include "tar/ZLFSArchiverTar.h" @@ -31,7 +33,9 @@ static const char ARCHIVERS_SEPARATOR = '.'; ZLFSPluginManager::ZLFSPluginManager() { registerPlugin(new ZLFSCompressorGzip); +#ifndef NO_BZIP2_SUPPORT registerPlugin(new ZLFSCompressorBzip2); +#endif registerPlugin(new ZLFSArchiverZip); registerPlugin(new ZLFSArchiverTar); } From f621e52d57332bf34ba9e7c00dab04699cc0fe47 Mon Sep 17 00:00:00 2001 From: Ruslan Nigmatullin Date: Fri, 24 Jan 2014 03:21:00 +0400 Subject: [PATCH 2/2] Added ability to get all books set from Library --- fbreader/src/library/Library.cpp | 5 +++++ fbreader/src/library/Library.h | 1 + 2 files changed, 6 insertions(+) diff --git a/fbreader/src/library/Library.cpp b/fbreader/src/library/Library.cpp index a4c4a56ec..27ae5ca71 100644 --- a/fbreader/src/library/Library.cpp +++ b/fbreader/src/library/Library.cpp @@ -418,6 +418,11 @@ const BookList &Library::recentBooks() const { return myRecentBooks; } +const BookSet &Library::books() const { + synchronize(); + return myBooks; +} + void Library::addBookToRecentList(shared_ptr book) { if (book.isNull()) { return; diff --git a/fbreader/src/library/Library.h b/fbreader/src/library/Library.h index b5046e5af..5ba85e2be 100644 --- a/fbreader/src/library/Library.h +++ b/fbreader/src/library/Library.h @@ -57,6 +57,7 @@ class Library { const BookList &books(shared_ptr author) const; const BookList &books(shared_ptr tag) const; const BookList &recentBooks() const; + const BookSet &books() const; enum RemoveType { REMOVE_DONT_REMOVE = 0,