The Battle for Wesnoth  1.19.0-dev
Functions
manager_ui.hpp File Reference
#include <string>
#include <vector>
Include dependency graph for manager_ui.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool manage_addons ()
 Shows the add-ons server connection dialog, for access to the various management front-ends. More...
 
bool ad_hoc_addon_fetch_session (const std::vector< std::string > &addon_ids)
 Conducts an ad-hoc add-ons server connection to download an add-on with a particular id and all it's dependencies. More...
 

Function Documentation

◆ ad_hoc_addon_fetch_session()

bool ad_hoc_addon_fetch_session ( const std::vector< std::string > &  addon_ids)

Conducts an ad-hoc add-ons server connection to download an add-on with a particular id and all it's dependencies.

Launches gui dialogs when issues arise.

Parameters
addon_idsThe ids of the target add-on.
Returns
true when we successfully installed the target (possibly the user chose to ignore failures)

Definition at line 255 of file manager_ui.cpp.

References _(), preferences::campaign_server(), addons_client::connect(), addon_info::current_version, e, ERR_CFG, ERR_FS, ERR_NET, filesystem::file_exists(), filesystem::get_addons_dir(), game_config::config_cache::get_config(), lg::info(), INFO_CFG, addons_client::install_addon_with_checks(), game_config::config_cache::instance(), LOG_AC, addons_client::install_result::outcome, gui2::show_error_message(), addons_client::success, and VGETTEXT.

Referenced by gui2::dialogs::migrate_version_selection::post_show().

◆ manage_addons()

bool manage_addons ( )

Shows the add-ons server connection dialog, for access to the various management front-ends.

Returns
true when one or more add-ons have been successfully installed or removed, thus requiring a local WML cache refresh. false otherwise.

Definition at line 228 of file manager_ui.cpp.

References preferences::campaign_server(), gui2::dialogs::modal_dialog::get_retval(), installed_addons(), gui2::OK, and gui2::dialogs::modal_dialog::show().

Referenced by gui2::dialogs::title_screen::init_callbacks().