summaryrefslogtreecommitdiff
path: root/src/search/SearchView.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-29 14:44:36 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-29 14:44:36 (GMT)
commit680a36549adaed0c3ce7e8906fadbdf190b0b3b0 (patch)
tree21ca16411c1687bb212369a59c5f3de2a0cf023b /src/search/SearchView.cpp
parent7c53ca7799832920066c23cfad2f1d7fa82233c7 (diff)
downloadpowder-680a36549adaed0c3ce7e8906fadbdf190b0b3b0.zip
powder-680a36549adaed0c3ce7e8906fadbdf190b0b3b0.tar.gz
Background retrieval of save info and save list.
Diffstat (limited to 'src/search/SearchView.cpp')
-rw-r--r--src/search/SearchView.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp
index b1d9765..b9c8bcb 100644
--- a/src/search/SearchView.cpp
+++ b/src/search/SearchView.cpp
@@ -152,6 +152,16 @@ void SearchView::NotifySaveListChanged(SearchModel * sender)
delete saveButtons[i];
}
saveButtons.clear();
+ if(!sender->GetSavesLoaded())
+ {
+ nextButton->Enabled = false;
+ previousButton->Enabled = false;
+ }
+ else
+ {
+ nextButton->Enabled = true;
+ previousButton->Enabled = true;
+ }
if(!saves.size())
{
if(!errorLabel)
@@ -159,10 +169,17 @@ void SearchView::NotifySaveListChanged(SearchModel * sender)
errorLabel = new ui::Label(ui::Point(((XRES+BARSIZE)/2)-100, ((YRES+MENUSIZE)/2)-6), ui::Point(200, 12), "Error");
AddComponent(errorLabel);
}
- if(sender->GetLastError().length())
- errorLabel->SetText("\bo" + sender->GetLastError());
+ if(!sender->GetSavesLoaded())
+ {
+ errorLabel->SetText("Loading...");
+ }
else
- errorLabel->SetText("\boNo saves found");
+ {
+ if(sender->GetLastError().length())
+ errorLabel->SetText("\bo" + sender->GetLastError());
+ else
+ errorLabel->SetText("\boNo saves found");
+ }
}
else
{