15 #define GETTEXT_DOMAIN "wesnoth-lib"
36 register_bool(
"remember_password",
false,
43 text_box* pwd = find_widget<text_box>(
"password",
false,
true);
47 std::vector<config> content_list;
49 for(
const auto& author :
utils::split(
cfg_[
"primary_authors"].str(
""),
',')) {
50 content_list.emplace_back(
"label", author);
52 for(
const auto& author :
utils::split(
cfg_[
"secondary_authors"].str(
""),
',')) {
53 content_list.emplace_back(
"label", author);
55 if(content_list.size() > 0) {
56 find_widget<menu_button>(
"choose_uploader").set_values(content_list);
64 cfg_[
"passphrase"] = find_widget<password_box>(
"password").get_real_value();
65 cfg_[
"uploader"] = find_widget<menu_button>(
"choose_uploader").get_value_string();
A config object defines a single node in a WML file, with access to child nodes.
virtual void post_show() override
Actions to be taken after the window has been shown.
virtual void pre_show() override
Actions to be taken before showing the window.
Abstract base class for all modal dialogs.
int get_retval() const
Returns the cached window exit code.
virtual void set_value(const std::string &text)
The set_value is virtual for the password_box class.
A widget that allows the user to input text in single line.
void add_to_tab_order(widget *widget, int at=-1)
Add the widget to the tabbing order.
void set_remember_password(bool remember)
REGISTER_DIALOG(editor_edit_unit)
@ OK
Dialog was closed with the OK button.
std::vector< std::string > split(const config_attribute_value &val)