浏览代码

Rename file: fb2tool => fb2utils

Kandrashin Denis 13 年之前
父节点
当前提交
4f5ee292a8
共有 9 个文件被更改,包括 11 次插入13 次删除
  1. 1 0
      CMakeLists.txt
  2. 4 4
      fb2edit.pro
  3. 0 3
      source/fb2note.ui
  4. 2 2
      source/fb2tree.cpp
  5. 1 1
      source/fb2utils.cpp
  6. 0 0
      source/fb2utils.h
  7. 2 2
      source/fb2view.cpp
  8. 二进制
      source/ts/ru.qm
  9. 1 1
      source/ts/ru.ts

+ 1 - 0
CMakeLists.txt

@@ -28,6 +28,7 @@ file( GLOB FB2_TSS  source/ts/*.ts   )
 
 set(FB2_RES
     3rdparty/gnome/gnome.qrc
+    source/js/javascript.qrc
     source/res/fb2edit.qrc
 )
 

+ 4 - 4
fb2edit.pro

@@ -10,8 +10,8 @@ HEADERS = \
     source/fb2temp.hpp \
     source/fb2tree.hpp \
     source/fb2view.hpp \
-    source/fb2tool.h \
-    source/fb2note.hpp
+    source/fb2note.hpp \
+    source/fb2utils.h
 
 SOURCES = \
     source/fb2app.cpp \
@@ -25,8 +25,8 @@ SOURCES = \
     source/fb2view.cpp \
     source/fb2xml.cpp \
     source/fb2xml2.cpp \
-    source/fb2tool.cpp \
-    source/fb2note.cpp
+    source/fb2note.cpp \
+    source/fb2utils.cpp
 
 RESOURCES = \
     3rdparty/gnome/gnome.qrc \

+ 0 - 3
source/fb2note.ui

@@ -22,9 +22,6 @@
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
-     <property name="editable">
-      <bool>true</bool>
-     </property>
     </widget>
    </item>
    <item row="3" column="0" colspan="2">

+ 2 - 2
source/fb2tree.cpp

@@ -7,7 +7,7 @@
 #include <QTreeView>
 #include <QUrl>
 
-#include "fb2tool.h"
+#include "fb2utils.h"
 
 Fb2TreeItem::Fb2TreeItem(QWebElement &element, Fb2TreeItem *parent)
     : QObject(parent)
@@ -192,7 +192,7 @@ void Fb2TreeModel::select(const QModelIndex &index)
     QWebFrame *frame = m_view.page()->mainFrame();
     if (node) frame->scroll(0, node->pos().y() - frame->scrollPosition().y());
 
-    static QString setCursor = FB2::read(":/js/set_cursor.js");
+    static const QString setCursor = FB2::read(":/js/set_cursor.js");
     QString javascript = QString("var element=%1;").arg(node->selector()) + setCursor;
     frame->evaluateJavaScript(javascript);
 

+ 1 - 1
source/fb2tool.cpp → source/fb2utils.cpp

@@ -1,4 +1,4 @@
-#include "fb2tool.h"
+#include "fb2utils.h"
 
 #include <QFile>
 #include <QTextStream>

+ 0 - 0
source/fb2tool.h → source/fb2utils.h


+ 2 - 2
source/fb2view.cpp

@@ -2,7 +2,7 @@
 #include "fb2note.hpp"
 #include "fb2read.hpp"
 #include "fb2save.h"
-#include "fb2tool.h"
+#include "fb2utils.h"
 #include "fb2xml2.h"
 
 #include <QAction>
@@ -266,7 +266,7 @@ void Fb2WebView::execCommand(const QString &cmd, const QString &arg)
 
 QString Fb2WebView::status()
 {
-    static QString javascript = FB2::read(":/js/get_status.js");
+    static const QString javascript = FB2::read(":/js/get_status.js");
     return page()->mainFrame()->evaluateJavaScript(javascript).toString();
     return QString();
 }

二进制
source/ts/ru.qm


+ 1 - 1
source/ts/ru.ts

@@ -382,7 +382,7 @@
     <name>Fb2NoteDlg</name>
     <message>
         <source>&lt;create new&gt;</source>
-        <translation>&lt;создать новую&gt;</translation>
+        <translation>&lt;создать новый&gt;</translation>
     </message>
 </context>
 <context>