UI/FindFileDialog.py

changeset 42
23b45a742e17
parent 13
1af94a91f439
child 45
9a18f4dbb493
equal deleted inserted replaced
41:572a009369f0 42:23b45a742e17
368 try: 368 try:
369 f = open(fn, 'r') 369 f = open(fn, 'r')
370 text = f.read() 370 text = f.read()
371 lines = text.splitlines() 371 lines = text.splitlines()
372 f.close() 372 f.close()
373 except IOError: 373 except (IOError, UnicodeError):
374 progress += 1 374 progress += 1
375 self.findProgress.setValue(progress) 375 self.findProgress.setValue(progress)
376 continue 376 continue
377 377
378 # now perform the search and display the lines found 378 # now perform the search and display the lines found
407 407
408 QApplication.processEvents() 408 QApplication.processEvents()
409 409
410 progress += 1 410 progress += 1
411 self.findProgress.setValue(progress) 411 self.findProgress.setValue(progress)
412
413 if not files:
414 self.findProgress.setMaximum(1)
415 self.findProgress.setValue(1)
412 416
413 self.findProgressLabel.setPath("") 417 self.findProgressLabel.setPath("")
414 418
415 self.findList.setUpdatesEnabled(True) 419 self.findList.setUpdatesEnabled(True)
416 self.findList.sortItems(self.findList.sortColumn(), 420 self.findList.sortItems(self.findList.sortColumn(),

eric ide

mercurial