UI/CompareDialog.py

changeset 3034
7ce719013078
parent 3030
4a0a82ddd9d2
child 3039
8dd0165d805d
--- a/UI/CompareDialog.py	Sat Oct 19 12:28:12 2013 +0200
+++ b/UI/CompareDialog.py	Sat Oct 19 13:03:39 2013 +0200
@@ -274,9 +274,9 @@
         self.diffButton.setEnabled(False)
         self.diffButton.hide()
         
-        if type(lines1) == type(""):
+        if isinstance(lines1, str):
             lines1 = lines1.splitlines(True)
-        if type(lines2) == type(""):
+        if isinstance(lines2, str):
             lines2 = lines2.splitlines(True)
         
         self.__compare(lines1, lines2)
@@ -342,13 +342,13 @@
         self.firstButton.setEnabled(False)
         self.upButton.setEnabled(False)
         self.downButton.setEnabled(
-            len(self.diffParas) > 0 and 
+            len(self.diffParas) > 0 and
             (self.vsb1.isVisible() or self.vsb2.isVisible()))
         self.lastButton.setEnabled(
-            len(self.diffParas) > 0 and 
+            len(self.diffParas) > 0 and
             (self.vsb1.isVisible() or self.vsb2.isVisible()))
         
-        self.totalLabel.setText(self.trUtf8('Total: {0}')\
+        self.totalLabel.setText(self.trUtf8('Total: {0}')
                                     .format(added + deleted + changed))
         self.changedLabel.setText(self.trUtf8('Changed: {0}').format(changed))
         self.addedLabel.setText(self.trUtf8('Added: {0}').format(added))

eric ide

mercurial