Selaa lähdekoodia

Modify actions, menu, toolbar

Kandrashin Denis 13 vuotta sitten
vanhempi
commit
80ed570957
4 muutettua tiedostoa jossa 198 lisäystä ja 187 poistoa
  1. 130 133
      source/fb2main.cpp
  2. 7 1
      source/fb2main.h
  3. BIN
      source/ts/ru.qm
  4. 61 53
      source/ts/ru.ts

+ 130 - 133
source/fb2main.cpp

@@ -19,8 +19,8 @@ Fb2MainWindow::Fb2MainWindow()
 {
     init();
     setCurrentFile();
-    createText();
-    createTree();
+    textEdit = new Fb2WebView(this);
+    viewText();
     textEdit->setHtml("<body/>");
 }
 
@@ -29,8 +29,7 @@ Fb2MainWindow::Fb2MainWindow(const QString &filename, ViewMode mode)
     init();
     setCurrentFile(filename);
     if (mode == FB2) {
-        createText();
-        createTree();
+        viewText();
         textEdit->load(filename);
     } else {
         createQsci();
@@ -54,6 +53,7 @@ void Fb2MainWindow::init()
     qsciEdit = NULL;
     treeView = NULL;
     headTree = NULL;
+    toolEdit = NULL;
     messageEdit = NULL;
 
     readSettings();
@@ -256,85 +256,10 @@ void Fb2MainWindow::createActions()
     connect(act, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
     menu->addAction(act);
 
-    menu = menuBar()->addMenu(tr("&Edit"));
-    tool = addToolBar(tr("Edit"));
-    tool->setMovable(false);
-    tool->addSeparator();
-
-    connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged()));
+    menuEdit = menu = menuBar()->addMenu(tr("&Edit"));
+    menuText = menu = menuBar()->addMenu(tr("Fo&rmat"));
+    menuView = menu = menuBar()->addMenu(tr("&View"));
 
-    actionUndo = act = new QAction(icon("edit-undo"), tr("&Undo"), this);
-    act->setPriority(QAction::LowPriority);
-    act->setShortcut(QKeySequence::Undo);
-    act->setEnabled(false);
-    menu->addAction(act);
-    tool->addAction(act);
-
-    actionRedo = act = new QAction(icon("edit-redo"), tr("&Redo"), this);
-    act->setPriority(QAction::LowPriority);
-    act->setShortcut(QKeySequence::Redo);
-    act->setEnabled(false);
-    menu->addAction(act);
-    tool->addAction(act);
-
-    menu->addSeparator();
-    tool->addSeparator();
-
-    actionCut = act = new QAction(icon("edit-cut"), tr("Cu&t"), this);
-    act->setPriority(QAction::LowPriority);
-    act->setShortcuts(QKeySequence::Cut);
-    act->setStatusTip(tr("Cut the current selection's contents to the clipboard"));
-    act->setEnabled(false);
-    menu->addAction(act);
-    tool->addAction(act);
-
-    actionCopy = act = new QAction(icon("edit-copy"), tr("&Copy"), this);
-    act->setPriority(QAction::LowPriority);
-    act->setShortcuts(QKeySequence::Copy);
-    act->setStatusTip(tr("Copy the current selection's contents to the clipboard"));
-    act->setEnabled(false);
-    menu->addAction(act);
-    tool->addAction(act);
-
-    actionPaste = act = new QAction(icon("edit-paste"), tr("&Paste"), this);
-    act->setPriority(QAction::LowPriority);
-    act->setShortcuts(QKeySequence::Paste);
-    act->setStatusTip(tr("Paste the clipboard's contents into the current selection"));
-    menu->addAction(act);
-    tool->addAction(act);
-    clipboardDataChanged();
-
-    menu = menuBar()->addMenu(tr("Fo&rmat"));
-    tool->addSeparator();
-
-    actionTextBold = act = new QAction(icon("format-text-bold"), tr("Bold"), this);
-    act->setShortcuts(QKeySequence::Bold);
-    act->setCheckable(true);
-    menu->addAction(act);
-    tool->addAction(act);
-
-    actionTextItalic = act = new QAction(icon("format-text-italic"), tr("Italic"), this);
-    act->setShortcuts(QKeySequence::Italic);
-    act->setCheckable(true);
-    menu->addAction(act);
-    tool->addAction(act);
-
-    actionTextStrike = act = new QAction(icon("format-text-strikethrough"), tr("Strikethrough"), this);
-    act->setCheckable(true);
-    menu->addAction(act);
-    tool->addAction(act);
-
-    actionTextSup = act = new QAction(icon("format-text-superscript"), tr("Superscript"), this);
-    act->setCheckable(true);
-    menu->addAction(act);
-    tool->addAction(act);
-
-    actionTextSub = act = new QAction(icon("format-text-subscript"), tr("Subscript"), this);
-    act->setCheckable(true);
-    menu->addAction(act);
-    tool->addAction(act);
-
-    menu = menuBar()->addMenu(tr("&View"));
     tool->addSeparator();
 
     QActionGroup * viewGroup = new QActionGroup(this);
