16 #define GETTEXT_DOMAIN "wesnoth-lib"
105 label * nlabel = find_widget<label>(&
window,
"notification_label",
false,
true);
106 nlabel->
set_tooltip(
_(
"This build of wesnoth does not include support for desktop notifications, contact your package manager"));
110 in_lobby = find_widget<toggle_button>(&
window,
"ready_for_start_lobby",
false,
true);
113 in_lobby = find_widget<toggle_button>(&
window,
"game_has_begun_lobby",
false,
true);
116 in_lobby = find_widget<toggle_button>(&
window,
"turn_changed_sound",
false,
true);
119 in_lobby = find_widget<toggle_button>(&
window,
"turn_changed_lobby",
false,
true);
123 defaults = find_widget<button>(&
window,
"revert_to_defaults",
false,
true);
Abstract base class for all modal dialogs.
A Preferences subdialog permitting to configure the sounds and notifications generated in response to...
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
A label displays a text, the text can be wrapped but no scrollbars are provided.
base class of top level items, the only item which needs to store the final canvases to draw on.
static std::string _(const char *str)
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
bool available()
Returns whether we were compiled with support for desktop notifications.
static void set_pref_and_button(const std::string &id, bool value, window &window)
static void revert_to_default_pref_values(window &window)
static void setup_item(const std::string &item, window &window)
static toggle_button * setup_pref_toggle_button(const std::string &id, bool def, window &window)
void connect_signal_mouse_left_click(dispatcher &dispatcher, const signal &signal)
Connects a signal handler for a left mouse button click.
std::pair< std::string, unsigned > item
const std::vector< std::string > items
bool get_def_pref_lobby(const std::string &id)
bool get_def_pref_sound(const std::string &id)
bool get_def_pref_notif(const std::string &id)
void set(const std::string &key, bool value)
std::string get(const std::string &key)
This file contains the settings handling of the widget library.