OSDN Git Service

Merge branch 'japaneseSearch' into develop
authoryuki <kimaira7@gmail.com>
Mon, 2 Sep 2013 08:29:20 +0000 (17:29 +0900)
committeryuki <kimaira7@gmail.com>
Mon, 2 Sep 2013 08:29:20 +0000 (17:29 +0900)
Conflicts:
.classpath
src/cx/fbn/nevernote/dialog/ConfigDialog.java

1  2 
.classpath
src/cx/fbn/nevernote/Global.java
src/cx/fbn/nevernote/NeverNote.java
src/cx/fbn/nevernote/dialog/ConfigDialog.java

diff --cc .classpath
@@@ -2,8 -2,7 +2,7 @@@
  <classpath>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 -      <classpathentry kind="lib" path="lib/evernote-api-1.20.jar"/>
 +      <classpathentry kind="lib" path="lib/evernote-api-1.25.0.jar"/>
-       <classpathentry kind="lib" path="lib/h2-1.3.158.jar"/>
        <classpathentry kind="lib" path="lib/libthrift.jar"/>
        <classpathentry kind="lib" path="lib/log4j-1.2.14.jar"/>
        <classpathentry kind="lib" path="lib/commons-lang3-3.0.jar"/>
Simple merge
Simple merge
@@@ -41,9 -41,11 +41,11 @@@ import com.trolltech.qt.gui.QListWidget
  import com.trolltech.qt.gui.QPushButton;\r
  import com.trolltech.qt.gui.QStackedWidget;\r
  import com.trolltech.qt.gui.QVBoxLayout;\r
 -import com.trolltech.qt.gui.QWidget;\r
  \r
  import cx.fbn.nevernote.Global;\r
 +import cx.fbn.nevernote.NeverNote;\r
+ import cx.fbn.nevernote.sql.DatabaseConnection;\r
+ import cx.fbn.nevernote.sql.driver.NSqlQuery;\r
  public class ConfigDialog extends QDialog {\r
        private final QListWidget                               contentsWidget;\r
        private final ConfigFontPage                    fontPage;\r
        private final ConfigAppearancePage              appearancePage;\r
        private final ConfigSpellPage                   spellPage;\r
        private final ConfigIndexPage                   indexPage;\r
 -      // ICHANGED\r
 -      private final ConfigRensoNoteListPage           rensoNoteListPage;\r
 +      private final ConfigRensoNoteListPage   rensoNoteListPage;\r
 +      private final NeverNote                                 parent;\r
+       private final DatabaseConnection conn;\r
        \r
--    private final String iconPath = new String("classpath:cx/fbn/nevernote/icons/");\r
--      \r
-       public ConfigDialog(NeverNote parent) {\r
 -      public ConfigDialog(QWidget parent, DatabaseConnection conn) {\r
++      private final String iconPath = new String("classpath:cx/fbn/nevernote/icons/");\r
++    \r
++      public ConfigDialog(NeverNote parent, DatabaseConnection conn) {\r
 +              this.parent = parent;\r
+               this.conn = conn;\r
                \r
                contentsWidget = new QListWidget(this);\r
                setWindowIcon(new QIcon(iconPath+"config.png"));\r
                Global.setBrowseWeight(rensoNoteListPage.getBrowseWeight());\r
                Global.setCopyPasteWeight(rensoNoteListPage.getCopyPasteWeight());\r
                Global.setAddNewNoteWeight(rensoNoteListPage.getAddNewNoteWeight());\r
--              Global.setRensoItemClickWeight(rensoNoteListPage.getRensoItemClickWeight());
--              Global.setSameTagWeight(rensoNoteListPage.getSameTagWeight());
++              Global.setRensoItemClickWeight(rensoNoteListPage.getRensoItemClickWeight());\r
++              Global.setSameTagWeight(rensoNoteListPage.getSameTagWeight());\r
                Global.setSameNotebookWeight(rensoNoteListPage.getSameNotebookWeight());\r
 +              Global.setENRelatedNotesWeight(rensoNoteListPage.getENRelatedNotesWeight());\r
                \r
                // ICHANGED\r
                Global.setMergeRensoNote(rensoNoteListPage.getMergeChecked());\r
                Global.setVerifyExclude(rensoNoteListPage.getVerifyExcludeChecked());\r
                Global.setRensoListItemMaximum(rensoNoteListPage.getRensoListItemMaximum());\r
                \r
 +              // 連想ノートリストをリフレッシュ\r
 +              parent.getRensoNoteList().refreshRensoNoteList(parent.getCurrentNoteGuid());\r
 +              \r
+               // 全文検索の対象項目を再設定\r
+               NSqlQuery nQuery = new NSqlQuery(conn.getConnection());\r
+               NSqlQuery rQuery = new NSqlQuery(conn.getResourceConnection()); \r
+               // カラム単位で削除できないので一度全部消す\r
+               nQuery.exec("CALL FTL_DROP_ALL();");\r
+               rQuery.exec("CALL FTL_DROP_ALL();");\r
+               // 再構築\r
+               Global.rebuildFullTextNoteTarget(conn);\r
+               Global.rebuildFullTextResourceTarget(conn);\r
+               \r
                close();\r
        }\r
        \r