@@ -345,34 +270,34 @@ void Fb2MainWindow::createActions()
     connect(act, SIGNAL(triggered()), this, SLOT(viewText()));
     viewGroup->addAction(act);
     menu->addAction(act);
+    tool->addAction(act);
 
     act = new QAction(tr("&Head"), this);
     act->setCheckable(true);
     connect(act, SIGNAL(triggered()), this, SLOT(viewHead()));
     viewGroup->addAction(act);
     menu->addAction(act);
+    tool->addAction(act);
 
     act = new QAction(tr("&XML"), this);
     act->setCheckable(true);
     connect(act, SIGNAL(triggered()), this, SLOT(viewQsci()));
     viewGroup->addAction(act);
     menu->addAction(act);
+    tool->addAction(act);
 
     menu->addSeparator();
 
     actionZoomIn = act = new QAction(icon("zoom-in"), tr("Zoom in"), this);
     act->setShortcuts(QKeySequence::ZoomIn);
     menu->addAction(act);
-    tool->addAction(act);
 
     actionZoomOut = act = new QAction(icon("zoom-out"), tr("Zoom out"), this);
     act->setShortcuts(QKeySequence::ZoomOut);
     menu->addAction(act);
-    tool->addAction(act);
 
     actionZoomOrig = act = new QAction(icon("zoom-original"), tr("Zoom original"), this);
     menu->addAction(act);
-    tool->addAction(act);
 
     menu->addSeparator();
 
@@ -385,7 +310,6 @@ void Fb2MainWindow::createActions()
     menu->addAction(act);
 
     menuBar()->addSeparator();
-
     menu = menuBar()->addMenu(tr("&Help"));
 
     act = new QAction(icon("help-about"), tr("&About"), this);
@@ -432,37 +356,6 @@ void Fb2MainWindow::createHead()
     headTree->setFocus();
 }
 
