The Battle for Wesnoth  1.15.1+dev
install_dependencies.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2016 - 2018 by Jyrki Vesterinen <sandgtx@gmail.com>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #include "install_dependencies.hpp"
16 
17 #define GETTEXT_DOMAIN "wesnoth"
18 
19 #include "gettext.hpp"
22 #include "gui/widgets/label.hpp"
23 #include "gui/widgets/settings.hpp"
24 #include "gui/widgets/window.hpp"
25 #include "tstring.hpp"
26 
27 namespace gui2
28 {
29 namespace dialogs
30 {
31 
32 REGISTER_DIALOG(install_dependencies)
33 
35 {
36  find_widget<label>(&window, "label", false).set_label(t_string(
37  _n(
38  "The selected add-on has the following dependency, which is outdated or not currently installed. Do you wish to install it before continuing?",
39  "The selected add-on has the following dependencies, which are outdated or not currently installed. Do you wish to install them before continuing?",
40  addons_.size())
41  ));
42 
43  find_widget<addon_list>(&window, "dependencies", false).set_addons(addons_);
44 }
45 
46 }
47 }
This file contains the window object, this object is a top level container which has the event manage...
Generic file dialog.
Definition: field-fwd.hpp:22
This file contains the settings handling of the widget library.
static UNUSEDNOWARN std::string _n(const char *str1, const char *str2, int n)
Definition: gettext.hpp:95
Various uncategorised dialogs.
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:63