Renamed a bunch of wesnothd dialog members for clarity
This commit is contained in:
parent
f3ea0d7cc1
commit
c6d4dff739
6 changed files with 25 additions and 25 deletions
|
@ -141,7 +141,7 @@ mp_lobby::mp_lobby(const config& game_config, mp::lobby_info& info, wesnothd_con
|
|||
, gamelist_dirty_(true)
|
||||
, last_gamelist_update_(0)
|
||||
, gamelist_diff_update_(true)
|
||||
, wesnothd_connection_(connection)
|
||||
, network_connection_(connection)
|
||||
, lobby_update_timer_(0)
|
||||
, gamelist_id_at_row_()
|
||||
, delay_playerlist_update_(false)
|
||||
|
@ -318,7 +318,7 @@ void mp_lobby::update_gamelist_diff()
|
|||
} else {
|
||||
if(list_i >= gamelistbox_->get_item_count()) {
|
||||
ERR_LB << "Ran out of listbox items -- triggering a full refresh\n";
|
||||
wesnothd_connection_.send_data(config("refresh_lobby"));
|
||||
network_connection_.send_data(config("refresh_lobby"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,7 @@ void mp_lobby::update_gamelist_diff()
|
|||
<< list_rows_deleted
|
||||
<< " >= " << gamelist_id_at_row_.size()
|
||||
<< " -- triggering a full refresh\n";
|
||||
wesnothd_connection_.send_data(config("refresh_lobby"));
|
||||
network_connection_.send_data(config("refresh_lobby"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -335,7 +335,7 @@ void mp_lobby::update_gamelist_diff()
|
|||
if(game.id != listbox_game_id) {
|
||||
ERR_LB << "Listbox game id does not match expected id "
|
||||
<< listbox_game_id << " " << game.id << " (row " << list_i << ")\n";
|
||||
wesnothd_connection_.send_data(config("refresh_lobby"));
|
||||
network_connection_.send_data(config("refresh_lobby"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -697,7 +697,7 @@ void mp_lobby::pre_show(window& window)
|
|||
|
||||
chatbox_ = find_widget<chatbox>(&window, "chat", false, true);
|
||||
chatbox_->set_lobby_info(lobby_info_);
|
||||
chatbox_->set_wesnothd_connection(wesnothd_connection_);
|
||||
chatbox_->set_wesnothd_connection(network_connection_);
|
||||
chatbox_->set_active_window_changed_callback([this]() { player_list_dirty_ = true; });
|
||||
|
||||
find_widget<button>(&window, "create", false).set_retval(CREATE);
|
||||
|
@ -804,7 +804,7 @@ void mp_lobby::network_handler()
|
|||
{
|
||||
try {
|
||||
config data;
|
||||
if (wesnothd_connection_.receive_data(data)) {
|
||||
if (network_connection_.receive_data(data)) {
|
||||
process_network_data(data);
|
||||
}
|
||||
} catch (wesnothd_error& e) {
|
||||
|
@ -855,7 +855,7 @@ void mp_lobby::process_gamelist_diff(const config& data)
|
|||
gamelist_dirty_ = true;
|
||||
} else {
|
||||
ERR_LB << "process_gamelist_diff failed!" << std::endl;
|
||||
wesnothd_connection_.send_data(config("refresh_lobby"));
|
||||
network_connection_.send_data(config("refresh_lobby"));
|
||||
}
|
||||
const int joined = data.child_count("insert_child");
|
||||
const int left = data.child_count("remove_child");
|
||||
|
@ -988,14 +988,14 @@ bool mp_lobby::do_game_join(int idx, bool observe)
|
|||
join["password"] = password;
|
||||
}
|
||||
|
||||
wesnothd_connection_.send_data(response);
|
||||
network_connection_.send_data(response);
|
||||
joined_game_id_ = game.id;
|
||||
return true;
|
||||
}
|
||||
|
||||
void mp_lobby::refresh_button_callback(window& /*window*/)
|
||||
{
|
||||
wesnothd_connection_.send_data(config("refresh_lobby"));
|
||||
network_connection_.send_data(config("refresh_lobby"));
|
||||
}
|
||||
|
||||
void mp_lobby::show_preferences_button_callback(window& window)
|
||||
|
@ -1021,7 +1021,7 @@ void mp_lobby::show_preferences_button_callback(window& window)
|
|||
*/
|
||||
window.invalidate_layout();
|
||||
|
||||
wesnothd_connection_.send_data(config("refresh_lobby"));
|
||||
network_connection_.send_data(config("refresh_lobby"));
|
||||
}
|
||||
|
||||
void mp_lobby::game_filter_reload()
|
||||
|
@ -1122,7 +1122,7 @@ void mp_lobby::user_dialog_callback(mp::user_info* info)
|
|||
// update_gamelist();
|
||||
delay_playerlist_update_ = false;
|
||||
player_list_dirty_ = true;
|
||||
wesnothd_connection_.send_data(config("refresh_lobby"));
|
||||
network_connection_.send_data(config("refresh_lobby"));
|
||||
}
|
||||
|
||||
void mp_lobby::skip_replay_changed_callback(window& window)
|
||||
|
|
|
@ -198,7 +198,7 @@ private:
|
|||
|
||||
bool gamelist_diff_update_;
|
||||
|
||||
wesnothd_connection &wesnothd_connection_;
|
||||
wesnothd_connection &network_connection_;
|
||||
|
||||
/** Timer for updating the lobby. */
|
||||
size_t lobby_update_timer_;
|
||||
|
|
|
@ -67,7 +67,7 @@ mp_join_game::mp_join_game(saved_game& state, mp::lobby_info& lobby_info, wesnot
|
|||
: level_()
|
||||
, state_(state)
|
||||
, lobby_info_(lobby_info)
|
||||
, wesnothd_connection_(connection)
|
||||
, network_connection_(connection)
|
||||
, update_timer_(0)
|
||||
, first_scenario_(first_scenario)
|
||||
, observe_game_(observe_game)
|
||||
|
@ -91,14 +91,14 @@ bool mp_join_game::fetch_game_config(CVideo& video)
|
|||
{
|
||||
// Ask for the next scenario data, if applicable
|
||||
if(!first_scenario_) {
|
||||
wesnothd_connection_.send_data(config("load_next_scenario"));
|
||||
network_connection_.send_data(config("load_next_scenario"));
|
||||
}
|
||||
|
||||
bool has_scenario_and_controllers = false;
|
||||
while(!has_scenario_and_controllers) {
|
||||
config revc;
|
||||
const bool data_res = gui2::dialogs::network_transmission::wesnothd_receive_dialog(
|
||||
video, "download level data", revc, wesnothd_connection_);
|
||||
video, "download level data", revc, network_connection_);
|
||||
|
||||
if(!data_res) {
|
||||
return false;
|
||||
|
@ -229,7 +229,7 @@ bool mp_join_game::fetch_game_config(CVideo& video)
|
|||
change["leader"] = flg.current_leader();
|
||||
change["gender"] = flg.current_gender();
|
||||
|
||||
wesnothd_connection_.send_data(faction);
|
||||
network_connection_.send_data(faction);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -282,7 +282,7 @@ void mp_join_game::pre_show(window& window)
|
|||
chatbox& chat = find_widget<chatbox>(&window, "chat", false);
|
||||
|
||||
chat.set_lobby_info(lobby_info_);
|
||||
chat.set_wesnothd_connection(wesnothd_connection_);
|
||||
chat.set_wesnothd_connection(network_connection_);
|
||||
|
||||
chat.room_window_open("this game", true, false); // TODO: better title?
|
||||
chat.active_window_changed();
|
||||
|
@ -442,7 +442,7 @@ void mp_join_game::network_handler(window& window)
|
|||
}
|
||||
|
||||
config data;
|
||||
if(!wesnothd_connection_.receive_data(data)) {
|
||||
if(!network_connection_.receive_data(data)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -518,7 +518,7 @@ void mp_join_game::post_show(window& window)
|
|||
|
||||
mp_ui_alerts::game_has_begun();
|
||||
} else {
|
||||
wesnothd_connection_.send_data(config("leave_game"));
|
||||
network_connection_.send_data(config("leave_game"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ private:
|
|||
|
||||
mp::lobby_info& lobby_info_;
|
||||
|
||||
wesnothd_connection& wesnothd_connection_;
|
||||
wesnothd_connection& network_connection_;
|
||||
|
||||
size_t update_timer_;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ mp_staging::mp_staging(ng::connect_engine& connect_engine, mp::lobby_info& lobby
|
|||
: connect_engine_(connect_engine)
|
||||
, ai_algorithms_(ai::configuration::get_available_ais())
|
||||
, lobby_info_(lobby_info)
|
||||
, wesnothd_connection_(connection)
|
||||
, network_connection_(connection)
|
||||
, update_timer_(0)
|
||||
, state_changed_(false)
|
||||
, team_tree_map_()
|
||||
|
@ -102,8 +102,8 @@ void mp_staging::pre_show(window& window)
|
|||
|
||||
chat.set_lobby_info(lobby_info_);
|
||||
|
||||
if(wesnothd_connection_) {
|
||||
chat.set_wesnothd_connection(*wesnothd_connection_);
|
||||
if(network_connection_) {
|
||||
chat.set_wesnothd_connection(*network_connection_);
|
||||
}
|
||||
|
||||
chat.room_window_open("this game", true, false); // TODO: better title?
|
||||
|
@ -459,7 +459,7 @@ void mp_staging::network_handler(window& window)
|
|||
|
||||
// Next, check for any incoming changes
|
||||
config data;
|
||||
if(!state_changed_ && (!wesnothd_connection_ || !wesnothd_connection_->receive_data(data))) {
|
||||
if(!state_changed_ && (!network_connection_ || !network_connection_->receive_data(data))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ private:
|
|||
|
||||
mp::lobby_info& lobby_info_;
|
||||
|
||||
wesnothd_connection* wesnothd_connection_;
|
||||
wesnothd_connection* network_connection_;
|
||||
|
||||
size_t update_timer_;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue