Ingame tab completion works with friendlist (bug #9742)

This commit is contained in:
neverEnough 2015-10-28 00:36:30 +01:00 committed by Ignacio R. Morelle
parent bea46322ca
commit b549ac258c
3 changed files with 10 additions and 3 deletions

View file

@ -188,7 +188,7 @@ Version 1.13.1+dev:
eg if an add-on tries to set an invalid variable
* Fixed bug 23060: unit stat tooltips do not show.
* wmllint, wmlscope, wmlindent and wmllint-1.4 now run on Python 3
* Text boxes tab completion now lists whisperer nicks for easier answer
* Text boxes tab completion now lists friends and whisperer nicks for easier answer (bug #9742)
* Fixed cases of wrong unit type used in planning moves (bug #20299)
* Fixed hang when attempting to make a screenshot from a non-existent map via
command-line (bug #20900)

View file

@ -41,7 +41,7 @@ Version 1.13.1+dev:
* Fixed OOS on random maps, where clients placed sides in different castles.
* Fixed possibility of corrupting saved games in certain instances,
eg if an add-on tries to set an invalid variable
* Enhanced tab completion in text boxes for easier whispers answer.
* Enhanced tab completion in text boxes for friends and for easier whispers answer (bug #9742)
* Fixed Cancel Orders not working when loading MP game (bug #22133)
* Fixed load game hot-key not working in the main menu (bug #23215)

View file

@ -656,7 +656,14 @@ void play_controller::tab()
BOOST_FOREACH(const std::string& w, gui_->get_chat_manager().whisperers()){
dictionary.insert(w);
}
// Add nicks from friendlist
const std::map<std::string, std::string> friends = preferences::get_acquaintances_nice("friend");
for(std::map<std::string, std::string>::const_iterator iter = friends.begin(); iter != friends.end(); ++iter){
dictionary.insert((*iter).first);
}
//Exclude own nick from tab-completion.
//NOTE why ?
dictionary.erase(preferences::login());