diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-30 00:40:28 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-30 00:40:28 (GMT) |
| commit | 259fc2bcf75d754af043a5d3fa39b6ee0c0b1dec (patch) | |
| tree | f0fe2c14499345121371bba0ecc3fe21d17e0953 /src/search/SearchController.cpp | |
| parent | fe329e9127ebcb8c89c505c4c120e175810d280c (diff) | |
| download | powder-259fc2bcf75d754af043a5d3fa39b6ee0c0b1dec.zip powder-259fc2bcf75d754af043a5d3fa39b6ee0c0b1dec.tar.gz | |
ASCII for key events, save and Textarea (no caret, yet)
Diffstat (limited to 'src/search/SearchController.cpp')
| -rw-r--r-- | src/search/SearchController.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index efd33ac..6fa9748 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -21,7 +21,9 @@ public: SearchController::SearchController(ControllerCallback * callback): activePreview(NULL), - HasExited(false) + HasExited(false), + nextQueryTime(0.0f), + nextQueryDone(true) { searchModel = new SearchModel(); searchView = new SearchView(); @@ -43,6 +45,11 @@ Save * SearchController::GetLoadedSave() void SearchController::Update() { + if(!nextQueryDone && nextQueryTime < clock()) + { + nextQueryDone = true; + searchModel->UpdateSaveList(1, nextQuery); + } searchModel->Update(); if(activePreview && activePreview->HasExited) { @@ -79,7 +86,10 @@ SearchController::~SearchController() void SearchController::DoSearch(std::string query) { - searchModel->UpdateSaveList(1, query); + nextQuery = query; + nextQueryTime = clock()+(0.6 * CLOCKS_PER_SEC); + nextQueryDone = false; + //searchModel->UpdateSaveList(1, query); } void SearchController::PrevPage() |