-void Fb2MainWindow::createText()
-{
-    if (textEdit) return;
-    textEdit = new Fb2WebView(this);
-    setCentralWidget(textEdit);
-    textEdit->setFocus();
-
-    connect(textEdit->page(), SIGNAL(contentsChanged()), SLOT(documentWasModified()));
-    connect(textEdit, SIGNAL(selectionChanged()), SLOT(selectionChanged()));
-    connect(textEdit, SIGNAL(loadFinished(bool)), SLOT(loadFinished(bool)));
-
-    connect(textEdit->pageAction(QWebPage::Undo), SIGNAL(changed()), SLOT(undoChanged()));
-    connect(textEdit->pageAction(QWebPage::Redo), SIGNAL(changed()), SLOT(redoChanged()));
-    connect(actionUndo, SIGNAL(triggered()), textEdit->pageAction(QWebPage::Undo), SIGNAL(triggered()));
-    connect(actionRedo, SIGNAL(triggered()), textEdit->pageAction(QWebPage::Redo), SIGNAL(triggered()));
-
-    connect(actionCut, SIGNAL(triggered()), textEdit->pageAction(QWebPage::Cut), SIGNAL(triggered()));
-    connect(actionCopy, SIGNAL(triggered()), textEdit->pageAction(QWebPage::Copy), SIGNAL(triggered()));
-    connect(actionPaste, SIGNAL(triggered()), textEdit->pageAction(QWebPage::Paste), SIGNAL(triggered()));
-
-    connect(actionTextBold, SIGNAL(triggered()), textEdit->pageAction(QWebPage::ToggleBold), SIGNAL(triggered()));
-    connect(actionTextItalic, SIGNAL(triggered()), textEdit->pageAction(QWebPage::ToggleItalic), SIGNAL(triggered()));
-    connect(actionTextStrike, SIGNAL(triggered()), textEdit->pageAction(QWebPage::ToggleStrikethrough), SIGNAL(triggered()));
-    connect(actionTextSub, SIGNAL(triggered()), textEdit->pageAction(QWebPage::ToggleSubscript), SIGNAL(triggered()));
-    connect(actionTextSup, SIGNAL(triggered()), textEdit->pageAction(QWebPage::ToggleSuperscript), SIGNAL(triggered()));
-
-    connect(actionZoomIn, SIGNAL(triggered()), textEdit, SLOT(zoomIn()));
-    connect(actionZoomOut, SIGNAL(triggered()), textEdit, SLOT(zoomOut()));
-    connect(actionZoomOrig, SIGNAL(triggered()), textEdit, SLOT(zoomOrig()));
-}
-
 void Fb2MainWindow::loadFinished(bool ok)
 {
     if (!treeView) return ;
@@ -473,15 +366,6 @@ void Fb2MainWindow::loadFinished(bool ok)
 
 void Fb2MainWindow::selectionChanged()
 {
-    actionCut->setEnabled(textEdit->CutEnabled());
-    actionCopy->setEnabled(textEdit->CopyEnabled());
-
-    actionTextBold->setChecked(textEdit->BoldChecked());
-    actionTextItalic->setChecked(textEdit->ItalicChecked());
-    actionTextStrike->setChecked(textEdit->StrikeChecked());
-    actionTextSub->setChecked(textEdit->SubChecked());
-    actionTextSup->setChecked(textEdit->SupChecked());
-
 //    QString script = "document.getSelection().baseNode.parentNode.tagName";
 //    qCritical() << textEdit->page()->mainFrame()->evaluateJavaScript(script).toString();
 }
@@ -542,9 +426,6 @@ void Fb2MainWindow::createQsci()
     qsciEdit->setFocus();
 
     //    connect(qsciEdit, SIGNAL(textChanged()), this, SLOT(documentWasModified()));
-
-    actionUndo->setEnabled(false);
-    actionRedo->setEnabled(false);
 }
 
 void Fb2MainWindow::createStatusBar()
@@ -655,12 +536,123 @@ void Fb2MainWindow::viewText()
     if (centralWidget() == textEdit) return;
     FB2DELETE(qsciEdit);
     FB2DELETE(headTree);
