[meld] Implemented incremental search



commit 53647d5c8c8213c5ecf120adadfada3f808ff13d
Author: Robert Roth <robert roth off gmail com>
Date:   Sat Jun 28 01:22:46 2014 +0300

    Implemented incremental search
    
    https://bugzilla.gnome.org/show_bug.cgi?id=699486

 meld/filediff.py   |    2 ++
 meld/ui/findbar.py |    5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 5ebe330..162c509 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -395,6 +395,8 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
             if event.keyval == Gdk.KEY_Escape:
                 self.findbar.hide()
         elif event.type == Gdk.EventType.KEY_RELEASE:
+            if event.keyval == Gdk.KEY_Return and self.keymask & MASK_SHIFT:
+                self.findbar.start_find_previous(self.focus_pane)
             self.keymask &= ~mod_key
 
     def on_style_updated(self, widget):
diff --git a/meld/ui/findbar.py b/meld/ui/findbar.py
index 135f8f7..ceb8d78 100644
--- a/meld/ui/findbar.py
+++ b/meld/ui/findbar.py
@@ -61,14 +61,14 @@ class FindBar(gnomeglade.Component):
     def start_find_next(self, textview):
         self.textview = textview
         if self.find_entry.get_text():
-            self.find_next_button.activate()
+            self.on_find_next_button_clicked(self.find_next_button)
         else:
             self.start_find(self.textview)
 
     def start_find_previous(self, textview, text=None):
         self.textview = textview
         if self.find_entry.get_text():
-            self.find_previous_button.activate()
+            self.on_find_previous_button_clicked(self.find_previous_button)
         else:
             self.start_find(self.textview)
 
@@ -121,6 +121,7 @@ class FindBar(gnomeglade.Component):
     def on_find_entry_changed(self, entry):
         entry.override_background_color(Gtk.StateType.NORMAL,
                                         self.orig_base_color)
+        self._find_text(0)
 
     def _find_text(self, start_offset=1, backwards=False, wrap=True):
         match_case = self.match_case.get_active()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]