Fixed issues in the syntax checker and indentation checker dialogs. Py2 comp.

Sat, 14 Dec 2013 22:56:13 +0100

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Sat, 14 Dec 2013 22:56:13 +0100
branch
Py2 comp.
changeset 3143
b6ee3ac90a6f
parent 3142
55030c09e142
child 3144
bb63e24383e4

Fixed issues in the syntax checker and indentation checker dialogs.

Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py file | annotate | diff | comparison | revisions
Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.ui file | annotate | diff | comparison | revisions
Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py file | annotate | diff | comparison | revisions
Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.ui file | annotate | diff | comparison | revisions
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py	Fri Dec 13 23:39:14 2013 +0100
+++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py	Sat Dec 14 22:56:13 2013 +0100
@@ -63,6 +63,8 @@
         self.filterFrame.setVisible(False)
         
         self.checkProgress.setVisible(False)
+        self.checkProgressLabel.setVisible(False)
+        self.checkProgressLabel.setMaximumWidth(600)
         
     def __resort(self):
         """
@@ -161,12 +163,15 @@
         
         if codestring or len(files) > 0:
             self.checkProgress.setMaximum(max(1, len(files)))
+            self.checkProgress.setVisible(len(files) > 1)
+            self.checkProgressLabel.setVisible(len(files) > 1)
             QApplication.processEvents()
             
             # now go through all the files
             progress = 0
             for file in files:
                 self.checkProgress.setValue(progress)
+                self.checkProgressLabel.setPath(file)
                 QApplication.processEvents()
                 self.__resort()
                 
@@ -220,6 +225,7 @@
 
                 progress += 1
             self.checkProgress.setValue(progress)
+            self.checkProgressLabel.setPath("")
             QApplication.processEvents()
             self.__resort()
         else:
@@ -248,6 +254,7 @@
         self.resultList.header().setStretchLastSection(True)
         
         self.checkProgress.setVisible(False)
+        self.checkProgressLabel.setVisible(False)
         
     def on_buttonBox_clicked(self, button):
         """
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.ui	Fri Dec 13 23:39:14 2013 +0100
+++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.ui	Sat Dec 14 22:56:13 2013 +0100
@@ -103,6 +103,19 @@
     </widget>
    </item>
    <item>
+    <widget class="E5SqueezeLabelPath" name="checkProgressLabel">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item>
     <widget class="QProgressBar" name="checkProgress">
      <property name="toolTip">
       <string>Shows the progress of the syntax check action</string>
@@ -134,6 +147,11 @@
  <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
  <customwidgets>
   <customwidget>
+   <class>E5SqueezeLabelPath</class>
+   <extends>QLabel</extends>
+   <header>E5Gui/E5SqueezeLabels.h</header>
+  </customwidget>
+  <customwidget>
    <class>E5ClearableLineEdit</class>
    <extends>QLineEdit</extends>
    <header>E5Gui/E5LineEdit.h</header>
--- a/Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py	Fri Dec 13 23:39:14 2013 +0100
+++ b/Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py	Sat Dec 14 22:56:13 2013 +0100
@@ -56,6 +56,8 @@
         self.filterFrame.setVisible(False)
         
         self.checkProgress.setVisible(False)
+        self.checkProgressLabel.setVisible(False)
+        self.checkProgressLabel.setMaximumWidth(600)
         
     def __resort(self):
         """
@@ -131,12 +133,15 @@
         
         if len(files) > 0:
             self.checkProgress.setMaximum(len(files))
+            self.checkProgress.setVisible(len(files) > 1)
+            self.checkProgressLabel.setVisible(len(files) > 1)
             QApplication.processEvents()
             
             # now go through all the files
             progress = 0
             for file in files:
                 self.checkProgress.setValue(progress)
+                self.checkProgressLabel.setPath(file)
                 QApplication.processEvents()
                 self.__resort()
                 
@@ -162,6 +167,7 @@
                 progress += 1
                 
             self.checkProgress.setValue(progress)
+            self.checkProgressLabel.setPath("")
             QApplication.processEvents()
             self.__resort()
         else:
@@ -186,6 +192,7 @@
         self.resultList.header().setStretchLastSection(True)
         
         self.checkProgress.setVisible(False)
+        self.checkProgressLabel.setVisible(False)
         
     def on_buttonBox_clicked(self, button):
         """
--- a/Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.ui	Fri Dec 13 23:39:14 2013 +0100
+++ b/Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.ui	Sat Dec 14 22:56:13 2013 +0100
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>650</width>
-    <height>350</height>
+    <height>400</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -109,6 +109,19 @@
     </widget>
    </item>
    <item>
+    <widget class="E5SqueezeLabelPath" name="checkProgressLabel">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item>
     <widget class="QProgressBar" name="checkProgress">
      <property name="toolTip">
       <string>Shows the progress of the tabnanny action</string>
@@ -140,6 +153,11 @@
  <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
  <customwidgets>
   <customwidget>
+   <class>E5SqueezeLabelPath</class>
+   <extends>QLabel</extends>
+   <header>E5Gui/E5SqueezeLabels.h</header>
+  </customwidget>
+  <customwidget>
    <class>E5ClearableLineEdit</class>
    <extends>QLineEdit</extends>
    <header>E5Gui/E5LineEdit.h</header>

eric ide

mercurial