OSDN Git Service

Altered sync complete message to notify user if errors happened during the sync.
authorRandy Baumgarte <randy@fbn.cx>
Thu, 2 Sep 2010 20:46:34 +0000 (16:46 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Tue, 14 Sep 2010 10:23:41 +0000 (06:23 -0400)
src/cx/fbn/nevernote/NeverNote.java
src/cx/fbn/nevernote/threads/SyncRunner.java

index 692fb9b..037418a 100644 (file)
@@ -4130,7 +4130,10 @@ public class NeverNote extends QMainWindow{
                refreshEvernoteNote(false);
                scrollToGuid(currentNoteGuid);
                waitCursor(false);
-               setMessage(tr("Synchronization Complete"));
+               if (!syncRunner.error)
+                       setMessage(tr("Synchronization Complete"));
+               else
+                       setMessage(tr("Synchronization completed with errors.  Please check the log for details."));
                logger.log(logger.MEDIUM, "Sync complete.");
        }   
        public void saveUploadAmount(long t) {
index 040f91d..525545e 100644 (file)
@@ -67,7 +67,7 @@ public class SyncRunner extends QObject implements Runnable {
        private final ApplicationLogger logger;\r
                private DatabaseConnection              conn;\r
                private boolean                                 idle;\r
-               private boolean                                 error;\r
+               public boolean                                  error;\r
                public volatile boolean                 isConnected;\r
                public volatile boolean                 keepRunning;\r
                public volatile String                  authToken;\r
@@ -339,7 +339,7 @@ public class SyncRunner extends QObject implements Runnable {
                                syncSignal.refreshLists.emit();\r
                        if (!error) {\r
                                logger.log(logger.EXTREME, "Sync completed.  Errors=" +error);\r
-                               if (!disableUploads)\r
+                               if (!disableUploads) \r
                                        status.message.emit(tr("Synchronizing complete"));\r
                                else\r
                                        status.message.emit(tr("Download syncronization complete.  Uploads have been disabled."));\r
@@ -1402,7 +1402,7 @@ public class SyncRunner extends QObject implements Runnable {
 //                     syncSignal.authRefreshComplete.emit(false);\r
 //             }\r
     }\r
-       \r
+    \r
        public synchronized boolean addWork(String request) {\r
                if (workQueue.offer(request))\r
                        return true;\r