VCS/StatusMonitorLed.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3013
fe886b7f8f40
child 3145
a9de05d4a22f
--- a/VCS/StatusMonitorLed.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/VCS/StatusMonitorLed.py	Fri Oct 18 23:00:41 2013 +0200
@@ -4,7 +4,8 @@
 #
 
 """
-Module implementing a LED to indicate the status of the VCS status monitor thread.
+Module implementing a LED to indicate the status of the VCS status monitor
+thread.
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
@@ -19,7 +20,8 @@
 
 class StatusMonitorLed(E5Led):
     """
-    Class implementing a LED to indicate the status of the VCS status monitor thread.
+    Class implementing a LED to indicate the status of the VCS status monitor
+    thread.
     """
     def __init__(self, project, parent):
         """
@@ -45,9 +47,9 @@
         self.setWhatsThis(self.trUtf8(
             """<p>This LED indicates the operating"""
             """ status of the VCS monitor thread (off = monitoring off,"""
-            """ green = monitoring on and ok, red = monitoring on, but not ok,"""
-            """ yellow = checking VCS status). A status description is given"""
-            """ in the tooltip.</p>"""
+            """ green = monitoring on and ok, red = monitoring on, but"""
+            """ not ok, yellow = checking VCS status). A status description"""
+            """ is given in the tooltip.</p>"""
         ))
         self.setToolTip(
             self.trUtf8("Repository status checking is switched off")
@@ -56,33 +58,37 @@
         
         # define a context menu
         self.__menu = QMenu(self)
-        self.__checkAct = \
-            self.__menu.addAction(self.trUtf8("Check status"), self.__checkStatus)
-        self.__intervalAct = \
-            self.__menu.addAction(self.trUtf8("Set interval..."), self.__setInterval)
+        self.__checkAct = self.__menu.addAction(
+            self.trUtf8("Check status"), self.__checkStatus)
+        self.__intervalAct = self.__menu.addAction(
+            self.trUtf8("Set interval..."), self.__setInterval)
         self.__menu.addSeparator()
-        self.__onAct = \
-            self.__menu.addAction(self.trUtf8("Switch on"), self.__switchOn)
-        self.__offAct = \
-            self.__menu.addAction(self.trUtf8("Switch off"), self.__switchOff)
+        self.__onAct = self.__menu.addAction(
+            self.trUtf8("Switch on"), self.__switchOn)
+        self.__offAct = self.__menu.addAction(
+            self.trUtf8("Switch off"), self.__switchOff)
         self.__checkActions()
         
         # connect signals to our slots
         self.setContextMenuPolicy(Qt.CustomContextMenu)
         self.customContextMenuRequested.connect(self._showContextMenu)
-        self.project.vcsStatusMonitorStatus.connect(self.__projectVcsMonitorStatus)
+        self.project.vcsStatusMonitorStatus.connect(
+            self.__projectVcsMonitorStatus)
     
     def __checkActions(self):
         """
         Private method to set the enabled status of the context menu actions.
         """
         if self.project.pudata["VCSSTATUSMONITORINTERVAL"]:
-            vcsStatusMonitorInterval = self.project.pudata["VCSSTATUSMONITORINTERVAL"][0]
+            vcsStatusMonitorInterval = \
+                self.project.pudata["VCSSTATUSMONITORINTERVAL"][0]
         else:
-            vcsStatusMonitorInterval = Preferences.getVCS("StatusMonitorInterval")
+            vcsStatusMonitorInterval = \
+                Preferences.getVCS("StatusMonitorInterval")
         self.__checkAct.setEnabled(self.__on)
         self.__intervalAct.setEnabled(self.__on)
-        self.__onAct.setEnabled((not self.__on) and vcsStatusMonitorInterval > 0)
+        self.__onAct.setEnabled(
+            (not self.__on) and vcsStatusMonitorInterval > 0)
         self.__offAct.setEnabled(self.__on)
         
     def __projectVcsMonitorStatus(self, status, statusMsg):

eric ide

mercurial