-    if (textEdit) {
-        setCentralWidget(textEdit);
-    } else {
-        createText();
+    if (!textEdit) {
+        textEdit = new Fb2WebView(this);
     }
+    setCentralWidget(textEdit);
+    textEdit->setFocus();
     viewTree();
+
+    //    connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged()));
+
+    connect(textEdit->page(), SIGNAL(contentsChanged()), SLOT(documentWasModified()));
+    connect(textEdit, SIGNAL(selectionChanged()), SLOT(selectionChanged()));
+    connect(textEdit, SIGNAL(loadFinished(bool)), SLOT(loadFinished(bool)));
+
+    connect(actionZoomIn, SIGNAL(triggered()), textEdit, SLOT(zoomIn()));
+    connect(actionZoomOut, SIGNAL(triggered()), textEdit, SLOT(zoomOut()));
+    connect(actionZoomOrig, SIGNAL(triggered()), textEdit, SLOT(zoomOrig()));
+
+    menuEdit->clear();
+    menuText->clear();
+
+    FB2DELETE(toolEdit);
+    QToolBar *tool = toolEdit = addToolBar(tr("Edit"));
+    tool->setMovable(false);
+    tool->addSeparator();
+
+    QAction *act;
+    QMenu *menu;
+
+    menu = menuEdit;
+
+    act = textEdit->pageAction(QWebPage::Undo);
+    act->setIcon(icon("edit-undo"));
+    act->setText(tr("&Undo"));
+    act->setPriority(QAction::LowPriority);
+    act->setShortcut(QKeySequence::Undo);
+    menu->addAction(act);
+    tool->addAction(act);
+
+    act = textEdit->pageAction(QWebPage::Redo);
+    act->setIcon(icon("edit-redo"));
+    act->setText(tr("&Redo"));
+    act->setPriority(QAction::LowPriority);
+    act->setShortcut(QKeySequence::Redo);
+    menu->addAction(act);
+    tool->addAction(act);
+
+    menu->addSeparator();
+    tool->addSeparator();
+
+    act = textEdit->pageAction(QWebPage::Cut);
+    act->setIcon(icon("edit-cut"));
+    act->setText(tr("Cu&t"));
+    act->setPriority(QAction::LowPriority);
+    act->setShortcuts(QKeySequence::Cut);
+    act->setStatusTip(tr("Cut the current selection's contents to the clipboard"));
+    menu->addAction(act);
+    tool->addAction(act);
+
+    act = textEdit->pageAction(QWebPage::Copy);
+    act->setIcon(icon("edit-copy"));
+    act->setText(tr("&Copy"));
+    act->setPriority(QAction::LowPriority);
+    act->setShortcuts(QKeySequence::Copy);
+    act->setStatusTip(tr("Copy the current selection's contents to the clipboard"));
+    menu->addAction(act);
+    tool->addAction(act);
+
+    act = textEdit->pageAction(QWebPage::Paste);
+    act->setIcon(icon("edit-paste"));
+    act->setText(tr("&Paste"));
+    act->setPriority(QAction::LowPriority);
+    act->setShortcuts(QKeySequence::Paste);
+    act->setStatusTip(tr("Paste the clipboard's contents into the current selection"));
+    menu->addAction(act);
+    tool->addAction(act);
+
+    tool->addSeparator();
+
+    menu = menuText;
+
+    act = textEdit->pageAction(QWebPage::ToggleBold);
+    act->setIcon(icon("format-text-bold"));
+    act->setText(tr("&Bold"));
+    act->setShortcuts(QKeySequence::Bold);
+    menu->addAction(act);
+    tool->addAction(act);
+
+    act = textEdit->pageAction(QWebPage::ToggleItalic);
+    act->setIcon(icon("format-text-italic"));
+    act->setText(tr("&Italic"));
+    act->setShortcuts(QKeySequence::Italic);
+    menu->addAction(act);
+    tool->addAction(act);
+
+    act = textEdit->pageAction(QWebPage::ToggleStrikethrough);
+    act->setIcon(icon("format-text-strikethrough"));
+    act->setText(tr("&Strikethrough"));
+    menu->addAction(act);
+    tool->addAction(act);
+
+    act = textEdit->pageAction(QWebPage::ToggleSuperscript);
+    act->setIcon(icon("format-text-superscript"));
+    act->setText(tr("Superscript"));
+    menu->addAction(act);
+    tool->addAction(act);
+
+    act = textEdit->pageAction(QWebPage::ToggleSubscript);
+    act->setIcon(icon("format-text-subscript"));
+    act->setText(tr("Subscript"));
+    menu->addAction(act);
+    tool->addAction(act);
+
+    tool->addSeparator();
+
+    tool->addAction(actionZoomIn);
+    tool->addAction(actionZoomOut);
+    tool->addAction(actionZoomOrig);
 }
 
 void Fb2MainWindow::viewHead()
@@ -668,6 +660,9 @@ void Fb2MainWindow::viewHead()
     if (centralWidget() == headTree) return;
     FB2DELETE(dockTree);
     FB2DELETE(qsciEdit);
+    FB2DELETE(toolEdit);
+    menuEdit->clear();
+    menuText->clear();
     createHead();
 }
 
