made "Show lobby joins of friends only" the default preference

This commit is contained in:
Gunter Labes 2008-01-03 20:22:24 +00:00
parent 173f3ab8d4
commit 8cd6e5af5f
5 changed files with 14 additions and 12 deletions

View file

@ -25,6 +25,7 @@ Version 1.3.13+svn:
could lead to an infinite loop (bug #10112)
* user interface
* the apple key works as shortcut modifier again (bug #10586)
* made "Show lobby joins of friends only" the default preference
* WML engine:
* Fixed a problem where two [recall]s in a SP game could get an out of sync
recruitment

View file

@ -12,6 +12,7 @@ Version 1.3.13+svn:
* User interface
* The apple key works as shortcut modifier again.
* Made "Show lobby joins of friends only" the default preference.
* Sound and music
* The timer bell in MP starts when there are 20 seconds left and fades in

View file

@ -106,20 +106,22 @@ int lobby_joins()
return SHOW_FRIENDS;
} else if(preferences::get("lobby_joins") == "all") {
return SHOW_ALL;
} else if(preferences::get("lobby_joins") == "none") {
return SHOW_NONE;
} else {
return SHOW_NON;
return SHOW_FRIENDS;
}
}
void _set_lobby_joins(int show)
{
if (show == SHOW_FRIENDS) {
if (show == SHOW_FRIENDS) {
preferences::set("lobby_joins", "friends");
} else if (show == SHOW_ALL) {
preferences::set("lobby_joins", "all");
} else {
preferences::set("lobby_joins", "non");
} else if (show == SHOW_NONE) {
preferences::set("lobby_joins", "none");
}
}

View file

@ -45,7 +45,7 @@ namespace preferences {
int lobby_joins();
void _set_lobby_joins(int show);
enum { SHOW_NON, SHOW_FRIENDS, SHOW_ALL };
enum { SHOW_NONE, SHOW_FRIENDS, SHOW_ALL };
bool _set_relationship(std::string nick, std::string rela);
bool sort_list();

View file

@ -352,7 +352,7 @@ preferences_dialog::preferences_dialog(display& disp, const config& game_cfg)
iconize_list_button_.set_check(iconize_list());
iconize_list_button_.set_help_string(_("Show icons in front of the player names in the lobby."));
show_lobby_joins_button1_.set_check(lobby_joins() == SHOW_NON);
show_lobby_joins_button1_.set_check(lobby_joins() == SHOW_NONE);
show_lobby_joins_button1_.set_help_string(_("Do not show messages about players joining the multiplayer lobby"));
show_lobby_joins_button2_.set_check(lobby_joins() == SHOW_FRIENDS);
show_lobby_joins_button2_.set_help_string(_("Show messages about your friends joining the multiplayer lobby"));
@ -831,23 +831,21 @@ void preferences_dialog::process_event()
if (tab_ == MULTIPLAYER_TAB) {
if (show_lobby_joins_button1_.pressed()) {
set_lobby_joins(SHOW_NON);
set_lobby_joins(SHOW_NONE);
show_lobby_joins_button1_.set_check(true);
show_lobby_joins_button2_.set_check(false);
show_lobby_joins_button3_.set_check(false);
}
if (show_lobby_joins_button2_.pressed()) {
} else if (show_lobby_joins_button2_.pressed()) {
set_lobby_joins(SHOW_FRIENDS);
show_lobby_joins_button1_.set_check(false);
show_lobby_joins_button2_.set_check(true);
show_lobby_joins_button3_.set_check(false);
}
if (show_lobby_joins_button3_.pressed()) {
} else if (show_lobby_joins_button3_.pressed()) {
set_lobby_joins(SHOW_ALL);
show_lobby_joins_button1_.set_check(false);
show_lobby_joins_button2_.set_check(false);
show_lobby_joins_button3_.set_check(true);
}
}
if (sort_list_by_group_button_.pressed())
set_sort_list(sort_list_by_group_button_.checked());
if (iconize_list_button_.pressed())