Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py

changeset 3091
8239cae3f947
parent 3036
30c81c9e88b8
child 3137
59d9f8c238f0
child 3142
55030c09e142
equal deleted inserted replaced
3090:3d3b4cb0dfc3 3091:8239cae3f947
49 49
50 self.__fileList = [] 50 self.__fileList = []
51 self.__project = None 51 self.__project = None
52 self.filterFrame.setVisible(False) 52 self.filterFrame.setVisible(False)
53 53
54 self.checkProgress.setVisible(False)
55
54 def __resort(self): 56 def __resort(self):
55 """ 57 """
56 Private method to resort the tree. 58 Private method to resort the tree.
57 """ 59 """
58 self.resultList.sortItems( 60 self.resultList.sortItems(
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)

eric ide

mercurial