114 and so on.</td></tr> |
114 and so on.</td></tr> |
115 <tr><td><code>+</code></td> |
115 <tr><td><code>+</code></td> |
116 <td>This matches 1 or more times. For example, <code>Sa+m</code> matches |
116 <td>This matches 1 or more times. For example, <code>Sa+m</code> matches |
117 <code>Sam</code>, <code>Saam</code>, <code>Saaam</code> and so on.</td></tr> |
117 <code>Sam</code>, <code>Saam</code>, <code>Saaam</code> and so on.</td></tr> |
118 </table> |
118 </table> |
119 """) |
119 """) # __IGNORE_WARNING__ |
120 self.setWhatsThis(whatsThis) |
120 self.setWhatsThis(whatsThis) |
121 |
121 |
122 self.ui.closeButton.setIcon(UI.PixmapCache.getIcon("close.png")) |
122 self.ui.closeButton.setIcon(UI.PixmapCache.getIcon("close.png")) |
123 self.ui.findPrevButton.setIcon( |
123 self.ui.findPrevButton.setIcon( |
124 UI.PixmapCache.getIcon("1leftarrow.png")) |
124 UI.PixmapCache.getIcon("1leftarrow.png")) |
422 ok = True |
422 ok = True |
423 break |
423 break |
424 else: |
424 else: |
425 ok = False |
425 ok = False |
426 elif (lineFrom == boundary[0] and indexFrom >= boundary[1]) or \ |
426 elif (lineFrom == boundary[0] and indexFrom >= boundary[1]) or \ |
427 (lineFrom > boundary[0] and lineFrom < boundary[2]) or \ |
427 (lineFrom > boundary[0] and lineFrom < boundary[2]) or \ |
428 (lineFrom == boundary[2] and indexFrom <= boundary[3]): |
428 (lineFrom == boundary[2] and indexFrom <= boundary[3]): |
429 ok = True |
429 ok = True |
430 else: |
430 else: |
431 ok = False |
431 ok = False |
432 if not ok and len(self.__selections) > 1: |
432 if not ok and len(self.__selections) > 1: |
433 # try again |
433 # try again |
434 while not ok and \ |
434 while not ok and \ |
435 ((backwards and lineFrom >= boundary[0]) or |
435 ((backwards and lineFrom >= boundary[0]) or |
436 (not backwards and lineFrom <= boundary[2])): |
436 (not backwards and lineFrom <= boundary[2])): |
437 for ind in range(len(self.__selections)): |
437 for ind in range(len(self.__selections)): |
438 if lineFrom == self.__selections[ind][0]: |
438 if lineFrom == self.__selections[ind][0]: |
439 after = indexTo > self.__selections[ind][3] |
439 after = indexTo > self.__selections[ind][3] |
440 if backwards: |
440 if backwards: |
441 if after: |
441 if after: |
756 |
756 |
757 if found: |
757 if found: |
758 E5MessageBox.information( |
758 E5MessageBox.information( |
759 self, self.windowTitle(), |
759 self, self.windowTitle(), |
760 self.trUtf8("Replaced {0} occurrences.") |
760 self.trUtf8("Replaced {0} occurrences.") |
761 .format(replacements)) |
761 .format(replacements)) |
762 else: |
762 else: |
763 E5MessageBox.information( |
763 E5MessageBox.information( |
764 self, self.windowTitle(), |
764 self, self.windowTitle(), |
765 self.trUtf8("Nothing replaced because '{0}' was not found.") |
765 self.trUtf8("Nothing replaced because '{0}' was not found.") |
766 .format(ftxt)) |
766 .format(ftxt)) |
767 |
767 |
768 aw.setCursorPosition(cline, cindex) |
768 aw.setCursorPosition(cline, cindex) |
769 aw.ensureCursorVisible() |
769 aw.ensureCursorVisible() |
770 |
770 |
771 self.__finding = False |
771 self.__finding = False |