~s-cecilio/lenmus/v5.3

« back to all changes in this revision

Viewing changes to src/dialogs/lenmus_dlg_books.cpp

  • Committer: cecilios
  • Date: 2012-09-25 16:27:45 UTC
  • Revision ID: s.cecilio@gmail.com-20120925162745-v2wrglew137u08yb
Class BookReader renamed as BooksCollection and refactored. Created class BookReader

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
//---------------------------------------------------------------------------------------
167
167
wxString BooksDlg::get_book_name(wxFileName& oFilename)
168
168
{
169
 
    BookReader reader;
170
 
    reader.AddBook(oFilename);
171
 
    BookRecord *pRecord = reader.ProcessTOCFile(oFilename);
172
 
    wxString title = pRecord->GetTitle();
173
 
    return title;
 
169
    //create a books collection containing only this book
 
170
    BooksCollection books;
 
171
    BookRecord *pRecord = books.add_book(oFilename);
 
172
 
 
173
    ////force to read the TOC file and get book title
 
174
    //BookRecord *pRecord = books.add_book_toc(oFilename);
 
175
    return pRecord->GetTitle();
174
176
}
175
177
 
176
178
//---------------------------------------------------------------------------------------