summaryrefslogtreecommitdiff
path: root/src/search/SearchView.cpp
diff options
context:
space:
mode:
authorFrankBro <brodeur_francois@hotmail.com>2012-01-22 05:45:10 (GMT)
committer FrankBro <brodeur_francois@hotmail.com>2012-01-22 05:45:10 (GMT)
commit57ab7bca76aa94624ca078d7168614eb28ead640 (patch)
tree2730cab371676cc92fa19da55838c03cd1b4d2a0 /src/search/SearchView.cpp
parentcb92acd0b7dd9e958330a9b8e3c4b302f236542c (diff)
parent3a283d4f3c571dc8a891f2cdc348c204f7f9300b (diff)
downloadpowder-57ab7bca76aa94624ca078d7168614eb28ead640.zip
powder-57ab7bca76aa94624ca078d7168614eb28ead640.tar.gz
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/search/SearchView.cpp')
-rw-r--r--src/search/SearchView.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp
index 57e5558..e589d20 100644
--- a/src/search/SearchView.cpp
+++ b/src/search/SearchView.cpp
@@ -178,6 +178,16 @@ void SearchView::NotifySaveListChanged(SearchModel * sender)
buttonAreaHeight = Size.Y - buttonYOffset - 18;
buttonWidth = (buttonAreaWidth/savesX) - buttonPadding*2;
buttonHeight = (buttonAreaHeight/savesY) - buttonPadding*2;
+ class SaveOpenAction: public ui::SaveButtonAction
+ {
+ SearchView * v;
+ public:
+ SaveOpenAction(SearchView * _v) { v = _v; }
+ virtual void ActionCallback(ui::SaveButton * sender)
+ {
+ v->c->OpenSave(sender->GetSave()->GetID());
+ }
+ };
for(i = 0; i < saves.size(); i++)
{
if(saveX == savesX)
@@ -195,6 +205,7 @@ void SearchView::NotifySaveListChanged(SearchModel * sender)
),
ui::Point(buttonWidth, buttonHeight),
saves[i]);
+ saveButton->SetActionCallback(new SaveOpenAction(this));
saveButtons.push_back(saveButton);
AddComponent(saveButton);
saveX++;