Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

annotate, manifestdialog: use wrapped Scintilla.find()

Changeset 54a35fccf995

Parent 3c518e80868f

by Yuya Nishihara

Changes to 2 files · Browse files at 54a35fccf995 Showing diff from parent 3c518e80868f Diff from another changeset...

 
299
300
301
302
303
304
305
306
307
308
309
 
392
393
394
395
396
 
 
397
398
399
 
432
433
434
435
 
436
437
 
438
439
440
 
485
486
487
488
 
489
490
491
 
299
300
301
 
 
 
 
 
302
303
304
 
387
388
389
 
 
390
391
392
393
394
 
427
428
429
 
430
431
 
432
433
434
435
 
480
481
482
 
483
484
485
486
@@ -299,11 +299,6 @@
  def prevMatch(self):   pass # XXX   - @pyqtSlot(unicode, bool, bool) - def searchText(self, match, icase=False, wrap=False): - """Search text matching to the givne regexp pattern [unicode]""" - self.findFirst(match, True, not icase, False, wrap) -   @pyqtSlot(unicode, bool)   def highlightText(self, match, icase=False):   """Highlight text matching to the given regexp pattern [unicode] @@ -392,8 +387,8 @@
  conditionChanged = pyqtSignal(unicode, bool, bool)   """Emitted (pattern, icase, wrap) when search condition changed"""   - searchRequested = pyqtSignal(unicode, bool, bool) - """Emitted (pattern, icase, wrap) when search button pressed""" + searchRequested = pyqtSignal(unicode, bool, bool, bool) + """Emitted (pattern, icase, wrap, forward) when requested"""     def __init__(self, parent=None, hidable=False):   super(SearchToolBar, self).__init__(_('Search'), parent, @@ -432,9 +427,9 @@
  self.wrapAround())     @pyqtSlot() - def _emitSearchRequested(self): + def _emitSearchRequested(self, forward=True):   self.searchRequested.emit(self.pattern(), self.caseInsensitive(), - self.wrapAround()) + self.wrapAround(), forward)     def pattern(self):   """Returns the current search pattern [unicode]""" @@ -485,7 +480,7 @@
  self._searchbar = SearchToolBar()   self.addToolBar(self._searchbar)   self._searchbar.setPattern(hglib.tounicode(opts.get('pattern', ''))) - self._searchbar.searchRequested.connect(self.av.searchText) + self._searchbar.searchRequested.connect(self.av.find)   self._searchbar.conditionChanged.connect(self.av.highlightText)   av.searchRequested.connect(self._searchbar.search)  
 
163
164
165
166
167
168
 
 
 
169
170
171
 
312
313
314
315
 
316
317
318
 
163
164
165
 
 
 
166
167
168
169
170
171
 
312
313
314
 
315
316
317
318
@@ -163,9 +163,9 @@
  """Return toolbar for manifest widget"""   return self._toolbar   - @pyqtSlot(unicode, bool, bool) - def searchText(self, pattern, icase=False, wrap=False): - self._fileview.searchText(pattern, icase, wrap) + @pyqtSlot(unicode, bool, bool, bool) + def find(self, pattern, icase=False, wrap=False, forward=True): + return self._fileview.find(pattern, icase, wrap, forward)     @pyqtSlot(unicode, bool)   def highlightText(self, pattern, icase=False): @@ -312,7 +312,7 @@
 def connectsearchbar(manifestwidget, searchbar):   """Connect searchbar to manifest widget"""   searchbar.conditionChanged.connect(manifestwidget.highlightText) - searchbar.searchRequested.connect(manifestwidget.searchText) + searchbar.searchRequested.connect(manifestwidget.find)   manifestwidget.searchRequested.connect(searchbar.search)    def _openineditor(repo, path, rev, line=None, pattern=None, parent=None):