#include "addon/info.hpp"
#include "config.hpp"
#include "font/pango/escape.hpp"
#include "gettext.hpp"
#include "picture.hpp"
#include "log.hpp"
#include "serialization/chrono.hpp"
#include "serialization/string_utils.hpp"
Go to the source code of this file.
Macros | |
#define | ERR_AC LOG_STREAM(err , log_addons_client) |
#define | LOG_AC LOG_STREAM(info, log_addons_client) |
Functions | |
void | read_addons_list (const config &cfg, addons_list &dest) |
Parse the specified add-ons list WML into an actual addons_list object. More... | |
std::string | size_display_string (double size) |
Get a human-readable representation of the specified byte count. More... | |
std::string | make_addon_title (const std::string &id) |
Replaces underscores to dress up file or dirnames as add-on titles. More... | |
Variables | |
static lg::log_domain | log_addons_client ("addons-client") |
#define ERR_AC LOG_STREAM(err , log_addons_client) |
#define LOG_AC LOG_STREAM(info, log_addons_client) |
std::string make_addon_title | ( | const std::string & | id | ) |
Replaces underscores to dress up file or dirnames as add-on titles.
Definition at line 318 of file info.cpp.
Referenced by gui2::dialogs::addon_manager::delete_addon(), addons_client::delete_remote_addon(), addon_info::display_title(), addons_client::do_resolve_addon_dependencies(), and addons_client::upload_addon().
void read_addons_list | ( | const config & | cfg, |
addons_list & | dest | ||
) |
Parse the specified add-ons list WML into an actual addons_list object.
cfg | Add-ons list WML, currently a [campaigns] node from a server response. |
dest | Target addons_list object. It will be cleared first. |
Definition at line 292 of file info.cpp.
References config::child_range(), ERR_AC, and id.
Referenced by gui2::dialogs::addon_manager::load_addon_list().
std::string size_display_string | ( | double | size | ) |
Get a human-readable representation of the specified byte count.
The result includes the size unit, which is the largest byte multiply that makes sense. (e.g. 1 MiB for 1048576 bytes.)
Definition at line 309 of file info.cpp.
References _(), utils::si_string(), and utf8::size().
Referenced by gui2::dialogs::addon_manager::on_addon_select(), and gui2::addon_list::set_addons().
|
static |