106 |
108 |
107 self.cancelled = False |
109 self.cancelled = False |
108 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
110 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
109 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True) |
111 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True) |
110 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
112 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
|
113 self.checkProgress.setVisible(True) |
111 QApplication.processEvents() |
114 QApplication.processEvents() |
112 |
115 |
113 if isinstance(fn, list): |
116 if isinstance(fn, list): |
114 files = fn |
117 files = fn |
115 elif os.path.isdir(fn): |
118 elif os.path.isdir(fn): |
129 if f.endswith( |
132 if f.endswith( |
130 tuple(Preferences.getPython("PythonExtensions")))] |
133 tuple(Preferences.getPython("PythonExtensions")))] |
131 |
134 |
132 if len(py3files) + len(py2files) > 0: |
135 if len(py3files) + len(py2files) > 0: |
133 self.checkProgress.setMaximum(len(py3files) + len(py2files)) |
136 self.checkProgress.setMaximum(len(py3files) + len(py2files)) |
|
137 self.checkProgressLabel.setVisible( |
|
138 len(py3files) + len(py2files) > 1) |
134 QApplication.processEvents() |
139 QApplication.processEvents() |
135 |
140 |
136 # now go through all the files |
141 # now go through all the files |
137 progress = 0 |
142 progress = 0 |
138 for file in py3files + py2files: |
143 for file in py3files + py2files: |
197 self.trUtf8('No indentation errors found.'), "", "") |
202 self.trUtf8('No indentation errors found.'), "", "") |
198 QApplication.processEvents() |
203 QApplication.processEvents() |
199 self.resultList.header().resizeSections(QHeaderView.ResizeToContents) |
204 self.resultList.header().resizeSections(QHeaderView.ResizeToContents) |
200 self.resultList.header().setStretchLastSection(True) |
205 self.resultList.header().setStretchLastSection(True) |
201 |
206 |
|
207 self.checkProgress.setVisible(False) |
|
208 |
202 def on_buttonBox_clicked(self, button): |
209 def on_buttonBox_clicked(self, button): |
203 """ |
210 """ |
204 Private slot called by a button of the button box clicked. |
211 Private slot called by a button of the button box clicked. |
205 |
212 |
206 @param button button that was clicked (QAbstractButton) |
213 @param button button that was clicked (QAbstractButton) |