The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Functions | Variables
manager_ui.cpp File Reference
#include "addon/manager_ui.hpp"
#include "addon/client.hpp"
#include "addon/info.hpp"
#include "addon/manager.hpp"
#include "filesystem.hpp"
#include "formula/string_utils.hpp"
#include "preferences/game.hpp"
#include "gettext.hpp"
#include "gui/dialogs/addon/manager.hpp"
#include "gui/dialogs/addon/uninstall_list.hpp"
#include "gui/dialogs/addon/connect.hpp"
#include "gui/dialogs/message.hpp"
#include "gui/dialogs/transient_message.hpp"
#include "gui/widgets/window.hpp"
#include "log.hpp"
#include "wml_exception.hpp"
Include dependency graph for manager_ui.cpp:

Go to the source code of this file.

Macros

#define ERR_CFG   LOG_STREAM(err, log_config)
 
#define ERR_NET   LOG_STREAM(err, log_network)
 
#define ERR_FS   LOG_STREAM(err, log_filesystem)
 
#define LOG_AC   LOG_STREAM(info, log_addons_client)
 

Functions

bool manage_addons (CVideo &v)
 Shows the add-ons server connection dialog, for access to the various management front-ends. More...
 
bool ad_hoc_addon_fetch_session (CVideo &v, 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...
 

Variables

static lg::log_domain log_config ("config")
 
static lg::log_domain log_network ("network")
 
static lg::log_domain log_filesystem ("filesystem")
 
static lg::log_domain log_addons_client ("addons-client")
 

Macro Definition Documentation

#define ERR_CFG   LOG_STREAM(err, log_config)

Definition at line 39 of file manager_ui.cpp.

Referenced by ad_hoc_addon_fetch_session().

#define ERR_FS   LOG_STREAM(err, log_filesystem)

Definition at line 43 of file manager_ui.cpp.

Referenced by ad_hoc_addon_fetch_session().

#define ERR_NET   LOG_STREAM(err, log_network)

Definition at line 41 of file manager_ui.cpp.

Referenced by ad_hoc_addon_fetch_session().

#define LOG_AC   LOG_STREAM(info, log_addons_client)

Definition at line 45 of file manager_ui.cpp.

Referenced by ad_hoc_addon_fetch_session().

Function Documentation

bool ad_hoc_addon_fetch_session ( CVideo v,
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
vTarget for UI rendering.
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 256 of file manager_ui.cpp.

References _(), preferences::campaign_server(), addons_client::connect(), e, ERR_CFG, ERR_FS, ERR_NET, addons_client::install_addon_with_checks(), LOG_AC, game::error::message, invalid_pbl_exception::message, addons_client::install_result::outcome, invalid_pbl_exception::path, wml_exception::show(), gui2::show_error_message(), addons_client::success, vgettext(), and game::error::what().

Referenced by gui2::dialogs::handle_addon_requirements_gui().

bool manage_addons ( CVideo v)

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

Parameters
vTarget for UI rendering.
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 229 of file manager_ui.cpp.

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

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

Variable Documentation

lg::log_domain log_addons_client("addons-client")
static
lg::log_domain log_config("config")
static
lg::log_domain log_filesystem("filesystem")
static
lg::log_domain log_network("network")
static