15 #define GETTEXT_DOMAIN "wesnoth-lib"
80 , clean_button_(
nullptr)
81 , purge_button_(
nullptr)
82 , size_label_(
nullptr)
88 clean_button_ = &find_widget<tbutton>(&window,
"clean",
false);
89 purge_button_ = &find_widget<tbutton>(&window,
"purge",
false);
90 size_label_ = &find_widget<tlabel>(&window,
"size",
false);
94 ttext_& path_box = find_widget<ttext_>(&window,
"path",
false);
98 tbutton& copy = find_widget<tbutton>(&window,
"copy",
false);
104 copy.
set_tooltip(
_(
"Clipboard support not found, contact your packager"));
107 tbutton& browse = find_widget<tbutton>(&window,
"browse",
false);
164 _(
"The game data cache has been cleaned."));
167 _(
"The game data cache could not be completely cleaned."));
184 _(
"The game data cache has been purged."));
187 _(
"The game data cache could not be purged."));
std::string si_string(double input, bool base2, std::string unit)
Convert into a string with an SI-postfix.
void show_error_message(CVideo &video, const std::string &message, bool message_use_markup)
Shows an error message to the user.
static config_cache & instance()
Get reference to the singleton object.
bool available()
Whether wesnoth was compiled with support for a clipboard.
virtual void set_active(const bool active) override
See tcontrol::set_active.
REGISTER_DIALOG(label_settings)
virtual void set_label(const t_string &label)
void update_cache_size_display()
void connect_signal_mouse_left_click(tdispatcher &dispatcher, const tsignal_function &signal)
Connects a signal handler for a left mouse button click.
virtual void set_value(const std::string &text)
The set_value is virtual for the tpassword_box class.
void browse_cache_callback()
base class of top level items, the only item which needs to store the final canvases to draw on ...
A class inherited from ttext_box that displays its input as stars.
Desktop environment interaction functions.
static UNUSEDNOWARN std::string _(const char *str)
bool clean_cache()
Deletes stale cache files not in use by the game.
void show_message(CVideo &video, const std::string &title, const std::string &message, const std::string &button_caption, const bool auto_close, const bool message_use_markup)
Shows a message to the user.
void set_tooltip(const t_string &tooltip)
bool open_object(const std::string &path_or_url)
Opens the specified object with the default application configured for its type.
std::string get_cache_dir()
int dir_size(const std::string &path)
Returns the sum of the sizes of the files contained in a directory.
void post_show(twindow &window)
Inherited from tdialog.
void pre_show(twindow &window)
Inherited from tdialog.
Declarations for File-IO.
void purge_cache_callback(CVideo &video)
void copy_to_clipboard_callback()
void clean_cache_callback(CVideo &video)
void copy_to_clipboard(const std::string &text, const bool)
Copies text to the clipboard.
Abstract base class for text items.
bool purge_cache()
Deletes all cache files.