summaryrefslogtreecommitdiff
path: root/src/search
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-09-13 21:39:01 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-13 21:39:01 (GMT)
commit5b52ac3675f08f9f16f44f530df8877ad6c64f2e (patch)
treed1b087ac413010f4248ddb4f6cb07a9f3f7ebbe3 /src/search
parenta11cd592cb9b985298dd16be78dec10226bf3e47 (diff)
downloadpowder-5b52ac3675f08f9f16f44f530df8877ad6c64f2e.zip
powder-5b52ac3675f08f9f16f44f530df8877ad6c64f2e.tar.gz
Save history and new multiline formatter
Diffstat (limited to 'src/search')
-rw-r--r--src/search/SearchController.cpp8
-rw-r--r--src/search/SearchController.h1
-rw-r--r--src/search/SearchView.cpp2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp
index 2c6b78f..7930b65 100644
--- a/src/search/SearchController.cpp
+++ b/src/search/SearchController.cpp
@@ -181,6 +181,14 @@ void SearchController::OpenSave(int saveID)
ui::Engine::Ref().ShowWindow(activePreview->GetView());
}
+void SearchController::OpenSave(int saveID, int saveDate)
+{
+ if(activePreview)
+ delete activePreview;
+ activePreview = new PreviewController(saveID, saveDate, new OpenCallback(this));
+ ui::Engine::Ref().ShowWindow(activePreview->GetView());
+}
+
void SearchController::ClearSelection()
{
searchModel->ClearSelected();
diff --git a/src/search/SearchController.h b/src/search/SearchController.h
index 32ca8b3..66d464a 100644
--- a/src/search/SearchController.h
+++ b/src/search/SearchController.h
@@ -38,6 +38,7 @@ public:
void ShowFavourite(bool show);
void Selected(int saveID, bool selected);
void OpenSave(int saveID);
+ void OpenSave(int saveID, int saveDate);
void Update();
void ClearSelection();
void RemoveSelected();
diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp
index 04654d6..256ef90 100644
--- a/src/search/SearchView.cpp
+++ b/src/search/SearchView.cpp
@@ -586,7 +586,7 @@ void SearchView::NotifySaveListChanged(SearchModel * sender)
SaveOpenAction(SearchView * _v) { v = _v; }
virtual void ActionCallback(ui::SaveButton * sender)
{
- v->c->OpenSave(sender->GetSave()->GetID());
+ v->c->OpenSave(sender->GetSave()->GetID(), sender->GetSave()->GetVersion());
}
virtual void SelectedCallback(ui::SaveButton * sender)
{