Fix config save problems,
bug #510
--- a/ChangeLog.txt Fri May 24 10:34:22 2013 -0400
+++ b/ChangeLog.txt Fri May 24 12:56:58 2013 -0400
@@ -23,6 +23,8 @@
+ Easier weapon selection in shoppa. F1 will select from F5 if there are no weps in F1-F4
+ Cleaver radius shrunk to improve usability on horizontal throws
+ Map hog limit is now just a suggestion, not enforced
+ + Static map theme is now just the default, can be changed
+ + Themeable static maps (provide a mask.png without a map.png)
* You can now move out of the way when throwing a sticky mine or cleaver straight up
* Rope sliding should behave more like pre-0.9.18 again
* Forbid kicking on 1v1 matches
--- a/QTfrontend/gameuiconfig.cpp Fri May 24 10:34:22 2013 -0400
+++ b/QTfrontend/gameuiconfig.cpp Fri May 24 12:56:58 2013 -0400
@@ -521,14 +521,28 @@
setValue("net/passwordhash", QString());
setValue("net/passwordlength", 0);
setValue("net/savepassword", false); //changes the savepassword value to false in order to not let the user save an empty password in PAGE_SETUP
- reloadValues(); //reloads the values of PAGE_SETUP
+ Form->ui.pageOptions->editNetPassword->setEnabled(false);
+ Form->ui.pageOptions->editNetPassword->setText("");
}
void GameUIConfig::setPasswordHash(const QString & passwordhash)
{
setValue("net/passwordhash", passwordhash);
- setValue("net/passwordlength", passwordhash.size()/4);
- setNetPasswordLength(passwordhash.size()/4); //the hash.size() is divided by 4 let PAGE_SETUP use a reasonable number of stars to display the PW
+ if (passwordhash!=NULL && passwordhash.size() > 0)
+ {
+ // WTF - the whole point of "password length" was to have the dots match what they typed. This is totally pointless, and all hashes are the same length for a given hash so might as well hardcode it.
+ // setValue("net/passwordlength", passwordhash.size()/4);
+ setValue("net/passwordlength", 8);
+
+ // More WTF
+ //setNetPasswordLength(passwordhash.size()/4); //the hash.size() is divided by 4 let PAGE_SETUP use a reasonable number of stars to display the PW
+ setNetPasswordLength(8);
+ }
+ else
+ {
+ setValue("net/passwordlength", 0);
+ setNetPasswordLength(0);
+ }
}
QString GameUIConfig::passwordHash()