rename foes to ignored in lobby data for consistency...

...and kill the negative in attribute name (has_no_foes -> has_ignored)
This commit is contained in:
Tomasz Śniatowski 2009-07-12 18:10:51 +01:00
parent 0549282da8
commit 13ef5697f4
5 changed files with 12 additions and 12 deletions

View file

@ -334,13 +334,13 @@
[toggle_button]
definition = "default"
id = "filter_with_friends"
label = _ "With friends"
label = _ "Friends"
[/toggle_button]
{HORIZONTAL_SEP}
[toggle_button]
definition = "default"
id = "filter_without_foes"
label = _ "Without foes"
id = "filter_without_ignored"
label = _ "No ignored"
[/toggle_button]
{HORIZONTAL_SEP}
[toggle_button]

View file

@ -345,14 +345,14 @@ void tlobby_main::pre_show(CVideo& /*video*/, twindow& window)
GUI2_EASY_BUTTON_CALLBACK(close_window, tlobby_main);
filter_friends_ = &window.get_widget<ttoggle_button>("filter_with_friends", false);
filter_foes_ = &window.get_widget<ttoggle_button>("filter_without_foes", false);
filter_ignored_ = &window.get_widget<ttoggle_button>("filter_without_ignored", false);
filter_slots_ = &window.get_widget<ttoggle_button>("filter_vacant_slots", false);
filter_invert_ = &window.get_widget<ttoggle_button>("filter_invert", false);
filter_text_= &window.get_widget<ttext_box>("filter_text", false);
filter_friends_->set_callback_state_change(
dialog_callback<tlobby_main, &tlobby_main::game_filter_change_callback>);
filter_foes_->set_callback_state_change(
filter_ignored_->set_callback_state_change(
dialog_callback<tlobby_main, &tlobby_main::game_filter_change_callback>);
filter_slots_->set_callback_state_change(
dialog_callback<tlobby_main, &tlobby_main::game_filter_change_callback>);
@ -820,9 +820,9 @@ void tlobby_main::game_filter_change_callback(gui2::twindow &/*window*/)
lobby_info_.add_game_filter(
new game_filter_value<bool, &game_info::has_friends>(true));
}
if (filter_foes_->get_value()) {
if (filter_ignored_->get_value()) {
lobby_info_.add_game_filter(
new game_filter_value<bool, &game_info::has_no_foes>(true));
new game_filter_value<bool, &game_info::has_ignored>(false));
}
if (filter_slots_->get_value()) {
lobby_info_.add_game_filter(

View file

@ -287,7 +287,7 @@ private:
ttoggle_button* filter_friends_;
ttoggle_button* filter_foes_;
ttoggle_button* filter_ignored_;
ttoggle_button* filter_slots_;

View file

@ -154,7 +154,7 @@ game_info::game_info() :
password_required(false),
have_era(false),
has_friends(false),
has_no_foes(true)
has_ignored(false)
{
}
@ -206,7 +206,7 @@ game_info::game_info(const config& game, const config& game_config)
, password_required(game["password"] == "yes")
, have_era(true)
, has_friends(false)
, has_no_foes(true)
, has_ignored(false)
{
std::string turn = game["turn"];
std::string slots = game["slots"];
@ -459,7 +459,7 @@ void lobby_info::parse_gamelist()
g.has_friends = true;
break;
case user_info::IGNORED:
g.has_no_foes = false;
g.has_ignored = true;
break;
default:
break;

View file

@ -141,7 +141,7 @@ struct game_info
bool have_era;
bool has_friends;
bool has_no_foes;
bool has_ignored;
};
class game_filter_base : public std::unary_function<game_info, bool>