15 #define GETTEXT_DOMAIN "wesnoth-lib"
35 , needs_refresh_(needs_refresh)
38 find_widget<button>(
"downloads_by_version"),
42 find_widget<button>(
"addon_count_by_forum_auth"),
46 find_widget<button>(
"admin_delete_addon"),
50 find_widget<button>(
"admin_hide_addon"),
54 find_widget<button>(
"admin_unhide_addon"),
58 find_widget<button>(
"admin_list_hidden"),
88 std::set<std::string> admin_set;
89 for(
const auto& admin : admins.
child_range(
"admin")) {
90 admin_set.emplace(admin[
"username"]);
107 std::set<std::string> admin_set;
108 for(
const auto& admin : admins.
child_range(
"admin")) {
109 admin_set.emplace(admin[
"username"]);
114 if(!gui2::dialogs::addon_auth::execute(cfg)) {
130 gui2::dialogs::prompt::execute(addon);
135 std::set<std::string> admin_set;
136 for(
const auto& admin : admins.
child_range(
"admin")) {
137 admin_set.emplace(admin[
"username"]);
142 if(!gui2::dialogs::addon_auth::execute(cfg)) {
159 std::set<std::string> admin_set;
160 for(
const auto& admin : admins.
child_range(
"admin")) {
161 admin_set.emplace(admin[
"username"]);
166 if(!gui2::dialogs::addon_auth::execute(cfg)) {
Add-ons (campaignd) client class.
bool unhide_addon(const std::string &addon, const std::string &username, const std::string &passphrase)
config get_forum_auth_usage()
config get_addon_downloads_by_version(const std::string &addon)
bool hide_addon(const std::string &addon, const std::string &username, const std::string &passphrase)
config get_hidden_addons(const std::string &username, const std::string &passphrase)
bool delete_remote_addon(const std::string &id, std::string &response_message, const std::set< std::string > &admin_set={})
Requests the specified add-on to be removed from the server.
config get_addon_admins()
const std::string & get_last_server_error() const
Returns the last error message sent by the server, or an empty string.
A config object defines a single node in a WML file, with access to child nodes.
child_itors child_range(config_key_type key)
std::string debug() const
void addon_count_by_forum_auth()
void downloads_by_version()
void admin_delete_addon()
virtual void pre_show() override
Actions to be taken before showing the window.
virtual void post_show() override
Actions to be taken after the window has been shown.
const std::string & addon_
void admin_unhide_addon()
Abstract base class for all modal dialogs.
static std::string _(const char *str)
REGISTER_DIALOG(editor_edit_unit)
void connect_signal_mouse_left_click(dispatcher &dispatcher, const signal &signal)
Connects a signal handler for a left mouse button click.
void show_transient_message(const std::string &title, const std::string &message, const std::string &image, const bool message_use_markup, const bool title_use_markup)
Shows a transient message to the user.
void show_error_message(const std::string &msg, bool message_use_markup)
Shows an error message to the user.
std::string join(const T &v, const std::string &s=",")
Generates a new string joining container items in a list.
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")