16 #define GETTEXT_DOMAIN "wesnoth-lib"
43 , clean_button_(
nullptr)
44 , purge_button_(
nullptr)
45 , size_label_(
nullptr)
53 size_label_ = find_widget<label>(
"size",
false,
true);
61 button& copy = find_widget<button>(
"copy");
66 button& browse = find_widget<button>(
"browse");
121 _(
"The game data cache has been cleaned."));
140 _(
"The game data cache has been purged."));
bool purge_cache()
Deletes all cache files.
static config_cache & instance()
Get reference to the singleton object.
bool clean_cache()
Deletes stale cache files not in use by the game.
void copy_to_clipboard_callback()
virtual void post_show() override
Actions to be taken after the window has been shown.
virtual void pre_show() override
Actions to be taken before showing the window.
void clean_cache_callback()
void purge_cache_callback()
void update_cache_size_display()
void browse_cache_callback()
std::string cache_path_
The display function.
Abstract base class for all modal dialogs.
Abstract base class for text items.
virtual void set_value(const std::string &text)
The set_value is virtual for the password_box class.
virtual void set_active(const bool active) override
See styled_widget::set_active.
Declarations for File-IO.
static std::string _(const char *str)
void copy_to_clipboard(const std::string &text)
Copies text to the clipboard.
bool open_object([[maybe_unused]] const std::string &path_or_url)
std::string get_cache_dir()
int dir_size(const std::string &pname)
Returns the sum of the sizes of the files contained in a directory.
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_error_message(const std::string &msg, bool message_use_markup)
Shows an error message to the user.
void show_message(const std::string &title, const std::string &msg, const std::string &button_caption, const bool auto_close, const bool message_use_markup, const bool title_use_markup)
Shows a message to the user.
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.
std::string si_string(double input, bool base2, const std::string &unit)
Convert into a string with an SI-postfix.
Desktop environment interaction functions.