diff options
-rw-r--r-- | 3rdparty/cmake/FindLibXML2.cmake (renamed from cmake/FindLibXML2.cmake) | 0 | ||||
-rw-r--r-- | 3rdparty/cmake/FindQScintilla.cmake (renamed from cmake/FindQScintilla.cmake) | 0 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | fb2edit.pro | 56 | ||||
-rw-r--r-- | source/fb2edit.pro | 55 | ||||
-rw-r--r-- | source/fb2head.cpp | 1 | ||||
-rw-r--r-- | source/fb2read.cpp | 2 | ||||
-rw-r--r-- | source/fb2xml.cpp | 3 | ||||
-rw-r--r-- | source/ts/ru.ts | 475 |
9 files changed, 61 insertions, 533 deletions
diff --git a/cmake/FindLibXML2.cmake b/3rdparty/cmake/FindLibXML2.cmake index 678dc22..678dc22 100644 --- a/cmake/FindLibXML2.cmake +++ b/3rdparty/cmake/FindLibXML2.cmake diff --git a/cmake/FindQScintilla.cmake b/3rdparty/cmake/FindQScintilla.cmake index e821640..e821640 100644 --- a/cmake/FindQScintilla.cmake +++ b/3rdparty/cmake/FindQScintilla.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 83b3d56..e681c76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 2.6.0) project(fb2edit) -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3rdparty/cmake) find_package( Qt4 4.7.0 COMPONENTS QtCore QtGui QtMain QtNetwork QtWebkit QtXml QtXmlPatterns REQUIRED ) find_package( QScintilla REQUIRED ) diff --git a/fb2edit.pro b/fb2edit.pro new file mode 100644 index 0000000..9cb42e3 --- /dev/null +++ b/fb2edit.pro @@ -0,0 +1,56 @@ +HEADERS = \ + source/fb2app.h \ + source/fb2head.h \ + source/fb2main.h \ + source/fb2read.h \ + source/fb2tree.h \ + source/fb2save.h \ + source/fb2view.h \ + source/fb2xml.h \ + source/fb2xml2.h + +SOURCES = \ + source/fb2app.cpp \ + source/fb2head.cpp \ + source/fb2main.cpp \ + source/fb2read.cpp \ + source/fb2tree.cpp \ + source/fb2save.cpp \ + source/fb2view.cpp \ + source/fb2xml.cpp \ + source/fb2xml2.cpp + +RESOURCES = \ + source/res/fb2edit.qrc + +TARGET = fb2edit + +TRANSLATIONS = source/ts/ru.ts + +VERSION = 0.01.1 + +QT += xml +QT += webkit +QT += network + +LIBS += -lqscintilla2 + +OTHER_FILES += \ + source/res/style.css \ + source/res/blank.fb2 + +if (win32) { + + INCLUDEPATH += ../libxml2/include + INCLUDEPATH += ../iconv/include + + LIBS += -L../libxml2/lib -llibxml2 + LIBS += -L../iconv/lib -liconv + LIBS += -L../zlib/lib -lzlib + +} else { + + INCLUDEPATH += /usr/include/libxml2 + LIBS += -lxml2 + +} diff --git a/source/fb2edit.pro b/source/fb2edit.pro deleted file mode 100644 index cb8726a..0000000 --- a/source/fb2edit.pro +++ /dev/null @@ -1,55 +0,0 @@ -HEADERS = \ - fb2app.h \ - fb2head.h \ - fb2main.h \ - fb2read.h \ - fb2tree.h \ - fb2save.h \ - fb2view.h \ - fb2xml.h \ - fb2xml2.h - -SOURCES = \ - fb2app.cpp \ - fb2head.cpp \ - fb2main.cpp \ - fb2read.cpp \ - fb2tree.cpp \ - fb2save.cpp \ - fb2view.cpp \ - fb2xml.cpp \ - fb2xml2.cpp - -RESOURCES = \ - res/fb2edit.qrc - -TARGET = fb2edit - -TRANSLATIONS = ts/ru.ts - -VERSION = 0.01.1 - -QT += xml -QT += webkit -QT += network - -LIBS += -lqscintilla2 - -OTHER_FILES += res/style.css \ - res/blank.fb2 - -if (win32) { - - INCLUDEPATH += ../libxml2/include - INCLUDEPATH += ../iconv/include - - LIBS += -L../libxml2/lib -llibxml2 - LIBS += -L../iconv/lib -liconv - LIBS += -L../zlib/lib -lzlib - -} else { - - INCLUDEPATH += /usr/include/libxml2 - LIBS += -lxml2 - -} diff --git a/source/fb2head.cpp b/source/fb2head.cpp index d1a28ec..add7534 100644 --- a/source/fb2head.cpp +++ b/source/fb2head.cpp @@ -128,6 +128,7 @@ QString Fb2HeadItem::value() const if (numb.isEmpty() || numb == "0") return text; return text + ", " + tr("#") + numb; } break; + default: ; } if (m_list.count()) return QString(); return m_element.toPlainText().simplified(); diff --git a/source/fb2read.cpp b/source/fb2read.cpp index 75c4f4c..f08fa67 100644 --- a/source/fb2read.cpp +++ b/source/fb2read.cpp @@ -11,8 +11,8 @@ Fb2ReadThread::Fb2ReadThread(QObject *parent, const QString &filename, const QString &xml) : QThread(parent) , m_filename(filename) - , m_abort(false) , m_xml(xml) + , m_abort(false) { connect(this, SIGNAL(html(QString, QString)), parent, SLOT(html(QString, QString))); } diff --git a/source/fb2xml.cpp b/source/fb2xml.cpp index f8ebac2..7a42a98 100644 --- a/source/fb2xml.cpp +++ b/source/fb2xml.cpp @@ -73,7 +73,8 @@ bool Fb2XmlHandler::startElement(const QString & namespaceURI, const QString & l Q_UNUSED(localName); const QString name = qName.toLower(); if (m_handler) return m_handler->doStart(name, attributes); - return m_handler = CreateRoot(name, attributes); + m_handler = CreateRoot(name, attributes); + return m_handler; } bool Fb2XmlHandler::isWhiteSpace(const QString &str) diff --git a/source/ts/ru.ts b/source/ts/ru.ts deleted file mode 100644 index 18a8eed..0000000 --- a/source/ts/ru.ts +++ /dev/null @@ -1,475 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>Fb2HeadItem</name> - <message> - <location filename="../fb2head.cpp" line="11"/> - <source>Book</source> - <translation type="unfinished">Книга</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="12"/> - <source>File</source> - <translation type="unfinished">Файл</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="13"/> - <source>Publish</source> - <translation type="unfinished">Публикация</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="14"/> - <source>Add-ons</source> - <translation type="unfinished">Дополнения</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="15"/> - <source>Genre</source> - <translation type="unfinished">Жанр</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="16"/> - <source>Author</source> - <translation type="unfinished">Автор</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="17"/> - <source>Title</source> - <translation type="unfinished">Заголовок</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="18"/> - <source>Annotation</source> - <translation type="unfinished">Аннотация</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="19"/> - <source>Cover</source> - <translation type="unfinished">Обложка</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="20"/> - <source>Date</source> - <translation type="unfinished">Дата</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="21"/> - <source>Language</source> - <translation type="unfinished">Язык</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="22"/> - <source>Translator</source> - <translation type="unfinished">Переводчик</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="23"/> - <source>Sequence</source> - <translation type="unfinished">Серия</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="24"/> - <source>First name</source> - <translation type="unfinished">Имя</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="25"/> - <source>Middle name</source> - <translation type="unfinished">Отчество</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="26"/> - <source>Last name</source> - <translation type="unfinished">Фамилия</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="27"/> - <source>History</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../fb2head.cpp" line="129"/> - <source>#</source> - <translation>№</translation> - </message> -</context> -<context> - <name>Fb2HeadModel</name> - <message> - <location filename="../fb2head.cpp" line="231"/> - <source>Key</source> - <translation type="unfinished">Ключ</translation> - </message> - <message> - <location filename="../fb2head.cpp" line="232"/> - <source>Value</source> - <translation>Значение</translation> - </message> -</context> -<context> - <name>Fb2MainWindow</name> - <message> - <location filename="../fb2main.cpp" line="70"/> - <source>Message log</source> - <translation>Информационные сообщения</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="134"/> - <source>Open file</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="177"/> - <source>Save As...</source> - <translation>Сохранить как...</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="184"/> - <source>About fb2edit</source> - <translation>О программе...</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="185"/> - <location filename="../fb2main.cpp" line="415"/> - <source>The <b>fb2edit</b> is application for editing FB2-files.</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="216"/> - <source>&File</source> - <translation>&Файл</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="217"/> - <source>File</source> - <translation>Файл</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="220"/> - <source>&New</source> - <translation>&Новый</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="223"/> - <source>Create a new file</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="228"/> - <source>&Open...</source> - <translation>&Открыть...</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="230"/> - <source>Open an existing file</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="235"/> - <source>&Save</source> - <translation>&Сохранить</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="237"/> - <source>Save the document to disk</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="242"/> - <source>Save &As...</source> - <translation>Сохрать &как...</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="244"/> - <source>Save the document under a new name</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="250"/> - <source>&Close</source> - <translation>&Закрыть</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="252"/> - <source>Close this window</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="256"/> - <source>E&xit</source> - <translation>&Выход</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="258"/> - <source>Exit the application</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="262"/> - <source>&Edit</source> - <translation>&Правка</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="632"/> - <location filename="../fb2main.cpp" line="713"/> - <location filename="../fb2main.cpp" line="843"/> - <source>Edit</source> - <translation>Правка</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="763"/> - <source>&Bold</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="769"/> - <source>&Italic</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="775"/> - <source>&Strikethrough</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="266"/> - <location filename="../fb2main.cpp" line="721"/> - <source>&Undo</source> - <translation>&Отменить</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="272"/> - <location filename="../fb2main.cpp" line="728"/> - <source>&Redo</source> - <translation>&Повторить</translation> - </message> - <message> - <source>Undo</source> - <translation type="obsolete">Отменить</translation> - </message> - <message> - <source>Redo</source> - <translation type="obsolete">Повторить</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="280"/> - <location filename="../fb2main.cpp" line="737"/> - <source>Cu&t</source> - <translation>Вы&резать</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="283"/> - <location filename="../fb2main.cpp" line="740"/> - <source>Cut the current selection's contents to the clipboard</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="287"/> - <location filename="../fb2main.cpp" line="745"/> - <source>&Copy</source> - <translation>&Копировать</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="290"/> - <location filename="../fb2main.cpp" line="748"/> - <source>Copy the current selection's contents to the clipboard</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="294"/> - <location filename="../fb2main.cpp" line="753"/> - <source>&Paste</source> - <translation>&Вставить</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="297"/> - <location filename="../fb2main.cpp" line="756"/> - <source>Paste the clipboard's contents into the current selection</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="303"/> - <source>&Settings</source> - <translation type="unfinished">&Настройки</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="305"/> - <source>Application settings</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="309"/> - <source>&Insert</source> - <comment>Main menu</comment> - <translation type="unfinished">&Вставка</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="311"/> - <source>&Append</source> - <translation type="unfinished">&Добавить</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="316"/> - <source>&Delete</source> - <translation type="unfinished">&Удалить</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="323"/> - <source>Fo&rmat</source> - <translation>Фо&рмат</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="390"/> - <source>&Contents</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="394"/> - <source>&Web inspector</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Format</source> - <translation type="obsolete">Формат</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="325"/> - <source>Bold</source> - <translation>Жирный</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="330"/> - <source>Italic</source> - <translation>Курсив</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="335"/> - <source>Strikethrough</source> - <translation>Зачеркнутый</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="339"/> - <location filename="../fb2main.cpp" line="780"/> - <source>Superscript</source> - <translation>Верхний индекс</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="343"/> - <location filename="../fb2main.cpp" line="785"/> - <source>Subscript</source> - <translation>Нижний индекс</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="347"/> - <source>&View</source> - <translation>&Вид</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="353"/> - <source>&Text</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="361"/> - <source>&Head</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="368"/> - <source>&XML</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="377"/> - <source>Zoom in</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="381"/> - <source>Zoom out</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="385"/> - <source>Zoom original</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="399"/> - <source>&Help</source> - <translation>&?</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="401"/> - <source>&About</source> - <translation>&О программа...</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="402"/> - <source>Show the application's About box</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="406"/> - <source>About &Qt</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="407"/> - <source>Show the Qt library's About box</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="414"/> - <source>Settings</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="425"/> - <source>Contents</source> - <translation>Содержание</translation> - </message> - <message> - <location filename="../fb2main.cpp" line="520"/> - <source>Ready</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="544"/> - <source>The document has been modified. Do you want to save your changes?</source> - <translation></translation> - </message> - <message> - <location filename="../fb2main.cpp" line="559"/> - <source>Cannot write file %1: %2.</source> - <translation></translation> - </message> -</context> -<context> - <name>QObject</name> - <message> - <location filename="../fb2read.cpp" line="51"/> - <location filename="../fb2read.cpp" line="73"/> - <source>Cannot read file %1: %2.</source> - <translation></translation> - </message> - <message> - <location filename="../fb2read.cpp" line="386"/> - <source>The file is not an FB2 file.</source> - <translation></translation> - </message> - <message> - <location filename="../fb2xml.cpp" line="96"/> - <location filename="../fb2xml.cpp" line="105"/> - <location filename="../fb2xml.cpp" line="114"/> - <source>Parse error at line %1, column %2: %3</source> - <translation></translation> - </message> - <message> - <location filename="../fb2save.cpp" line="269"/> - <source>The tag <body> was not found.</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> |