@@ -680,9 +675,11 @@ void Fb2MainWindow::viewTree()
 
 void Fb2MainWindow::clipboardDataChanged()
 {
+/*
     if (const QMimeData *md = QApplication::clipboard()->mimeData()) {
         actionPaste->setEnabled(md->hasText());
     }
+*/
 }
 
 void Fb2MainWindow::showInspector()

+ 7 - 1
source/fb2main.h

@@ -64,7 +64,6 @@ private:
     void init();
     void createHead();
     void createTree();
-    void createText();
     void createQsci();
     void createActions();
     void createStatusBar();
@@ -85,6 +84,13 @@ private:
     QString curFile;
     bool isUntitled;
 
+    QToolBar *toolEdit;
+
+    QMenu
+        *menuEdit,
+        *menuText,
+        *menuView;
+
     QAction
         *actionBack,
         *actionForward,

BIN
source/ts/ru.qm


+ 61 - 53
source/ts/ru.ts

@@ -30,162 +30,170 @@
 <context>
     <name>Fb2MainWindow</name>
     <message>
-        <location filename="../fb2main.cpp" line="69"/>
+        <location filename="../fb2main.cpp" line="70"/>
         <source>Message log</source>
         <translation>Информационные сообщения</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="133"/>
+        <location filename="../fb2main.cpp" line="134"/>
         <source>Open file</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="176"/>
+        <location filename="../fb2main.cpp" line="177"/>
         <source>Save As...</source>
         <translation>Сохранить как...</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="183"/>
+        <location filename="../fb2main.cpp" line="184"/>
         <source>About fb2edit</source>
         <translation>О программе...</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="184"/>
+        <location filename="../fb2main.cpp" line="185"/>
         <source>The &lt;b&gt;fb2edit&lt;/b&gt; is application for editing FB2-files.</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="213"/>
+        <location filename="../fb2main.cpp" line="214"/>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="214"/>
+        <location filename="../fb2main.cpp" line="215"/>
         <source>File</source>
         <translation>Файл</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="217"/>
+        <location filename="../fb2main.cpp" line="218"/>
         <source>&amp;New</source>
         <translation>&amp;Новый</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="220"/>
+        <location filename="../fb2main.cpp" line="221"/>
         <source>Create a new file</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="225"/>
+        <location filename="../fb2main.cpp" line="226"/>
         <source>&amp;Open...</source>
         <translation>&amp;Открыть...</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="227"/>
+        <location filename="../fb2main.cpp" line="228"/>
         <source>Open an existing file</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="232"/>
+        <location filename="../fb2main.cpp" line="233"/>
         <source>&amp;Save</source>
         <translation>&amp;Сохранить</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="234"/>
+        <location filename="../fb2main.cpp" line="235"/>
         <source>Save the document to disk</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="239"/>
+        <location filename="../fb2main.cpp" line="240"/>
         <source>Save &amp;As...</source>
         <translation>Сохрать &amp;как...</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="241"/>
+        <location filename="../fb2main.cpp" line="242"/>
         <source>Save the document under a new name</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="247"/>
+        <location filename="../fb2main.cpp" line="248"/>
         <source>&amp;Close</source>
         <translation>&amp;Закрыть</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="249"/>
+        <location filename="../fb2main.cpp" line="250"/>
         <source>Close this window</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="253"/>
+        <location filename="../fb2main.cpp" line="254"/>
         <source>E&amp;xit</source>
         <translation>&amp;Выход</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="255"/>
+        <location filename="../fb2main.cpp" line="256"/>
         <source>Exit the application</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="259"/>
+        <location filename="../fb2main.cpp" line="260"/>
         <source>&amp;Edit</source>
         <translation>&amp;Правка</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="260"/>
+        <location filename="../fb2main.cpp" line="582"/>
         <source>Edit</source>
         <translation>Правка</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="266"/>
+        <location filename="../fb2main.cpp" line="595"/>
         <source>&amp;Undo</source>
         <translation>&amp;Отменить</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="273"/>
+        <location filename="../fb2main.cpp" line="603"/>
         <source>&amp;Redo</source>
         <translation>&amp;Повторить</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="283"/>
