16 #define GETTEXT_DOMAIN "wesnoth-lib"
44 const std::string text_feature_on =
"<span color='#0f0'>●</span>";
45 const std::string text_feature_off =
"<span color='#f00'>●</span>";
56 , path_wid_stem_("path_")
57 , copy_wid_stem_("copy_")
58 , browse_wid_stem_("browse_")
64 , start_page_(start_page)
90 generate_plain_text_report();
112 button& copy_all = find_widget<button>(&
window,
"copy_all",
false);
116 button& credits_button = find_widget<button>(&
window,
"credits",
false);
119 button& license_button = find_widget<button>(&
window,
"license",
false);
122 button& issue_button = find_widget<button>(&
window,
"issue",
false);
134 const std::string& path_id = path_ent.first;
158 copy_w.
set_tooltip(
_(
"Clipboard support not found, contact your packager"));
162 button& stderr_button = find_widget<button>(&
window,
"open_stderr",
false);
174 = find_widget<listbox>(&
window,
"deps_listbox",
false);
176 for(
const auto & dep :
deps_)
178 list_data[
"dep_name"][
"label"] = dep[0];
180 list_data[
"dep_build_version"][
"label"] = dep[1];
185 if(!dep[2].empty()) {
186 list_data[
"dep_rt_version"][
"label"] = dep[2];
191 deps_listbox.
add_row(list_data);
203 = find_widget<listbox>(&
window,
"opts_listbox",
false);
205 for(
const auto & opt :
opts_)
207 list_data[
"opt_name"][
"label"] = opt.name;
210 list_data[
"opt_status"][
"label"] = text_feature_on;
212 list_data[
"opt_status"][
"label"] = text_feature_off;
214 list_data[
"opt_status"][
"use_markup"] =
"true";
216 opts_listbox.
add_row(list_data);
273 gui2::dialogs::end_credits::display();
const std::string path_wid_stem_
The display function.
void report_issue()
Open browser to report issue.
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, const std::string btn_id)
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
void show_license()
Show license.
void run_migrator()
Callback function to re-run the version migration dialog.
void show_credits_dialog()
Show credits dialogs.
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_
@ auto_close
Enables auto close.
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.
A container widget that shows one of its pages of widgets depending on which tab the user clicked.
void select_tab(unsigned index)
Abstract base class for text items.
virtual void set_value(const std::string &text)
The set_value is virtual for the password_box class.
base class of top level items, the only item which needs to store the final canvases to draw on.
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_data_dir()
static bool file_exists(const bfs::path &fpath)
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_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
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.
void show_help(const std::string &show_topic, int xloc, int yloc)
Open the help browser, show topic with id show_topic.
std::string get_log_file_path()
std::map< std::string, t_string > string_map
Desktop environment interaction functions.