From 0eb58cff843a5778a668955f00d445e4062f4b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Stadler?= Date: Tue, 11 Dec 2007 11:38:45 +0200 Subject: [PATCH] Restore search to a consistent state when showing the search bar again --- debug-viewer/GstDebugViewer/Plugins/FindBar.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debug-viewer/GstDebugViewer/Plugins/FindBar.py b/debug-viewer/GstDebugViewer/Plugins/FindBar.py index 050542789c..3c61e031a7 100644 --- a/debug-viewer/GstDebugViewer/Plugins/FindBar.py +++ b/debug-viewer/GstDebugViewer/Plugins/FindBar.py @@ -288,6 +288,7 @@ class FindBarFeature (FeatureBase): if action.props.active: self.bar.show () self.bar.entry.grab_focus () + self.update_search () else: try: column = self.window.column_manager.find_item (name = "message") @@ -346,8 +347,12 @@ class FindBarFeature (FeatureBase): def handle_entry_changed (self, entry): + self.update_search () + + def update_search (self): + model = self.log_view.props.model - search_text = entry.props.text + search_text = self.bar.entry.props.text column = self.window.column_manager.find_item (name = "message") if search_text == "": self.logger.debug ("search string set to '', aborting search")