Forráskód Böngészése

Create title action

Kandrashin Denis 12 éve
szülő
commit
def2b74da5

BIN
3rdparty/gnome/16x16/format-justify-center.png


BIN
3rdparty/gnome/16x16/utilities-terminal.png


BIN
3rdparty/gnome/24x24/format-justify-center.png


BIN
3rdparty/gnome/24x24/utilities-terminal.png


+ 6 - 62
3rdparty/gnome/gnome.qrc

@@ -1,65 +1,5 @@
 <RCC>
     <qresource prefix="/">
-        <file>16x16/application-exit.png</file>
-        <file>16x16/document-new.png</file>
-        <file>16x16/document-open.png</file>
-        <file>16x16/document-properties.png</file>
-        <file>16x16/document-save.png</file>
-        <file>16x16/edit-copy.png</file>
-        <file>16x16/edit-cut.png</file>
-        <file>16x16/edit-find.png</file>
-        <file>16x16/edit-find-replace.png</file>
-        <file>16x16/edit-paste.png</file>
-        <file>16x16/edit-redo.png</file>
-        <file>16x16/edit-undo.png</file>
-        <file>16x16/format-text-bold.png</file>
-        <file>16x16/format-text-italic.png</file>
-        <file>16x16/format-text-strikethrough.png</file>
-        <file>16x16/go-down.png</file>
-        <file>16x16/go-next.png</file>
-        <file>16x16/go-previous.png</file>
-        <file>16x16/go-up.png</file>
-        <file>16x16/insert-image.png</file>
-        <file>16x16/insert-link.png</file>
-        <file>16x16/insert-object.png</file>
-        <file>16x16/insert-text.png</file>
-        <file>16x16/list-add.png</file>
-        <file>16x16/list-remove.png</file>
-        <file>16x16/preferences-desktop.png</file>
-        <file>16x16/window-close.png</file>
-        <file>16x16/zoom-in.png</file>
-        <file>16x16/zoom-original.png</file>
-        <file>16x16/zoom-out.png</file>
-        <file>24x24/application-exit.png</file>
-        <file>24x24/document-new.png</file>
-        <file>24x24/document-open.png</file>
-        <file>24x24/document-properties.png</file>
-        <file>24x24/document-save.png</file>
-        <file>24x24/edit-copy.png</file>
-        <file>24x24/edit-cut.png</file>
-        <file>24x24/edit-find.png</file>
-        <file>24x24/edit-find-replace.png</file>
-        <file>24x24/edit-paste.png</file>
-        <file>24x24/edit-redo.png</file>
-        <file>24x24/edit-undo.png</file>
-        <file>24x24/format-text-bold.png</file>
-        <file>24x24/format-text-italic.png</file>
-        <file>24x24/format-text-strikethrough.png</file>
-        <file>24x24/go-down.png</file>
-        <file>24x24/go-next.png</file>
-        <file>24x24/go-previous.png</file>
-        <file>24x24/go-up.png</file>
-        <file>24x24/insert-image.png</file>
-        <file>24x24/insert-link.png</file>
-        <file>24x24/insert-object.png</file>
-        <file>24x24/insert-text.png</file>
-        <file>24x24/list-add.png</file>
-        <file>24x24/list-remove.png</file>
-        <file>24x24/preferences-desktop.png</file>
-        <file>24x24/window-close.png</file>
-        <file>24x24/zoom-in.png</file>
-        <file>24x24/zoom-original.png</file>
-        <file>24x24/zoom-out.png</file>
         <file>16x16/application-exit.png</file>
         <file>16x16/document-new.png</file>
         <file>16x16/document-open.png</file>
@@ -68,8 +8,8 @@
         <file>16x16/edit-clear.png</file>
         <file>16x16/edit-copy.png</file>
         <file>16x16/edit-cut.png</file>
-        <file>16x16/edit-find.png</file>
         <file>16x16/edit-find-replace.png</file>
+        <file>16x16/edit-find.png</file>
         <file>16x16/edit-paste.png</file>
         <file>16x16/edit-redo.png</file>
         <file>16x16/edit-undo.png</file>
@@ -101,8 +41,8 @@
         <file>24x24/edit-clear.png</file>
         <file>24x24/edit-copy.png</file>
         <file>24x24/edit-cut.png</file>
-        <file>24x24/edit-find.png</file>
         <file>24x24/edit-find-replace.png</file>
+        <file>24x24/edit-find.png</file>
         <file>24x24/edit-paste.png</file>
         <file>24x24/edit-redo.png</file>
         <file>24x24/edit-undo.png</file>
@@ -126,5 +66,9 @@
         <file>24x24/zoom-in.png</file>
         <file>24x24/zoom-original.png</file>
         <file>24x24/zoom-out.png</file>
