OSDN Git Service

Merge branch 'develop' version0.1.2
authoryuki <kimaira7@gmail.com>
Thu, 23 May 2013 10:54:08 +0000 (19:54 +0900)
committeryuki <kimaira7@gmail.com>
Thu, 23 May 2013 10:54:08 +0000 (19:54 +0900)
src/cx/fbn/nevernote/gui/RensoNoteList.java
src/cx/fbn/nevernote/sql/DatabaseConnection.java

index 6afc49f..c5d97a6 100644 (file)
@@ -75,12 +75,12 @@ public class RensoNoteList extends QListWidget {
                openNewTabAction.setToolTip(tr("Open this note in new tab"));
                openNewTabAction.triggered.connect(parent, "openNewTabFromRNL()");
                // スターをつけるアクション生成
-               starAction = new QAction(tr("STAR"), this);
-               starAction.setToolTip(tr("Star this item"));
+               starAction = new QAction(tr("Add Star"), this);
+               starAction.setToolTip(tr("Add Star to this item"));
                starAction.triggered.connect(parent, "starNote()");
                // スターを外すアクション生成
-               unstarAction = new QAction(tr("UNSTAR"), this);
-               unstarAction.setToolTip(tr("Unstar this item"));
+               unstarAction = new QAction(tr("Remove Star"), this);
+               unstarAction.setToolTip(tr("Remove Star from this item"));
                unstarAction.triggered.connect(parent, "unstarNote()");
                // このノートを除外するアクション生成
                excludeNoteAction = new QAction(tr("Exclude"), this);
index 72caf26..ef314b5 100644 (file)
@@ -209,6 +209,62 @@ public class DatabaseConnection {
        }
        
        public void upgradeDb(String version) {
+               if (version.equals("0.85")) {
+                       executeSql("alter table note add column titleColor integer");
+                       executeSql("alter table note add column thumbnail blob");
+                       executeSql("alter table note add column thumbnailneeded boolean");
+                       executeSql("Update note set thumbnailneeded = true;");
+                       executeSql("create index NOTE_NOTEBOOK_INDEX on note (notebookguid, guid);");
+                       executeSql("create index NOTETAGS_TAG_INDEX on notetags (tagguid, noteguid);");
+                       version = "0.86";
+                       Global.setDatabaseVersion(version);
+               } 
+               if (version.equals("0.86")) {
+       
+                       executeSql("alter table notebook add column publishingUri VarChar");
+                       executeSql("alter table notebook add column publishingOrder Integer");
+                       executeSql("alter table notebook add column publishingAscending Boolean");
+                       executeSql("alter table notebook add column publishingPublicDescription varchar");
+                       executeSql("alter table notebook add column stack varchar");
+                       executeSql("alter table notebook add column icon blob");
+                       executeSql("alter table notebook add column readOnly boolean");
+                       executeSql("alter table notebook add column linked boolean");
+                       
+                       executeSql("alter table tag add column realname varchar");
+                       executeSql("alter table tag add column linked boolean");
+                       executeSql("alter table tag add column icon blob");
+                       executeSql("alter table tag add column notebookguid varchar");
+                       executeSql("alter table SavedSearch add column icon blob");
+
+                       executeSql("create index NOTE_THUMBNAIL_INDEX on note (thumbnailneeded, guid);");
+                       executeSql("create index NOTE_EXPUNGED_INDEX on note (isExpunged, guid);");
+                       executeSql("create index NOTE_DUEDATE_INDEX on note (attributeSubjectDate, guid);");
+                       executeSql("create index TAG_NOTEBOOK_INDEX on tag (notebookGuid);");
+                       
+                       executeSql("update note set thumbnailneeded=true, thumbnail=null;");
+                       executeSql("update notebook set publishingUri='', " +
+                                       "publishingAscending=false, stack='', readonly=false, publishingOrder=1, " +
+                                       "publishingPublicDescription='', linked=false");
+                       executeSql("update tag set linked=false, realname='', notebookguid=''");
+                       
+                       sharedNotebookTable.createTable();
+                       linkedNotebookTable.createTable();
+                       systemIconTable.createTable();
+                       inkImagesTable.createTable();
+                       
+                       version = "0.95";
+                       executeSql("Insert into Sync (key, value) values ('FullNotebookSync', 'true')");
+                       executeSql("Insert into Sync (key, value) values ('FullLinkedNotebookSync', 'true')");
+                       executeSql("Insert into Sync (key, value) values ('FullSharedNotebookSync', 'true')");
+                       executeSql("Insert into Sync (key, value) values ('FullInkNoteImageSync', 'true')");
+                       Global.setDatabaseVersion(version);
+               } 
+               if (version.equals("0.95")) {
+                       if (dbTableExists("words"))
+                               executeSql("Drop table words;");
+                       if (dbTableExists("NoteResources"))
+                               executeSql("Drop table NoteResources;");
+               }
                if (!dbTableColumnExists("NOTE", "ORIGINAL_GUID")) {
                        executeSql("alter table note add column ORIGINAL_GUID VarChar");
                        executeSql("create index NOTE_ORIGINAL_GUID_INDEX on note (original_guid, guid);");