+        <source>Undo</source>
+        <translation>Отменить</translation>
+    </message>
+    <message>
+        <source>Redo</source>
+        <translation>Повторить</translation>
+    </message>
+    <message>
+        <location filename="../fb2main.cpp" line="614"/>
         <source>Cu&amp;t</source>
         <translation>Вы&amp;резать</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="286"/>
+        <location filename="../fb2main.cpp" line="617"/>
         <source>Cut the current selection&apos;s contents to the clipboard</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="291"/>
+        <location filename="../fb2main.cpp" line="623"/>
         <source>&amp;Copy</source>
         <translation>&amp;Копировать</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="294"/>
+        <location filename="../fb2main.cpp" line="626"/>
         <source>Copy the current selection&apos;s contents to the clipboard</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="299"/>
+        <location filename="../fb2main.cpp" line="630"/>
         <source>&amp;Paste</source>
         <translation>&amp;Вставить</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="302"/>
+        <location filename="../fb2main.cpp" line="633"/>
         <source>Paste the clipboard&apos;s contents into the current selection</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="307"/>
+        <location filename="../fb2main.cpp" line="261"/>
         <source>Fo&amp;rmat</source>
         <translation>Фо&amp;рмат</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="379"/>
+        <location filename="../fb2main.cpp" line="300"/>
         <source>&amp;Contents</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="383"/>
+        <location filename="../fb2main.cpp" line="304"/>
         <source>&amp;Web inspector</source>
         <translation type="unfinished"></translation>
     </message>
@@ -194,107 +202,107 @@
         <translation type="obsolete">Формат</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="310"/>
+        <location filename="../fb2main.cpp" line="642"/>
         <source>Bold</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="316"/>
+        <location filename="../fb2main.cpp" line="648"/>
         <source>Italic</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="322"/>
+        <location filename="../fb2main.cpp" line="654"/>
         <source>Strikethrough</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="327"/>
+        <location filename="../fb2main.cpp" line="659"/>
         <source>Superscript</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="332"/>
+        <location filename="../fb2main.cpp" line="664"/>
         <source>Subscript</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="337"/>
+        <location filename="../fb2main.cpp" line="262"/>
         <source>&amp;View</source>
         <translation>&amp;Вид</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="342"/>
+        <location filename="../fb2main.cpp" line="266"/>
         <source>&amp;Text</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="349"/>
+        <location filename="../fb2main.cpp" line="273"/>
         <source>&amp;Head</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="355"/>
+        <location filename="../fb2main.cpp" line="279"/>
         <source>&amp;XML</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="363"/>
+        <location filename="../fb2main.cpp" line="287"/>
         <source>Zoom in</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="368"/>
+        <location filename="../fb2main.cpp" line="291"/>
         <source>Zoom out</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="373"/>
+        <location filename="../fb2main.cpp" line="295"/>
         <source>Zoom original</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="389"/>
+        <location filename="../fb2main.cpp" line="309"/>
         <source>&amp;Help</source>
         <translation>&amp;?</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="391"/>
+        <location filename="../fb2main.cpp" line="311"/>
         <source>&amp;About</source>
         <translation>&amp;О программа...</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="392"/>
+        <location filename="../fb2main.cpp" line="312"/>
         <source>Show the application&apos;s About box</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="396"/>
+        <location filename="../fb2main.cpp" line="316"/>
         <source>About &amp;Qt</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="397"/>
+        <location filename="../fb2main.cpp" line="317"/>
         <source>Show the Qt library&apos;s About box</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="409"/>
+        <location filename="../fb2main.cpp" line="329"/>
         <source>Contents</source>
         <translation>Содержание</translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="552"/>
+        <location filename="../fb2main.cpp" line="465"/>
         <source>Ready</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="576"/>
+        <location filename="../fb2main.cpp" line="489"/>
         <source>The document has been modified. Do you want to save your changes?</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../fb2main.cpp" line="591"/>
+        <location filename="../fb2main.cpp" line="504"/>
         <source>Cannot write file %1: %2.</source>
         <translation></translation>
     </message>