+        <file>16x16/format-justify-center.png</file>
+        <file>24x24/format-justify-center.png</file>
+        <file>16x16/utilities-terminal.png</file>
+        <file>24x24/utilities-terminal.png</file>
     </qresource>
 </RCC>

+ 6 - 2
source/fb2main.cpp

@@ -429,10 +429,9 @@ void FbMainWindow::createActions()
     act->setCheckable(true);
     menu->addAction(act);
 
-    actionTextCode = act = new QAction(tr("&Code"), this);
+    actionTextCode = act = new QAction(FbIcon("utilities-terminal"), tr("&Code"), this);
     act->setCheckable(true);
     menu->addAction(act);
-    act->setEnabled(false);
 
     menu->addSeparator();
 
@@ -442,6 +441,9 @@ void FbMainWindow::createActions()
     actionSectionDel = act = new FbTextAction(FbIcon("format-indent-less"), tr("Remove section"), QWebPage::ToggleSubscript, this);
     menu->addAction(act);
 
+    actionTextTitle = act = new FbTextAction(FbIcon("format-justify-center"), tr("Make title"), QWebPage::ToggleSubscript, this);
+    menu->addAction(act);
+
     menuView = menu = menuBar()->addMenu(tr("&View"));
 
     tool->addSeparator();
@@ -722,6 +724,7 @@ void FbMainWindow::createTextToolbar()
 
     connect(actionSectionAdd, SIGNAL(triggered()), textPage, SLOT(createSection()));
     connect(actionSectionDel, SIGNAL(triggered()), textPage, SLOT(deleteSection()));
+    connect(actionTextTitle, SIGNAL(triggered()), textPage, SLOT(createTitle()));
 
     connect(actionZoomIn, SIGNAL(triggered()), textEdit, SLOT(zoomIn()));
     connect(actionZoomOut, SIGNAL(triggered()), textEdit, SLOT(zoomOut()));
@@ -737,6 +740,7 @@ void FbMainWindow::createTextToolbar()
     tool->addSeparator();
     tool->addAction(actionSectionAdd);
     tool->addAction(actionSectionDel);
+    tool->addAction(actionTextTitle);
 
     tool->addSeparator();
     tool->addAction(actionImage);

+ 1 - 0
source/fb2main.hpp

@@ -149,6 +149,7 @@ private:
         *actionTextCode,
         *actionTextSub,
         *actionTextSup,
+        *actionTextTitle,
         *actionSectionAdd,
         *actionSectionDel,
         *actionContents,

+ 4 - 0
source/fb2text.cpp

@@ -303,6 +303,10 @@ void FbTextPage::deleteSection()
     }
 }
 
+void FbTextPage::createTitle()
+{
+}
+
 FbTextElement FbTextPage::current()
 {
     return element(location());

+ 1 - 0
source/fb2text.hpp

@@ -92,6 +92,7 @@ public slots:
     void insertDate();
     void createSection();
     void deleteSection();
+    void createTitle();
 
 protected:
     virtual bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type);

BIN
source/ts/ru.qm


+ 45 - 20
source/ts/ru.ts

@@ -1,25 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
 <TS version="2.0" language="ru_RU">
-<context>
-    <name>Dialog</name>
-    <message>
-        <source>Dialog</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Tab 1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Tab 2</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>TextLabel</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
 <context>
     <name>FbAuthorDlg</name>
     <message>
@@ -462,7 +443,7 @@
     </message>
     <message>
         <source>Settings</source>
-        <translation>Настройки</translation>
+        <translation type="obsolete">Настройки</translation>
     </message>
     <message>
         <source>&amp;Bold</source>
@@ -560,6 +541,23 @@
         <source>Paste (no style)</source>
         <translation>Вставить простой текст</translation>
     </message>
+    <message>
+        <source>Simple text</source>
+        <translation>Простой текст</translation>
+    </message>
+    <message>
+        <source>Create section</source>
+        <translation>Создать секцию</translation>
+    </message>
+    <message>
+        <source>Remove section</source>
+        <translation>Удалить секцию</translation>
+    </message>
+    <message>
+        <source>Make title</source>
+        <translatorcomment>Стиль: Заголовок</translatorcomment>
+        <translation>Заголовок</translation>
+    </message>
 </context>
 <context>
     <name>FbNodeDlg</name>
@@ -621,6 +619,29 @@
         <translation type="unfinished"></translation>
     </message>
 </context>
+<context>
+    <name>FbSetup</name>
+    <message>
+        <source>Settings</source>
+        <translation type="unfinished">Настройки</translation>
+    </message>
+    <message>
+        <source>Tab 1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Default font:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Style file name:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Tab 2</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
 <context>
     <name>FbTextEdit</name>
     <message>
@@ -850,5 +871,9 @@
         <source>Unknown image format: %1</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>Clear format</source>
+        <translation type="unfinished">&amp;Очистить формат</translation>
+    </message>
 </context>
 </TS>