- MGR: Remove project list randomization, sort on name.

lib/
        gui_rpc_client.h
        gui_rpc_client_ops.cpp

svn path=/trunk/boinc/; revision=18529
This commit is contained in:
Rom Walton 2009-06-30 18:54:52 +00:00
parent f239587bdb
commit d631a3c485
3 changed files with 12 additions and 7 deletions

View File

@ -6111,3 +6111,10 @@ Rytis 30 June 2009
sched_config.cpp sched_config.cpp
sched_config.h sched_config.h
sched_result.cpp sched_result.cpp
Rom 30 June 2009
- MGR: Remove project list randomization, sort on name.
lib/
gui_rpc_client.h
gui_rpc_client_ops.cpp

View File

@ -67,7 +67,6 @@ public:
std::string image; // URL of logo std::string image; // URL of logo
std::vector<std::string> platforms; std::vector<std::string> platforms;
// platforms supported by project, or empty // platforms supported by project, or empty
double rand;
PROJECT_LIST_ENTRY(); PROJECT_LIST_ENTRY();
~PROJECT_LIST_ENTRY(); ~PROJECT_LIST_ENTRY();
@ -83,10 +82,12 @@ struct AM_LIST_ENTRY {
std::string url; std::string url;
std::string description; std::string description;
std::string image; std::string image;
double rand;
AM_LIST_ENTRY(){} AM_LIST_ENTRY(){}
~AM_LIST_ENTRY(){} ~AM_LIST_ENTRY(){}
int parse(XML_PARSER&); int parse(XML_PARSER&);
bool operator<(const AM_LIST_ENTRY& compare); bool operator<(const AM_LIST_ENTRY& compare);
}; };

View File

@ -149,15 +149,14 @@ void PROJECT_LIST_ENTRY::clear() {
platforms.clear(); platforms.clear();
home.clear(); home.clear();
image.clear(); image.clear();
rand = 0;
} }
bool PROJECT_LIST_ENTRY::operator<(const PROJECT_LIST_ENTRY& compare) { bool PROJECT_LIST_ENTRY::operator<(const PROJECT_LIST_ENTRY& compare) {
return rand < compare.rand; return name < compare.name;
} }
bool AM_LIST_ENTRY::operator<(const AM_LIST_ENTRY& compare) { bool AM_LIST_ENTRY::operator<(const AM_LIST_ENTRY& compare) {
return rand < compare.rand; return name < compare.name;
} }
PROJECT::PROJECT() { PROJECT::PROJECT() {
@ -1296,7 +1295,6 @@ int RPC_CLIENT::get_all_projects_list(ALL_PROJECTS_LIST& pl) {
project = new PROJECT_LIST_ENTRY(); project = new PROJECT_LIST_ENTRY();
retval = project->parse(xp); retval = project->parse(xp);
if (!retval) { if (!retval) {
project->rand = drand();
pl.projects.push_back(project); pl.projects.push_back(project);
} else { } else {
delete project; delete project;
@ -1306,7 +1304,6 @@ int RPC_CLIENT::get_all_projects_list(ALL_PROJECTS_LIST& pl) {
am = new AM_LIST_ENTRY(); am = new AM_LIST_ENTRY();
retval = am->parse(xp); retval = am->parse(xp);
if (!retval) { if (!retval) {
am->rand = drand();
pl.account_managers.push_back(am); pl.account_managers.push_back(am);
} else { } else {
delete am; delete am;