95 self.__ui.replaceAllButton.setIcon( |
95 self.__ui.replaceAllButton.setIcon( |
96 EricPixmapCache.getIcon("editReplaceAll") |
96 EricPixmapCache.getIcon("editReplaceAll") |
97 ) |
97 ) |
98 |
98 |
99 for dataFormat in formatOrder: |
99 for dataFormat in formatOrder: |
100 formatStr, validator = self.__formatAndValidators[dataFormat] |
100 formatStr, _validator = self.__formatAndValidators[dataFormat] |
101 self.__ui.findFormatCombo.addItem(formatStr, dataFormat) |
101 self.__ui.findFormatCombo.addItem(formatStr, dataFormat) |
102 if replace: |
102 if replace: |
103 for dataFormat in formatOrder: |
103 for dataFormat in formatOrder: |
104 formatStr, validator = self.__formatAndValidators[dataFormat] |
104 formatStr, _validator = self.__formatAndValidators[dataFormat] |
105 self.__ui.replaceFormatCombo.addItem(formatStr, dataFormat) |
105 self.__ui.replaceFormatCombo.addItem(formatStr, dataFormat) |
106 |
106 |
107 self.__ui.findtextCombo.setCompleter(None) |
107 self.__ui.findtextCombo.setCompleter(None) |
108 self.__ui.findtextCombo.lineEdit().returnPressed.connect( |
108 self.__ui.findtextCombo.lineEdit().returnPressed.connect( |
109 self.__findByReturnPressed |
109 self.__findByReturnPressed |
375 and not self.__ui.replaceSearchButton.isEnabled() |
375 and not self.__ui.replaceSearchButton.isEnabled() |
376 ): |
376 ): |
377 return |
377 return |
378 |
378 |
379 fba, ftxt = self.__getContent(False) |
379 fba, ftxt = self.__getContent(False) |
380 rba, rtxt = self.__getContent(True) |
380 rba, _rtxt = self.__getContent(True) |
381 |
381 |
382 ok = False |
382 ok = False |
383 if self.__editor.hasSelection(): |
383 if self.__editor.hasSelection(): |
384 # we did a successful search before |
384 # we did a successful search before |
385 startIdx = self.__editor.getSelectionBegin() |
385 startIdx = self.__editor.getSelectionBegin() |
400 replacements = 0 |
400 replacements = 0 |
401 |
401 |
402 cursorPosition = self.__editor.cursorPosition() |
402 cursorPosition = self.__editor.cursorPosition() |
403 |
403 |
404 fba, ftxt = self.__getContent(False) |
404 fba, ftxt = self.__getContent(False) |
405 rba, rtxt = self.__getContent(True) |
405 rba, _rtxt = self.__getContent(True) |
406 |
406 |
407 idx = 0 |
407 idx = 0 |
408 while idx >= 0: |
408 while idx >= 0: |
409 idx = self.__editor.indexOf(fba, idx) |
409 idx = self.__editor.indexOf(fba, idx) |
410 if idx >= 0: |
410 if idx >= 0: |