Remove a deprecated function.
This commit is contained in:
parent
e5beaf5753
commit
010a38ebbf
8 changed files with 8 additions and 52 deletions
|
@ -53,7 +53,7 @@ taddon_connect::taddon_connect(std::string& host_name
|
|||
: allow_updates_(allow_updates)
|
||||
, allow_remove_(allow_remove)
|
||||
{
|
||||
register_text2("host_name", false, host_name, true);
|
||||
register_text("host_name", false, host_name, true);
|
||||
}
|
||||
|
||||
void taddon_connect::pre_show(CVideo& /*video*/, twindow& window)
|
||||
|
|
|
@ -171,20 +171,6 @@ tfield_text* tdialog::register_text(const std::string& id
|
|||
return field;
|
||||
}
|
||||
|
||||
tfield_text* tdialog::register_text2(const std::string& id
|
||||
, const bool mandatory
|
||||
, std::string& linked_variable
|
||||
, const bool capture_focus)
|
||||
{
|
||||
assert(!capture_focus || focus_.empty());
|
||||
|
||||
if(capture_focus) {
|
||||
focus_ = id;
|
||||
}
|
||||
|
||||
return tdialog::register_text(id, mandatory, linked_variable);
|
||||
}
|
||||
|
||||
tfield_label* tdialog::register_label(const std::string& id
|
||||
, const bool mandatory
|
||||
, const std::string& text
|
||||
|
|
|
@ -254,36 +254,6 @@ protected:
|
|||
, std::string& linked_variable
|
||||
, const bool capture_focus = false);
|
||||
|
||||
/**
|
||||
* Creates a new text field.
|
||||
*
|
||||
* The field created is owned by tdialog, the returned pointer can be used
|
||||
* in the child classes as access to a field.
|
||||
*
|
||||
* @note This function uses @p mandatory instead of @p optional as in other
|
||||
* functions, the other functions need to be converted to use @p mandatory
|
||||
* as well.
|
||||
*
|
||||
* @todo Convert more functions to this new style once done drop the 2 from
|
||||
* the function name.
|
||||
*
|
||||
* @deprecated Use @ref register_text instead.
|
||||
*
|
||||
* @param id Id of the widget, same value as in WML.
|
||||
* @param mandatory Is the widget mandatory or optional.
|
||||
* @param linked_variable The variable the widget is linked to. See
|
||||
* @ref tfield::tfield for more information.
|
||||
* @param capture_focus Does this widget need to capture the focus
|
||||
* when created? @warning Only one widget may
|
||||
* capture the focus.
|
||||
*
|
||||
* @returns Pointer to the created widget.
|
||||
*/
|
||||
tfield_text* register_text2(const std::string& id
|
||||
, const bool mandatory
|
||||
, std::string& linked_variable
|
||||
, const bool capture_focus = false);
|
||||
|
||||
/**
|
||||
* Registers a new control as a label.
|
||||
*
|
||||
|
|
|
@ -48,7 +48,7 @@ REGISTER_DIALOG(edit_label)
|
|||
|
||||
tedit_label::tedit_label(std::string& label, bool& team_only)
|
||||
{
|
||||
register_text2("label", true, label, true);
|
||||
register_text("label", true, label, true);
|
||||
register_bool("team_only_toggle", true, team_only);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ REGISTER_DIALOG(folder_create)
|
|||
|
||||
tfolder_create::tfolder_create(std::string& folder_name)
|
||||
{
|
||||
register_text2("name", true, folder_name, true);
|
||||
register_text("name", true, folder_name, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ REGISTER_DIALOG(game_save)
|
|||
|
||||
tgame_save::tgame_save(std::string& filename, const std::string& title)
|
||||
{
|
||||
register_text2("txtFilename", false, filename, true);
|
||||
register_text("txtFilename", false, filename, true);
|
||||
register_label("lblTitle", true, title);
|
||||
}
|
||||
|
||||
|
|
|
@ -80,9 +80,9 @@ tmp_cmd_wrapper::tmp_cmd_wrapper(const t_string& user)
|
|||
, reason_()
|
||||
, time_()
|
||||
{
|
||||
register_text2("message", false, message_, true);
|
||||
register_text2("reason", false, reason_);
|
||||
register_text2("time", false, time_);
|
||||
register_text("message", false, message_, true);
|
||||
register_text("reason", false, reason_);
|
||||
register_text("time", false, time_);
|
||||
register_label("user_label", false, user);
|
||||
|
||||
set_always_save_fields(true);
|
||||
|
|
|
@ -43,7 +43,7 @@ REGISTER_DIALOG(mp_create_game_set_password)
|
|||
tmp_create_game_set_password::tmp_create_game_set_password(
|
||||
std::string& password)
|
||||
{
|
||||
register_text2("password", true, password, true);
|
||||
register_text("password", true, password, true);
|
||||
}
|
||||
|
||||
} // namespace gui2
|
||||
|
|
Loading…
Add table
Reference in a new issue