void FilePropsDialog::fillItems()
{
    _docview->savePosition();
    CRPropRef props = _docview->getDocProps();

    addPropLine(tr("Archive name"), cr2qt(props->getStringDef(DOC_PROP_ARC_NAME)) );
    addPropLine(tr("Archive path"), cr2qt(props->getStringDef(DOC_PROP_ARC_PATH)) );
    addPropLine(tr("Archive size"), cr2qt(props->getStringDef(DOC_PROP_ARC_SIZE)) );
    addPropLine(tr("File name"), cr2qt(props->getStringDef(DOC_PROP_FILE_NAME)) );
    addPropLine(tr("File path"), cr2qt(props->getStringDef(DOC_PROP_FILE_PATH)) );
    addPropLine(tr("File size"), cr2qt(props->getStringDef(DOC_PROP_FILE_SIZE)) );
    addPropLine(tr("File format"), cr2qt(props->getStringDef(DOC_PROP_FILE_FORMAT)) );

    addInfoSection(tr("File info"));

    addPropLine(tr("Title"), cr2qt(props->getStringDef(DOC_PROP_TITLE)) );
    addPropLine(tr("Author(s)"), cr2qt(props->getStringDef(DOC_PROP_AUTHORS)) );
    addPropLine(tr("Series name"), cr2qt(props->getStringDef(DOC_PROP_SERIES_NAME)) );
    addPropLine(tr("Series number"), cr2qt(props->getStringDef(DOC_PROP_SERIES_NUMBER)) );
    addPropLine(tr("Date"), getDocText( "/FictionBook/description/title-info/date", ", " ) );
    addPropLine(tr("Genres"), getDocText( "/FictionBook/description/title-info/genre", ", " ) );
    addPropLine(tr("Translator"), getDocText( "/FictionBook/description/title-info/translator", ", " ) );
    addInfoSection(tr("Book info") );

    addPropLine(tr("Document author"), getDocAuthors( "/FictionBook/description/document-info/author", " " ) );
    addPropLine(tr("Document date"), getDocText( "/FictionBook/description/document-info/date", " " ) );
    addPropLine(tr("Document source URL"), getDocText( "/FictionBook/description/document-info/src-url", " " ) );
    addPropLine(tr("OCR by"), getDocText( "/FictionBook/description/document-info/src-ocr", " " ) );
    addPropLine(tr("Document version"), getDocText( "/FictionBook/description/document-info/version", " " ) );
    addInfoSection( tr("Document info") );

    addPropLine(tr("Publication name"), getDocText( "/FictionBook/description/publish-info/book-name", " " ) );
    addPropLine(tr("Publisher"), getDocText( "/FictionBook/description/publish-info/publisher", " " ) );
    addPropLine(tr("Publisher city"), getDocText( "/FictionBook/description/publish-info/city", " " ) );
    addPropLine(tr("Publication year"), getDocText( "/FictionBook/description/publish-info/year", " " ) );
    addPropLine(tr("ISBN"), getDocText( "/FictionBook/description/publish-info/isbn", " " ) );
    addInfoSection(tr("Publication info"));

    addPropLine(tr("Custom info"), getDocText( "/FictionBook/description/custom-info", " " ) );
}
void V3DocViewWin::showAboutDialog()
{
	_docview->savePosition();
	CRFileHistRecord * hist = _docview->getCurrentFileHistRecord();
    lString16 title = L"Cool Reader ";
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION CR_ENGINE_VERSION
#endif
    title << Utf8ToUnicode(lString8(PACKAGE_VERSION));

    lString8 txt;
    //=========================================================
    txt << "<table><col width=\"30%\"/><col width=\"70%\"/>\n";
    CRPropRef props = _docview->getDocProps();

    lString8 statusInfo;
	addPropLine( statusInfo, _("Current page"), lString16::itoa(_docview->getCurPage()+1) );
	addPropLine( statusInfo, _("Total pages"), lString16::itoa(_docview->getPageCount()) );
    addPropLine( statusInfo, _("Battery state"), _docview->getBatteryState()==-1 ? lString16(_("charging...")) : lString16::itoa(_docview->getBatteryState()) + L"%" );
	addPropLine( statusInfo, _("Current Time"), _docview->getTimeString() );
	// TODO:
	if ( hist ) {
		CRBookmark * lastpos = hist->getLastPos();
		if ( lastpos ) {
			addPropLine( statusInfo, _("Current chapter"), lastpos->getTitleText() );
		}
	}
    addInfoSection( txt, statusInfo, _("Status") );

    lString8 fileInfo;
    addPropLine( fileInfo, _("Archive name"), props->getStringDef(DOC_PROP_ARC_NAME) );
    addPropLine( fileInfo, _("Archive path"), props->getStringDef(DOC_PROP_ARC_PATH) );
    addPropLine( fileInfo, _("Archive size"), props->getStringDef(DOC_PROP_ARC_SIZE) );
    addPropLine( fileInfo, _("File name"), props->getStringDef(DOC_PROP_FILE_NAME) );
    addPropLine( fileInfo, _("File path"), props->getStringDef(DOC_PROP_FILE_PATH) );
    addPropLine( fileInfo, _("File size"), props->getStringDef(DOC_PROP_FILE_SIZE) );
    addPropLine( fileInfo, _("File format"), props->getStringDef(DOC_PROP_FILE_FORMAT) );
    addInfoSection( txt, fileInfo, _("File info") );

    lString8 bookInfo;
    addPropLine( bookInfo, _("Title"), props->getStringDef(DOC_PROP_TITLE) );
    addPropLine( bookInfo, _("Author(s)"), props->getStringDef(DOC_PROP_AUTHORS) );
    addPropLine( bookInfo, _("Series name"), props->getStringDef(DOC_PROP_SERIES_NAME) );
    addPropLine( bookInfo, _("Series number"), props->getStringDef(DOC_PROP_SERIES_NUMBER) );
    addPropLine( bookInfo, _("Date"), getDocText( getDocView()->getDocument(), "/FictionBook/description/title-info/date", ", " ) );
    addPropLine( bookInfo, _("Genres"), getDocText( getDocView()->getDocument(), "/FictionBook/description/title-info/genre", ", " ) );
    addPropLine( bookInfo, _("Translator"), getDocText( getDocView()->getDocument(), "/FictionBook/description/title-info/translator", ", " ) );
    addInfoSection( txt, bookInfo, _("Book info") );

    lString8 docInfo;
    addPropLine( docInfo, _("Document author"), getDocAuthors( getDocView()->getDocument(), "/FictionBook/description/document-info/author", " " ) );
    addPropLine( docInfo, _("Document date"), getDocText( getDocView()->getDocument(), "/FictionBook/description/document-info/date", " " ) );
    addPropLine( docInfo, _("Document source URL"), getDocText( getDocView()->getDocument(), "/FictionBook/description/document-info/src-url", " " ) );
    addPropLine( docInfo, _("OCR by"), getDocText( getDocView()->getDocument(), "/FictionBook/description/document-info/src-ocr", " " ) );
    addPropLine( docInfo, _("Document version"), getDocText( getDocView()->getDocument(), "/FictionBook/description/document-info/version", " " ) );
    addPropLine( docInfo, _("Change history"), getDocText( getDocView()->getDocument(), "/FictionBook/description/document-info/history", " " ) );
    addInfoSection( txt, docInfo, _("Document info") );

    lString8 pubInfo;
    addPropLine( pubInfo, _("Publication name"), getDocText( getDocView()->getDocument(), "/FictionBook/description/publish-info/book-name", " " ) );
    addPropLine( pubInfo, _("Publisher"), getDocText( getDocView()->getDocument(), "/FictionBook/description/publish-info/publisher", " " ) );
    addPropLine( pubInfo, _("Publisher city"), getDocText( getDocView()->getDocument(), "/FictionBook/description/publish-info/city", " " ) );
    addPropLine( pubInfo, _("Publication year"), getDocText( getDocView()->getDocument(), "/FictionBook/description/publish-info/year", " " ) );
    addPropLine( pubInfo, _("ISBN"), getDocText( getDocView()->getDocument(), "/FictionBook/description/publish-info/isbn", " " ) );
    addInfoSection( txt, pubInfo, _("Publication info") );

    addPropLine( txt, _("Custom info"), getDocText( getDocView()->getDocument(), "/FictionBook/description/custom-info", " " ) );

    txt << "</table>\n";

    //CRLog::trace(txt.c_str());
    //=========================================================
    txt = CRViewDialog::makeFb2Xml(txt);
    CRViewDialog * dlg = new CRViewDialog( _wm, title, txt, lvRect(), true, true );
    dlg->getDocView()->setVisiblePageCount(1);
    //int fs = _props->getIntDef( PROP_FILE_PROPS_FONT_SIZE, 26 );
    //dlg->getDocView()->setFontSize(fs);
    _wm->activateWindow( dlg );
}