15 #define GETTEXT_DOMAIN "wesnoth-lib"
37 register_bool(
"remember_password",
false,
44 text_box* pwd = find_widget<text_box>(&win,
"password",
false,
true);
48 std::vector<config> content_list;
49 content_list.emplace_back(
"label",
cfg_[
"author"].str(
""));
51 for(
const auto& author :
utils::split(
cfg_[
"secondary_authors"].str(
""),
',')) {
52 content_list.emplace_back(
"label", author);
54 find_widget<menu_button>(&win,
"choose_uploader",
false).set_values(content_list);
61 cfg_[
"passphrase"] = find_widget<password_box>(&win,
"password",
false).get_real_value();
62 cfg_[
"uploader"] = find_widget<menu_button>(&win,
"choose_uploader",
false).get_value_string();
A config object defines a single node in a WML file, with access to child nodes.
This shows the dialog to provide a password when uploading an add-on.
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
virtual void pre_show(window &window) 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.
Class for a single line text area.
base class of top level items, the only item which needs to store the final canvases to draw on.
void add_to_tab_order(widget *widget, int at=-1)
Add the widget to the tabbing order.
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
@ OK
Dialog was closed with the OK button.
void set_remember_password(bool remember)
std::vector< std::string > split(const config_attribute_value &val)