Helpviewer/Sync/SyncCheckPage.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3002
6ffc581f00f1
child 3145
a9de05d4a22f
diff -r 9986ec0e559a -r 10516539f238 Helpviewer/Sync/SyncCheckPage.py
--- a/Helpviewer/Sync/SyncCheckPage.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Helpviewer/Sync/SyncCheckPage.py	Fri Oct 18 23:00:41 2013 +0200
@@ -58,7 +58,8 @@
         elif Preferences.getHelp("SyncType") == SyncGlobals.SyncTypeDirectory:
             self.handlerLabel.setText(self.trUtf8("Shared Directory"))
             self.infoLabel.setText(self.trUtf8("Directory:"))
-            self.infoDataLabel.setText(Preferences.getHelp("SyncDirectoryPath"))
+            self.infoDataLabel.setText(
+                Preferences.getHelp("SyncDirectoryPath"))
         else:
             self.handlerLabel.setText(self.trUtf8("No Synchronization"))
             self.hostLabel.setText("")
@@ -70,11 +71,15 @@
         self.speedDialMsgLabel.setText("")
         
         if not syncMgr.syncEnabled():
-            self.bookmarkLabel.setPixmap(UI.PixmapCache.getPixmap("syncNo.png"))
+            self.bookmarkLabel.setPixmap(
+                UI.PixmapCache.getPixmap("syncNo.png"))
             self.historyLabel.setPixmap(UI.PixmapCache.getPixmap("syncNo.png"))
-            self.passwordsLabel.setPixmap(UI.PixmapCache.getPixmap("syncNo.png"))
-            self.userAgentsLabel.setPixmap(UI.PixmapCache.getPixmap("syncNo.png"))
-            self.speedDialLabel.setPixmap(UI.PixmapCache.getPixmap("syncNo.png"))
+            self.passwordsLabel.setPixmap(
+                UI.PixmapCache.getPixmap("syncNo.png"))
+            self.userAgentsLabel.setPixmap(
+                UI.PixmapCache.getPixmap("syncNo.png"))
+            self.speedDialLabel.setPixmap(
+                UI.PixmapCache.getPixmap("syncNo.png"))
             return
         
         animationFile = os.path.join(getConfig("ericPixDir"), "loading.gif")
@@ -83,7 +88,8 @@
         if Preferences.getHelp("SyncBookmarks"):
             self.__makeAnimatedLabel(animationFile, self.bookmarkLabel)
         else:
-            self.bookmarkLabel.setPixmap(UI.PixmapCache.getPixmap("syncNo.png"))
+            self.bookmarkLabel.setPixmap(
+                UI.PixmapCache.getPixmap("syncNo.png"))
         
         # history
         if Preferences.getHelp("SyncHistory"):
@@ -95,21 +101,25 @@
         if Preferences.getHelp("SyncPasswords"):
             self.__makeAnimatedLabel(animationFile, self.passwordsLabel)
         else:
-            self.passwordsLabel.setPixmap(UI.PixmapCache.getPixmap("syncNo.png"))
+            self.passwordsLabel.setPixmap(
+                UI.PixmapCache.getPixmap("syncNo.png"))
         
         # user agent settings
         if Preferences.getHelp("SyncUserAgents"):
             self.__makeAnimatedLabel(animationFile, self.userAgentsLabel)
         else:
-            self.userAgentsLabel.setPixmap(UI.PixmapCache.getPixmap("syncNo.png"))
+            self.userAgentsLabel.setPixmap(
+                UI.PixmapCache.getPixmap("syncNo.png"))
         
         # speed dial settings
         if Preferences.getHelp("SyncSpeedDial"):
             self.__makeAnimatedLabel(animationFile, self.speedDialLabel)
         else:
-            self.speedDialLabel.setPixmap(UI.PixmapCache.getPixmap("syncNo.png"))
+            self.speedDialLabel.setPixmap(
+                UI.PixmapCache.getPixmap("syncNo.png"))
         
-        QTimer.singleShot(0, lambda: syncMgr.loadSettings(forceUpload=forceUpload))
+        QTimer.singleShot(
+            0, lambda: syncMgr.loadSettings(forceUpload=forceUpload))
     
     def __makeAnimatedLabel(self, fileName, label):
         """
@@ -146,7 +156,8 @@
         Private slot to handle a finished synchronization event.
         
         @param type_ type of the synchronization event (string one
-            of "bookmarks", "history", "passwords", "useragents" or "speeddial")
+            of "bookmarks", "history", "passwords", "useragents" or
+            "speeddial")
         @param status flag indicating success (boolean)
         @param download flag indicating a download of a file (boolean)
         """
@@ -155,30 +166,36 @@
                 self.bookmarkLabel.setPixmap(
                     UI.PixmapCache.getPixmap("syncCompleted.png"))
             else:
-                self.bookmarkLabel.setPixmap(UI.PixmapCache.getPixmap("syncFailed.png"))
+                self.bookmarkLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("syncFailed.png"))
         elif type_ == "history":
             if status:
-                self.historyLabel.setPixmap(UI.PixmapCache.getPixmap("syncCompleted.png"))
+                self.historyLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("syncCompleted.png"))
             else:
-                self.historyLabel.setPixmap(UI.PixmapCache.getPixmap("syncFailed.png"))
+                self.historyLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("syncFailed.png"))
         elif type_ == "passwords":
             if status:
                 self.passwordsLabel.setPixmap(
                     UI.PixmapCache.getPixmap("syncCompleted.png"))
             else:
-                self.passwordsLabel.setPixmap(UI.PixmapCache.getPixmap("syncFailed.png"))
+                self.passwordsLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("syncFailed.png"))
         elif type_ == "useragents":
             if status:
                 self.userAgentsLabel.setPixmap(
                     UI.PixmapCache.getPixmap("syncCompleted.png"))
             else:
-                self.userAgentsLabel.setPixmap(UI.PixmapCache.getPixmap("syncFailed.png"))
+                self.userAgentsLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("syncFailed.png"))
         elif type_ == "speeddial":
             if status:
                 self.speedDialLabel.setPixmap(
                     UI.PixmapCache.getPixmap("syncCompleted.png"))
             else:
-                self.speedDialLabel.setPixmap(UI.PixmapCache.getPixmap("syncFailed.png"))
+                self.speedDialLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("syncFailed.png"))
     
     def __syncError(self, message):
         """
@@ -187,5 +204,5 @@
         @param message error message (string)
         """
         self.syncErrorLabel.show()
-        self.syncErrorLabel.setText(
-            self.trUtf8('<font color="#FF0000"><b>Error:</b> {0}</font>').format(message))
+        self.syncErrorLabel.setText(self.trUtf8(
+            '<font color="#FF0000"><b>Error:</b> {0}</font>').format(message))

eric ide

mercurial