[meld] ui.findbar: Don't hide the find bar when it loses focus (#477)



commit ed393e0adec483d3dd83d12c0b7520b9c84bc0d5
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Jul 19 09:55:44 2020 +1000

    ui.findbar: Don't hide the find bar when it loses focus (#477)
    
    This was an old UI decision that now feels somewhat dated. Other text
    editors have by-and-large switched to explicit dismissal of the find
    bar using Escape or similar, which we support. Removing this handling
    just removes the behaviour of hiding the find bar when the user clicks
    away from it, which feels nicer to use.

 meld/ui/findbar.py | 10 ----------
 1 file changed, 10 deletions(-)
---
diff --git a/meld/ui/findbar.py b/meld/ui/findbar.py
index 8d95a3d9..66d88c1b 100644
--- a/meld/ui/findbar.py
+++ b/meld/ui/findbar.py
@@ -52,9 +52,6 @@ class FindBar(Gtk.Grid):
         self.notify_id = None
         self.set_text_view(None)
 
-        # Setup a signal for when the find bar loses focus
-        parent.connect('set-focus-child', self.on_focus_child)
-
         # Create and bind our GtkSourceSearchSettings
         settings = GtkSource.SearchSettings()
         self.match_case.bind_property('active', settings, 'case-sensitive')
@@ -72,13 +69,6 @@ class FindBar(Gtk.Grid):
             'replace_mode', self, 'row-spacing', GObject.BindingFlags.DEFAULT,
             lambda binding, replace_mode: 6 if replace_mode else 0)
 
-    def on_focus_child(self, container, widget):
-        if widget is not None:
-            visible = self.props.visible
-            if widget is not self and visible:
-                self.hide()
-        return False
-
     def hide(self):
         self.set_text_view(None)
         self.wrap_box.set_visible(False)


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