16 #define GETTEXT_DOMAIN "wesnoth-lib"
39 const std::string text_feature_on =
"<span color='#0f0'>●</span>";
40 const std::string text_feature_off =
"<span color='#f00'>●</span>";
51 , path_wid_stem_("path_")
52 , copy_wid_stem_("copy_")
53 , browse_wid_stem_("browse_")
85 generate_plain_text_report();
104 button& copy_all = find_widget<button>(&
window,
"copy_all",
false);
113 const std::string& path_id = path_ent.first;
138 copy_w.
set_tooltip(
_(
"Clipboard support not found, contact your packager"));
142 button& stderr_button = find_widget<button>(&
window,
"open_stderr",
false);
153 = find_widget<listbox>(&
window,
"deps_listbox",
false);
155 for(
const auto & dep :
deps_)
157 list_data[
"dep_name"][
"label"] = dep[0];
159 list_data[
"dep_build_version"][
"label"] = dep[1];
164 if(!dep[2].empty()) {
165 list_data[
"dep_rt_version"][
"label"] = dep[2];
170 deps_listbox.
add_row(list_data);
181 = find_widget<listbox>(&
window,
"opts_listbox",
false);
183 for(
const auto & opt :
opts_)
185 list_data[
"opt_name"][
"label"] = opt.name;
188 list_data[
"opt_status"][
"label"] = text_feature_on;
190 list_data[
"opt_status"][
"label"] = text_feature_off;
192 list_data[
"opt_status"][
"use_markup"] =
"true";
194 opts_listbox.
add_row(list_data);
205 = find_widget<stacked_widget>(&
window,
"tabs_container",
false);
209 = find_widget<listbox>(&
window,
"tab_bar",
false);
223 = find_widget<stacked_widget>(
get_window(),
"tabs_container",
false);
225 = find_widget<listbox>(
get_window(),
"tab_bar",
false);
Dialog displaying the various paths used by the game to locate resource and configuration files.
const std::string path_wid_stem_
The display function.
void tab_switch_callback()
Callback function called when switching tabs.
std::array< std::string, 4 > deplist_entry
const std::string copy_wid_stem_
const std::string browse_wid_stem_
void report_copy_callback()
Callback function for the dialog-wide copy-to-clipboard button.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
void copy_to_clipboard_callback(const std::string &path)
Callback function for copy-to-clipboard action buttons.
std::map< std::string, std::string > path_map_
const std::string log_path_
path to current log file
std::vector< deplist_entry > deps_
void generate_plain_text_report()
void browse_directory_callback(const std::string &path)
Callback function for browse-directory action buttons.
std::vector< game_config::optional_feature > opts_
Abstract base class for all modal dialogs.
window * get_window()
Returns a pointer to the dialog's window.
grid & add_row(const widget_item &item, const int index=-1)
When an item in the list is selected by the user we need to update the state.
bool select_row(const unsigned row, const bool select=true)
Selects a row.
int get_selected_row() const
Returns the first selected row.
unsigned get_item_count() const
Returns the number of items in the listbox.
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.
base class of top level items, the only item which needs to store the final canvases to draw on.
void keyboard_capture(widget *widget)
Platform identification and version information functions.
Declarations for File-IO.
static std::string _(const char *str)
void copy_to_clipboard(const std::string &text, const bool)
Copies text to the clipboard.
bool available()
Whether wesnoth was compiled with support for a clipboard.
bool open_object([[maybe_unused]] const std::string &path_or_url)
constexpr bool open_object_is_supported()
Returns whether open_object() is supported/implemented for the current platform.
std::string os_version()
Returns a string with the running OS name and version information.
std::string get_cache_dir()
std::string get_user_config_dir()
std::string get_user_data_dir()
std::string get_saves_dir()
std::string get_screenshot_dir()
std::string get_logs_dir()
std::string get_addons_dir()
std::string normalize_path(const std::string &fpath, bool normalize_separators, bool resolve_dot_entries)
Returns the absolute path of a file.
const std::string unicode_em_dash
Game configuration data as global variables.
const std::string & library_name(LIBRARY_ID lib)
Retrieve the user-visible name for the given library.
std::string full_build_report()
Produce a bug report-style info dump.
std::vector< optional_feature > optional_features_table(bool localize)
Retrieve the features table.
const std::string & library_runtime_version(LIBRARY_ID lib)
Retrieve the runtime version number of the given library.
const std::string & library_build_version(LIBRARY_ID lib)
Retrieve the build-time version number of the given library.
std::string build_arch()
Obtain the processor architecture for this build.
const std::string revision
REGISTER_DIALOG(editor_edit_unit)
void connect_signal_notify_modified(dispatcher &dispatcher, const signal_notification &signal)
Connects a signal handler for getting a notification upon modification.
void connect_signal_mouse_left_click(dispatcher &dispatcher, const signal &signal)
Connects a signal handler for a left mouse button click.
std::map< std::string, widget_item > widget_data
std::string get_log_file_path()
std::map< std::string, t_string > string_map
Desktop environment interaction functions.
#define VALIDATE(cond, message)
The macro to use for the validation of WML.