Implement buffer search UI.

This commit is contained in:
Bill Dengler 2015-06-24 12:45:14 -07:00
parent 54a3805626
commit f7325a8f36
2 changed files with 9 additions and 2 deletions

View File

@ -417,7 +417,14 @@ class Controller(object):
search.timer.start() search.timer.start()
dlg.Destroy() 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() page = self.get_current_buffer()
if not hasattr(page.buffer, "list"): 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) output.speak(_(u"No session is currently in focus. Focus a session with the next or previous session shortcut."), True)

View File

@ -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