From f7325a8f3606fef6326309b2995448a4f48af955 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Wed, 24 Jun 2015 12:45:14 -0700 Subject: [PATCH] Implement buffer search UI. --- src/controller/mainController.py | 9 ++++++++- src/wxUI/dialogs/__init__.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 95f9f168..e658b4f2 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -417,7 +417,14 @@ class Controller(object): search.timer.start() dlg.Destroy() - def find(self, string=None): + def find(self, string=''): + dlg = dialogs.find.findDialog(string) + if dlg.get_response() == widgetUtils.OK and dlg.get("string") != "": + string = dlg.get("string") + #If we still have an empty string for some reason (I.E. user clicked cancel, etc), return here. + if string == '': + log.debug("Find canceled.") + return page = self.get_current_buffer() if not hasattr(page.buffer, "list"): output.speak(_(u"No session is currently in focus. Focus a session with the next or previous session shortcut."), True) diff --git a/src/wxUI/dialogs/__init__.py b/src/wxUI/dialogs/__init__.py index 6e018d3c..cbf0d2da 100644 --- a/src/wxUI/dialogs/__init__.py +++ b/src/wxUI/dialogs/__init__.py @@ -1 +1 @@ -import baseDialog, trends, configuration, lists, message, search, show_user, update_profile, urlList, userSelection, utils +import baseDialog, trends, configuration, lists, message, search, find, show_user, update_profile, urlList, userSelection, utils