16 #define GETTEXT_DOMAIN "wesnoth-lib"
103 label * nlabel = find_widget<label>(&
window,
"notification_label",
false,
true);
104 nlabel->
set_tooltip(
_(
"This build of wesnoth does not include support for desktop notifications, contact your package manager"));
108 in_lobby = find_widget<toggle_button>(&
window,
"ready_for_start_lobby",
false,
true);
111 in_lobby = find_widget<toggle_button>(&
window,
"game_has_begun_lobby",
false,
true);
114 in_lobby = find_widget<toggle_button>(&
window,
"turn_changed_sound",
false,
true);
117 in_lobby = find_widget<toggle_button>(&
window,
"turn_changed_lobby",
false,
true);
121 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 text that 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)
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)
REGISTER_DIALOG(editor_edit_unit)
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)