OSDN Git Service

Correct problem parsing notes where carriage returns did not separate some XML lines...
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / Global.java
index 5ae003b..0090c4d 100644 (file)
@@ -46,7 +46,7 @@ import cx.fbn.nevernote.gui.ShortcutKeys;
 import cx.fbn.nevernote.utilities.ApplicationLogger;\r
 \r
 public class Global {\r
-       public static String version = "0.88";\r
+       public static String version = "0.90";\r
     public static String username = ""; \r
     public static String password = "";     \r
     \r
@@ -112,14 +112,11 @@ public class Global {
        public static String attachmentNameDelimeter = "------";\r
        \r
        public static String    databaseName = new String("NeverNote");\r
-       public static String    indexDatabaseName = new String("IndexDatabase.db");\r
        public static DateAttributeFilterTable createdSinceFilter;\r
        public static DateAttributeFilterTable createdBeforeFilter;\r
        public static DateAttributeFilterTable changedSinceFilter;\r
        public static DateAttributeFilterTable changedBeforeFilter;\r
        public static ContainsAttributeFilterTable containsFilter;\r
-//     public static DBLock                            dbLock;\r
-//     public static DBLock                            indexLock;\r
        public static ApplicationLogger    logger;\r
        PrintStream stdoutStream;\r
        public static QPalette                          originalPalette;\r
@@ -142,14 +139,14 @@ public class Global {
         settings = new QSettings("fbn.cx", startupConfig.getName());\r
         disableViewing = startupConfig.getDisableViewing();\r
 \r
-        fileManager = new FileManager(startupConfig.getHomeDirPath());\r
+        fileManager = new FileManager(startupConfig.getHomeDirPath(), startupConfig.getProgramDirPath());\r
 \r
 \r
                        getServer();\r
                        settings.beginGroup("General");\r
                        String regex = (String) settings.value("regex", "[,\\s]+");\r
                        setWordRegex(regex);\r
-                       String wordString = settings.value("wordLength", "4").toString();\r
+                       String wordString = settings.value("minimumWordLength", "4").toString();\r
                        Integer wordLen = new Integer(wordString);\r
                        Global.minimumWordCount = wordLen;\r
                        settings.endGroup();\r
@@ -161,8 +158,6 @@ public class Global {
                        keepRunning = true;\r
                        disableUploads = disableUploads();\r
                        enableCarriageReturnFix = enableCarriageReturnFix();\r
-//                     dbLock = new DBLock();\r
-//                     indexLock = new DBLock();\r
                        logger = new ApplicationLogger("global.log");\r
                        shortcutKeys = new ShortcutKeys();\r
                        mimicEvernoteInterface = getMimicEvernoteInterface();\r
@@ -508,6 +503,23 @@ public class Global {
                        settings.setValue("pdfPreview", "false");\r
                settings.endGroup();\r
     }\r
+    public static boolean newNoteWithSelectedTags() {\r
+               settings.beginGroup("General");\r
+               String text = (String)settings.value("newNoteWithSelectedTags", "false");\r
+               settings.endGroup();\r
+               if (text.equalsIgnoreCase("true"))\r
+                       return true;\r
+               else\r
+                       return false;\r
+    }\r
+    public static void setNewNoteWithSelectedTags(boolean val) {\r
+               settings.beginGroup("General");\r
+               if (val)\r
+                       settings.setValue("newNoteWithSelectedTags", "true");\r
+               else\r
+                       settings.setValue("newNoteWithSelectedTags", "false");\r
+               settings.endGroup();\r
+    }\r
     public static void setMinimumWordLength(int len) {\r
                settings.beginGroup("General");\r
                settings.setValue("minimumWordLength", len);\r