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