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");
62 connect_signal_mouse_left_click(copy,
66 button& browse = find_widget<button>(
"browse");
67 connect_signal_mouse_left_click(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)
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
void copy_to_clipboard(const std::string &text)
Copies text to the clipboard.
bool open_object(const std::string &path_or_url)
Opens the specified object with the default application configured for its type.
int dir_size(const std::string &path)
Returns the sum of the sizes of the files contained in a directory.
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::string si_string(double input, bool base2, const std::string &unit)
Convert into a string with an SI-postfix.
Desktop environment interaction functions.