diff options
author | Kandrashin Denis <mail@lintest.ru> | 2012-06-07 11:24:48 +0400 |
---|---|---|
committer | Kandrashin Denis <mail@lintest.ru> | 2012-06-07 11:25:02 +0400 |
commit | 160393bfed2af7e0a8621acba079d64091302baf (patch) | |
tree | 29088c788fe88de0ab9f5d295f2b22a5a9e3fa15 /sources | |
parent | 5d61fd6a36ab965fd7ea3a6423815590d993c0ef (diff) |
Fix downloaded books open error
Diffstat (limited to 'sources')
-rw-r--r-- | sources/MyRuLib/FbBookPanel.cpp | 10 | ||||
-rw-r--r-- | sources/MyRuLib/FbFileReader.cpp | 9 |
2 files changed, 10 insertions, 9 deletions
diff --git a/sources/MyRuLib/FbBookPanel.cpp b/sources/MyRuLib/FbBookPanel.cpp index 572f1b41..351b070d 100644 --- a/sources/MyRuLib/FbBookPanel.cpp +++ b/sources/MyRuLib/FbBookPanel.cpp @@ -619,13 +619,13 @@ void FbBookPanel::UpdateMaster(FbMasterEvent & event) }
void FbBookPanel::OnEditBook(wxCommandEvent & event)
-{ - int book = m_BookList.GetBook(); - if (book) FbSingleTitleDlg::Execute(book); - return; +{
+ int book = m_BookList.GetBook();
+ if (book) FbSingleTitleDlg::Execute(book);
+ return;
wxArrayInt items;
- GetSelected(items); + GetSelected(items);
switch (items.Count()) {
case 0: break;
case 1: FbSingleTitleDlg::Execute(items[0]); break;
diff --git a/sources/MyRuLib/FbFileReader.cpp b/sources/MyRuLib/FbFileReader.cpp index 382e6877..a2a04b04 100644 --- a/sources/MyRuLib/FbFileReader.cpp +++ b/sources/MyRuLib/FbFileReader.cpp @@ -62,7 +62,7 @@ FbZipInputStream::FbZipInputStream(const wxString & archname, const wxString & f {
while (m_entry = GetNextEntry()) {
bool ok = (m_entry->GetInternalName() == filename);
- if (ok) { m_ok = OpenEntry(*m_entry); break; }
+ if (ok) { m_ok = OpenEntry(*m_entry); return; }
}
m_ok = false;
}
@@ -72,7 +72,7 @@ FbZipInputStream::FbZipInputStream(const wxString & archname, bool info) {
while (m_entry = GetNextEntry()) {
bool ok = (m_entry->GetInternalName().Right(4).Lower() == wxT(".fbd")) == info;
- if (ok) { m_ok = OpenEntry(*m_entry); break; }
+ if (ok) { m_ok = OpenEntry(*m_entry); return; }
}
m_ok = false;
}
@@ -83,9 +83,10 @@ FbZipInputStream::FbZipInputStream(wxInputStream * stream, bool info) while (m_entry = GetNextEntry()) {
wxString name = m_entry->GetInternalName();
if (name == wxT("mimetype")) { m_ok = false; return; } // Check EPUB
- bool found = (name.Right(4).Lower() == wxT(".fbd")) == info;
- if (found) { m_ok = OpenEntry(*m_entry); break; }
+ bool ok = (name.Right(4).Lower() == wxT(".fbd")) == info;
+ if (ok) { m_ok = OpenEntry(*m_entry); return; }
}
+ m_ok = false;
}
wxFileOffset FbZipInputStream::SeekI(wxFileOffset pos, wxSeekMode mode)
|