Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2791
a9577f248f04
parent 3008
7848489bcb92
child 3058
0a02c433f52d
diff -r 9986ec0e559a -r 10516539f238 Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py
--- a/Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py	Fri Oct 18 23:00:41 2013 +0200
@@ -15,9 +15,10 @@
 
 import os
 
-from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, Qt, QRegExp, QCoreApplication
-from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \
-    QLineEdit
+from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, Qt, QRegExp, \
+    QCoreApplication
+from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, \
+    QTreeWidgetItem, QLineEdit
 
 from E5Gui import E5MessageBox
 
@@ -130,7 +131,8 @@
     
     def __finish(self):
         """
-        Private slot called when the process finished or the user pressed the button.
+        Private slot called when the process finished or the user pressed
+        the button.
         """
         if self.process is not None and \
            self.process.state() != QProcess.NotRunning:
@@ -144,7 +146,8 @@
         self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
         self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
         self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
-        self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason)
+        self.buttonBox.button(QDialogButtonBox.Close).setFocus(
+            Qt.OtherFocusReason)
         
         self.process = None
         
@@ -188,7 +191,8 @@
         """
         Private method to resize the list columns.
         """
-        self.signaturesList.header().resizeSections(QHeaderView.ResizeToContents)
+        self.signaturesList.header().resizeSections(
+            QHeaderView.ResizeToContents)
         self.signaturesList.header().setStretchLastSection(True)
     
     def __generateItem(self, revision, changeset, signature):
@@ -203,7 +207,8 @@
             QTreeWidgetItem(self.signaturesList, [signature])
         else:
             revString = "{0:>7}:{1}".format(revision, changeset)
-            topItems = self.signaturesList.findItems(revString, Qt.MatchExactly)
+            topItems = self.signaturesList.findItems(
+                revString, Qt.MatchExactly)
             if len(topItems) == 0:
                 # first signature for this changeset
                 topItm = QTreeWidgetItem(self.signaturesList, [
@@ -285,7 +290,8 @@
         """
         Private slot to verify the signatures of the selected revision.
         """
-        rev = self.signaturesList.selectedItems()[0].text(0).split(":")[0].strip()
+        rev = self.signaturesList.selectedItems()[0].text(0)\
+            .split(":")[0].strip()
         self.vcs.getExtensionObject("gpg")\
             .hgGpgVerifySignatures(self.__path, rev)
     
@@ -314,13 +320,15 @@
         searchRxText = self.rxEdit.text()
         filterTop = self.categoryCombo.currentText() == self.trUtf8("Revision")
         if filterTop and searchRxText.startswith("^"):
-            searchRx = QRegExp("^\s*{0}".format(searchRxText[1:]), Qt.CaseInsensitive)
+            searchRx = QRegExp(
+                "^\s*{0}".format(searchRxText[1:]), Qt.CaseInsensitive)
         else:
             searchRx = QRegExp(searchRxText, Qt.CaseInsensitive)
         for topIndex in range(self.signaturesList.topLevelItemCount()):
             topLevelItem = self.signaturesList.topLevelItem(topIndex)
             if filterTop:
-                topLevelItem.setHidden(searchRx.indexIn(topLevelItem.text(0)) == -1)
+                topLevelItem.setHidden(
+                    searchRx.indexIn(topLevelItem.text(0)) == -1)
             else:
                 visibleChildren = topLevelItem.childCount()
                 for childIndex in range(topLevelItem.childCount()):

eric ide

mercurial