summaryrefslogtreecommitdiff
path: root/src/search/SearchController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-02-12 16:47:01 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-02-12 16:47:01 (GMT)
commitafe9e061e1d173731d8a5122c397a2caf4fe61ab (patch)
treef045221d8718c44b8af516cb58bdb45c3c74114b /src/search/SearchController.cpp
parentd25384c36c427d4afd71f87f8282b1a981c4b563 (diff)
downloadpowder-afe9e061e1d173731d8a5122c397a2caf4fe61ab.zip
powder-afe9e061e1d173731d8a5122c397a2caf4fe61ab.tar.gz
Better names for sort, allow showing own saves
Diffstat (limited to 'src/search/SearchController.cpp')
-rw-r--r--src/search/SearchController.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp
index 6fa9748..1449f9a 100644
--- a/src/search/SearchController.cpp
+++ b/src/search/SearchController.cpp
@@ -4,6 +4,7 @@
#include "SearchView.h"
#include "interface/Panel.h"
#include "preview/PreviewController.h"
+#include "client/Client.h"
class SearchController::OpenCallback: public ControllerCallback
{
@@ -106,19 +107,22 @@ void SearchController::NextPage()
void SearchController::ChangeSort()
{
- if(searchModel->GetSort() == "date")
+ if(searchModel->GetSort() == "new")
{
- searchModel->SetSort("votes");
+ searchModel->SetSort("best");
}
else
{
- searchModel->SetSort("date");
+ searchModel->SetSort("new");
}
}
void SearchController::ShowOwn(bool show)
{
- //TODO: Implement
+ if(Client::Ref().GetAuthUser().ID)
+ searchModel->SetShowOwn(show);
+ else
+ searchModel->SetShowOwn(false);
}
void SearchController::OpenSave(int saveID)