Merge lp:~widelands-dev/widelands/boost-signals2 into lp:widelands
- boost-signals2
- Merge into trunk
Proposed by
Jens Beyer
Status: | Merged |
---|---|
Merged at revision: | 6695 |
Proposed branch: | lp:~widelands-dev/widelands/boost-signals2 |
Merge into: | lp:widelands |
Diff against target: |
601 lines (+71/-71) 28 files modified
CMakeLists.txt (+2/-2) src/game_io/game_loader.cc (+1/-1) src/logic/building.cc (+1/-1) src/logic/building.h (+3/-3) src/logic/instances.h (+2/-2) src/logic/message.h (+1/-1) src/logic/player.cc (+1/-1) src/logic/warelist.h (+2/-2) src/ui_basic/button.h (+4/-4) src/ui_basic/checkbox.h (+4/-4) src/ui_basic/editbox.h (+4/-4) src/ui_basic/icongrid.h (+4/-4) src/ui_basic/listselect.h (+4/-4) src/ui_basic/messagebox.h (+4/-4) src/ui_basic/multilineeditbox.h (+2/-2) src/ui_basic/panel.h (+2/-2) src/ui_basic/radiobutton.h (+3/-3) src/ui_basic/scrollbar.h (+2/-2) src/ui_basic/slider.h (+5/-5) src/ui_basic/table.h (+5/-5) src/wui/building_ui.cc (+1/-1) src/wui/fieldaction.cc (+3/-3) src/wui/gamechatpanel.h (+2/-2) src/wui/mapview.h (+3/-3) src/wui/minimap.h (+2/-2) src/wui/waresdisplay.cc (+1/-1) src/wui/waresdisplay.h (+2/-2) src/wui/watchwindow.cc (+1/-1) |
To merge this branch: | bzr merge lp:~widelands-dev/widelands/boost-signals2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
SirVer | Approve | ||
Review via email: mp+178361@code.launchpad.net |
Commit message
Description of the change
Just for the kicks of it, I ported to (what I think is) boost signals2 ;-)
It compiles and runs fine on Ubuntu 12.04 LTS (with boost 1.46.1).
I also set boost 1.46.1 as minimum required boost version just to make sure, but I am open to set it to 1.39 as this is the version of the last stable API (as hjd says).
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2013-07-23 18:09:24 +0000 | |||
3 | +++ CMakeLists.txt 2013-08-02 18:49:35 +0000 | |||
4 | @@ -117,7 +117,7 @@ | |||
5 | 117 | set (Boost_FIND_COMPONENTS unit_test_framework signals) | 117 | set (Boost_FIND_COMPONENTS unit_test_framework signals) |
6 | 118 | set (Boost_USE_MULTITHREADED ON) | 118 | set (Boost_USE_MULTITHREADED ON) |
7 | 119 | set (Boost_DETAILED_FAILURE_MSG ON) | 119 | set (Boost_DETAILED_FAILURE_MSG ON) |
9 | 120 | find_package(Boost 1.35.0 COMPONENTS unit_test_framework signals REQUIRED) | 120 | find_package(Boost 1.46.1 COMPONENTS unit_test_framework signals REQUIRED) |
10 | 121 | 121 | ||
11 | 122 | if (NOT DEFINED MSVC) | 122 | if (NOT DEFINED MSVC) |
12 | 123 | # If boost unit test library is linked dynamically, BOOST_TEST_DYN_LINK must be defined | 123 | # If boost unit test library is linked dynamically, BOOST_TEST_DYN_LINK must be defined |
13 | @@ -150,7 +150,7 @@ | |||
14 | 150 | endif(DEFINED MSVC) | 150 | endif(DEFINED MSVC) |
15 | 151 | set (Boost_USE_MULTITHREADED ON) | 151 | set (Boost_USE_MULTITHREADED ON) |
16 | 152 | set (Boost_DETAILED_FAILURE_MSG ON) | 152 | set (Boost_DETAILED_FAILURE_MSG ON) |
18 | 153 | find_package(Boost 1.35.0 COMPONENTS signals REQUIRED) | 153 | find_package(Boost 1.46.1 COMPONENTS signals REQUIRED) |
19 | 154 | endif (WL_UNIT_TESTS) | 154 | endif (WL_UNIT_TESTS) |
20 | 155 | 155 | ||
21 | 156 | option (WL_STRICT "If strict compilation mode is requested (almost every warning is an error)" OFF) | 156 | option (WL_STRICT "If strict compilation mode is requested (almost every warning is an error)" OFF) |
22 | 157 | 157 | ||
23 | === modified file 'src/game_io/game_loader.cc' | |||
24 | --- src/game_io/game_loader.cc 2013-07-27 15:09:18 +0000 | |||
25 | +++ src/game_io/game_loader.cc 2013-08-02 18:49:35 +0000 | |||
26 | @@ -20,7 +20,7 @@ | |||
27 | 20 | #include "game_io/game_loader.h" | 20 | #include "game_io/game_loader.h" |
28 | 21 | 21 | ||
29 | 22 | #include <boost/bind.hpp> | 22 | #include <boost/bind.hpp> |
31 | 23 | #include <boost/signal.hpp> | 23 | #include <boost/signals2.hpp> |
32 | 24 | 24 | ||
33 | 25 | #include "game_io/game_cmd_queue_data_packet.h" | 25 | #include "game_io/game_cmd_queue_data_packet.h" |
34 | 26 | #include "game_io/game_game_class_data_packet.h" | 26 | #include "game_io/game_game_class_data_packet.h" |
35 | 27 | 27 | ||
36 | === modified file 'src/logic/building.cc' | |||
37 | --- src/logic/building.cc 2013-07-27 10:37:24 +0000 | |||
38 | +++ src/logic/building.cc 2013-08-02 18:49:35 +0000 | |||
39 | @@ -448,7 +448,7 @@ | |||
40 | 448 | 448 | ||
41 | 449 | PlayerImmovable::cleanup(egbase); | 449 | PlayerImmovable::cleanup(egbase); |
42 | 450 | 450 | ||
44 | 451 | BOOST_FOREACH(boost::signals::connection& c, options_window_connections) | 451 | BOOST_FOREACH(boost::signals2::connection& c, options_window_connections) |
45 | 452 | c.disconnect(); | 452 | c.disconnect(); |
46 | 453 | } | 453 | } |
47 | 454 | 454 | ||
48 | 455 | 455 | ||
49 | === modified file 'src/logic/building.h' | |||
50 | --- src/logic/building.h 2013-07-26 20:19:36 +0000 | |||
51 | +++ src/logic/building.h 2013-08-02 18:49:35 +0000 | |||
52 | @@ -24,7 +24,7 @@ | |||
53 | 24 | #include <string> | 24 | #include <string> |
54 | 25 | #include <vector> | 25 | #include <vector> |
55 | 26 | 26 | ||
57 | 27 | #include <boost/signal.hpp> | 27 | #include <boost/signals2.hpp> |
58 | 28 | 28 | ||
59 | 29 | #include "ai/ai_hints.h" | 29 | #include "ai/ai_hints.h" |
60 | 30 | #include "logic/buildcost.h" | 30 | #include "logic/buildcost.h" |
61 | @@ -261,7 +261,7 @@ | |||
62 | 261 | 261 | ||
63 | 262 | void add_worker(Worker &); | 262 | void add_worker(Worker &); |
64 | 263 | void remove_worker(Worker &); | 263 | void remove_worker(Worker &); |
66 | 264 | mutable boost::signal<void ()> workers_changed; | 264 | mutable boost::signals2::signal<void ()> workers_changed; |
67 | 265 | 265 | ||
68 | 266 | void send_message | 266 | void send_message |
69 | 267 | (Game & game, | 267 | (Game & game, |
70 | @@ -308,7 +308,7 @@ | |||
71 | 308 | bool m_seeing; | 308 | bool m_seeing; |
72 | 309 | 309 | ||
73 | 310 | // Signals connected for the option window | 310 | // Signals connected for the option window |
75 | 311 | std::vector<boost::signals::connection> options_window_connections; | 311 | std::vector<boost::signals2::connection> options_window_connections; |
76 | 312 | 312 | ||
77 | 313 | // The former buildings descrs, with the current one in last position. | 313 | // The former buildings descrs, with the current one in last position. |
78 | 314 | FormerBuildings m_old_buildings; | 314 | FormerBuildings m_old_buildings; |
79 | 315 | 315 | ||
80 | === modified file 'src/logic/instances.h' | |||
81 | --- src/logic/instances.h 2013-07-27 15:09:18 +0000 | |||
82 | +++ src/logic/instances.h 2013-08-02 18:49:35 +0000 | |||
83 | @@ -28,7 +28,7 @@ | |||
84 | 28 | #include <boost/function.hpp> | 28 | #include <boost/function.hpp> |
85 | 29 | #include <boost/noncopyable.hpp> | 29 | #include <boost/noncopyable.hpp> |
86 | 30 | #include <boost/unordered_map.hpp> | 30 | #include <boost/unordered_map.hpp> |
88 | 31 | #include <boost/signal.hpp> | 31 | #include <boost/signals2.hpp> |
89 | 32 | 32 | ||
90 | 33 | #include "logic/cmd_queue.h" | 33 | #include "logic/cmd_queue.h" |
91 | 34 | #include "log.h" | 34 | #include "log.h" |
92 | @@ -202,7 +202,7 @@ | |||
93 | 202 | * the game. No conncetion is handled in this class. | 202 | * the game. No conncetion is handled in this class. |
94 | 203 | * \param serial : the object serial | 203 | * \param serial : the object serial |
95 | 204 | */ | 204 | */ |
97 | 205 | boost::signal<void(uint32_t)> removed; | 205 | boost::signals2::signal<void(uint32_t)> removed; |
98 | 206 | 206 | ||
99 | 207 | /** | 207 | /** |
100 | 208 | * Attributes are fixed boolean properties of an object. | 208 | * Attributes are fixed boolean properties of an object. |
101 | 209 | 209 | ||
102 | === modified file 'src/logic/message.h' | |||
103 | --- src/logic/message.h 2013-07-27 15:09:18 +0000 | |||
104 | +++ src/logic/message.h 2013-08-02 18:49:35 +0000 | |||
105 | @@ -21,7 +21,7 @@ | |||
106 | 21 | #define MESSAGE_H | 21 | #define MESSAGE_H |
107 | 22 | 22 | ||
108 | 23 | #include <string> | 23 | #include <string> |
110 | 24 | #include <boost/signal.hpp> | 24 | #include <boost/signals2.hpp> |
111 | 25 | 25 | ||
112 | 26 | #include "logic/widelands.h" | 26 | #include "logic/widelands.h" |
113 | 27 | #include "logic/widelands_geometry.h" | 27 | #include "logic/widelands_geometry.h" |
114 | 28 | 28 | ||
115 | === modified file 'src/logic/player.cc' | |||
116 | --- src/logic/player.cc 2013-08-01 08:33:15 +0000 | |||
117 | +++ src/logic/player.cc 2013-08-02 18:49:35 +0000 | |||
118 | @@ -20,7 +20,7 @@ | |||
119 | 20 | #include "logic/player.h" | 20 | #include "logic/player.h" |
120 | 21 | 21 | ||
121 | 22 | #include <boost/bind.hpp> | 22 | #include <boost/bind.hpp> |
123 | 23 | #include <boost/signal.hpp> | 23 | #include <boost/signals2.hpp> |
124 | 24 | 24 | ||
125 | 25 | #include "economy/economy.h" | 25 | #include "economy/economy.h" |
126 | 26 | #include "economy/flag.h" | 26 | #include "economy/flag.h" |
127 | 27 | 27 | ||
128 | === modified file 'src/logic/warelist.h' | |||
129 | --- src/logic/warelist.h 2013-07-26 20:19:36 +0000 | |||
130 | +++ src/logic/warelist.h 2013-08-02 18:49:35 +0000 | |||
131 | @@ -25,7 +25,7 @@ | |||
132 | 25 | 25 | ||
133 | 26 | #include <SDL.h> | 26 | #include <SDL.h> |
134 | 27 | #include <boost/bind.hpp> | 27 | #include <boost/bind.hpp> |
136 | 28 | #include <boost/signal.hpp> | 28 | #include <boost/signals2.hpp> |
137 | 29 | 29 | ||
138 | 30 | #include "logic/widelands.h" | 30 | #include "logic/widelands.h" |
139 | 31 | 31 | ||
140 | @@ -62,7 +62,7 @@ | |||
141 | 62 | bool operator== (const WareList &) const; | 62 | bool operator== (const WareList &) const; |
142 | 63 | bool operator!= (const WareList & wl) const {return not (*this == wl);} | 63 | bool operator!= (const WareList & wl) const {return not (*this == wl);} |
143 | 64 | 64 | ||
145 | 65 | mutable boost::signal<void ()> changed; | 65 | mutable boost::signals2::signal<void ()> changed; |
146 | 66 | 66 | ||
147 | 67 | private: | 67 | private: |
148 | 68 | vector_type m_wares; | 68 | vector_type m_wares; |
149 | 69 | 69 | ||
150 | === modified file 'src/ui_basic/button.h' | |||
151 | --- src/ui_basic/button.h 2013-07-26 20:19:36 +0000 | |||
152 | +++ src/ui_basic/button.h 2013-08-02 18:49:35 +0000 | |||
153 | @@ -22,7 +22,7 @@ | |||
154 | 22 | 22 | ||
155 | 23 | #include <boost/bind.hpp> | 23 | #include <boost/bind.hpp> |
156 | 24 | #include <boost/function.hpp> | 24 | #include <boost/function.hpp> |
158 | 25 | #include <boost/signal.hpp> | 25 | #include <boost/signals2.hpp> |
159 | 26 | 26 | ||
160 | 27 | #include "constants.h" | 27 | #include "constants.h" |
161 | 28 | #include "ui_basic/panel.h" | 28 | #include "ui_basic/panel.h" |
162 | @@ -85,9 +85,9 @@ | |||
163 | 85 | // If no background is drawn, the button is drawn over the current background | 85 | // If no background is drawn, the button is drawn over the current background |
164 | 86 | void set_draw_flat_background(bool set); | 86 | void set_draw_flat_background(bool set); |
165 | 87 | 87 | ||
169 | 88 | boost::signal<void ()> sigclicked; | 88 | boost::signals2::signal<void ()> sigclicked; |
170 | 89 | boost::signal<void ()> sigmousein; | 89 | boost::signals2::signal<void ()> sigmousein; |
171 | 90 | boost::signal<void ()> sigmouseout; | 90 | boost::signals2::signal<void ()> sigmouseout; |
172 | 91 | 91 | ||
173 | 92 | protected: | 92 | protected: |
174 | 93 | virtual void clicked() {} /// Override this to react on the click. | 93 | virtual void clicked() {} /// Override this to react on the click. |
175 | 94 | 94 | ||
176 | === modified file 'src/ui_basic/checkbox.h' | |||
177 | --- src/ui_basic/checkbox.h 2013-07-26 20:19:36 +0000 | |||
178 | +++ src/ui_basic/checkbox.h 2013-08-02 18:49:35 +0000 | |||
179 | @@ -20,7 +20,7 @@ | |||
180 | 20 | #ifndef UI_CHECKBOX_H | 20 | #ifndef UI_CHECKBOX_H |
181 | 21 | #define UI_CHECKBOX_H | 21 | #define UI_CHECKBOX_H |
182 | 22 | 22 | ||
184 | 23 | #include <boost/signals.hpp> | 23 | #include <boost/signals2.hpp> |
185 | 24 | 24 | ||
186 | 25 | #include "ui_basic/panel.h" | 25 | #include "ui_basic/panel.h" |
187 | 26 | #include "rgbcolor.h" | 26 | #include "rgbcolor.h" |
188 | @@ -42,9 +42,9 @@ | |||
189 | 42 | const std::string & tooltip_text = std::string()); | 42 | const std::string & tooltip_text = std::string()); |
190 | 43 | ~Statebox(); | 43 | ~Statebox(); |
191 | 44 | 44 | ||
195 | 45 | boost::signal<void ()> changed; | 45 | boost::signals2::signal<void ()> changed; |
196 | 46 | boost::signal<void (bool)> changedto; | 46 | boost::signals2::signal<void (bool)> changedto; |
197 | 47 | boost::signal<void (bool)> clickedto; // same as changedto but only called when clicked | 47 | boost::signals2::signal<void (bool)> clickedto; // same as changedto but only called when clicked |
198 | 48 | 48 | ||
199 | 49 | void set_enabled(bool enabled); | 49 | void set_enabled(bool enabled); |
200 | 50 | 50 | ||
201 | 51 | 51 | ||
202 | === modified file 'src/ui_basic/editbox.h' | |||
203 | --- src/ui_basic/editbox.h 2013-07-26 20:19:36 +0000 | |||
204 | +++ src/ui_basic/editbox.h 2013-08-02 18:49:35 +0000 | |||
205 | @@ -21,7 +21,7 @@ | |||
206 | 21 | #define UI_EDITBOX_H | 21 | #define UI_EDITBOX_H |
207 | 22 | 22 | ||
208 | 23 | #include <SDL_keyboard.h> | 23 | #include <SDL_keyboard.h> |
210 | 24 | #include <boost/signal.hpp> | 24 | #include <boost/signals2.hpp> |
211 | 25 | 25 | ||
212 | 26 | #include "align.h" | 26 | #include "align.h" |
213 | 27 | #include "ui_basic/button.h" | 27 | #include "ui_basic/button.h" |
214 | @@ -43,9 +43,9 @@ | |||
215 | 43 | const Image* background = g_gr->images().get("pics/but2.png"), Align align = Align_Center); | 43 | const Image* background = g_gr->images().get("pics/but2.png"), Align align = Align_Center); |
216 | 44 | virtual ~EditBox(); | 44 | virtual ~EditBox(); |
217 | 45 | 45 | ||
221 | 46 | boost::signal<void ()> changed; | 46 | boost::signals2::signal<void ()> changed; |
222 | 47 | boost::signal<void ()> ok; | 47 | boost::signals2::signal<void ()> ok; |
223 | 48 | boost::signal<void ()> cancel; | 48 | boost::signals2::signal<void ()> cancel; |
224 | 49 | 49 | ||
225 | 50 | const std::string & text() const; | 50 | const std::string & text() const; |
226 | 51 | void setText(const std::string &); | 51 | void setText(const std::string &); |
227 | 52 | 52 | ||
228 | === modified file 'src/ui_basic/icongrid.h' | |||
229 | --- src/ui_basic/icongrid.h 2013-07-26 20:19:36 +0000 | |||
230 | +++ src/ui_basic/icongrid.h 2013-08-02 18:49:35 +0000 | |||
231 | @@ -22,7 +22,7 @@ | |||
232 | 22 | 22 | ||
233 | 23 | #include <vector> | 23 | #include <vector> |
234 | 24 | 24 | ||
236 | 25 | #include <boost/signal.hpp> | 25 | #include <boost/signals2.hpp> |
237 | 26 | 26 | ||
238 | 27 | #include "ui_basic/panel.h" | 27 | #include "ui_basic/panel.h" |
239 | 28 | #include "ui_basic/textarea.h" | 28 | #include "ui_basic/textarea.h" |
240 | @@ -41,9 +41,9 @@ | |||
241 | 41 | int32_t x, int32_t y, int32_t cellw, int32_t cellh, | 41 | int32_t x, int32_t y, int32_t cellw, int32_t cellh, |
242 | 42 | int32_t cols); | 42 | int32_t cols); |
243 | 43 | 43 | ||
247 | 44 | boost::signal<void (int32_t)> clicked; | 44 | boost::signals2::signal<void (int32_t)> clicked; |
248 | 45 | boost::signal<void (int32_t)> mouseout; | 45 | boost::signals2::signal<void (int32_t)> mouseout; |
249 | 46 | boost::signal<void (int32_t)> mousein; | 46 | boost::signals2::signal<void (int32_t)> mousein; |
250 | 47 | 47 | ||
251 | 48 | int32_t add | 48 | int32_t add |
252 | 49 | (const std::string & name, | 49 | (const std::string & name, |
253 | 50 | 50 | ||
254 | === modified file 'src/ui_basic/listselect.h' | |||
255 | --- src/ui_basic/listselect.h 2013-07-26 20:19:36 +0000 | |||
256 | +++ src/ui_basic/listselect.h 2013-08-02 18:49:35 +0000 | |||
257 | @@ -24,7 +24,7 @@ | |||
258 | 24 | #include <deque> | 24 | #include <deque> |
259 | 25 | #include <limits> | 25 | #include <limits> |
260 | 26 | 26 | ||
262 | 27 | #include <boost/signal.hpp> | 27 | #include <boost/signals2.hpp> |
263 | 28 | 28 | ||
264 | 29 | #include "align.h" | 29 | #include "align.h" |
265 | 30 | #include "ui_basic/panel.h" | 30 | #include "ui_basic/panel.h" |
266 | @@ -51,9 +51,9 @@ | |||
267 | 51 | bool show_check = false); | 51 | bool show_check = false); |
268 | 52 | ~BaseListselect(); | 52 | ~BaseListselect(); |
269 | 53 | 53 | ||
273 | 54 | boost::signal<void (uint32_t)> selected; | 54 | boost::signals2::signal<void (uint32_t)> selected; |
274 | 55 | boost::signal<void (uint32_t)> clicked; | 55 | boost::signals2::signal<void (uint32_t)> clicked; |
275 | 56 | boost::signal<void (uint32_t)> double_clicked; | 56 | boost::signals2::signal<void (uint32_t)> double_clicked; |
276 | 57 | 57 | ||
277 | 58 | void clear(); | 58 | void clear(); |
278 | 59 | void sort | 59 | void sort |
279 | 60 | 60 | ||
280 | === modified file 'src/ui_basic/messagebox.h' | |||
281 | --- src/ui_basic/messagebox.h 2013-07-26 20:19:36 +0000 | |||
282 | +++ src/ui_basic/messagebox.h 2013-08-02 18:49:35 +0000 | |||
283 | @@ -20,7 +20,7 @@ | |||
284 | 20 | #ifndef UI_MESSAGEBOX_H | 20 | #ifndef UI_MESSAGEBOX_H |
285 | 21 | #define UI_MESSAGEBOX_H | 21 | #define UI_MESSAGEBOX_H |
286 | 22 | 22 | ||
288 | 23 | #include <boost/signal.hpp> | 23 | #include <boost/signals2.hpp> |
289 | 24 | 24 | ||
290 | 25 | #include "align.h" | 25 | #include "align.h" |
291 | 26 | #include "ui_basic/window.h" | 26 | #include "ui_basic/window.h" |
292 | @@ -61,9 +61,9 @@ | |||
293 | 61 | Align = Align_Center); | 61 | Align = Align_Center); |
294 | 62 | ~WLMessageBox(); | 62 | ~WLMessageBox(); |
295 | 63 | 63 | ||
299 | 64 | boost::signal<void ()> ok; | 64 | boost::signals2::signal<void ()> ok; |
300 | 65 | boost::signal<void ()> yes; | 65 | boost::signals2::signal<void ()> yes; |
301 | 66 | boost::signal<void ()> no; | 66 | boost::signals2::signal<void ()> no; |
302 | 67 | 67 | ||
303 | 68 | bool handle_mousepress (Uint8 btn, int32_t mx, int32_t my); | 68 | bool handle_mousepress (Uint8 btn, int32_t mx, int32_t my); |
304 | 69 | bool handle_mouserelease(Uint8 btn, int32_t mx, int32_t my); | 69 | bool handle_mouserelease(Uint8 btn, int32_t mx, int32_t my); |
305 | 70 | 70 | ||
306 | === modified file 'src/ui_basic/multilineeditbox.h' | |||
307 | --- src/ui_basic/multilineeditbox.h 2013-07-26 20:19:36 +0000 | |||
308 | +++ src/ui_basic/multilineeditbox.h 2013-08-02 18:49:35 +0000 | |||
309 | @@ -20,7 +20,7 @@ | |||
310 | 20 | #ifndef UI_MULTILINEEDITBOX_H | 20 | #ifndef UI_MULTILINEEDITBOX_H |
311 | 21 | #define UI_MULTILINEEDITBOX_H | 21 | #define UI_MULTILINEEDITBOX_H |
312 | 22 | 22 | ||
314 | 23 | #include <boost/signal.hpp> | 23 | #include <boost/signals2.hpp> |
315 | 24 | 24 | ||
316 | 25 | #include "ui_basic/panel.h" | 25 | #include "ui_basic/panel.h" |
317 | 26 | 26 | ||
318 | @@ -36,7 +36,7 @@ | |||
319 | 36 | Multiline_Editbox | 36 | Multiline_Editbox |
320 | 37 | (Panel *, int32_t x, int32_t y, uint32_t w, uint32_t h, const std::string & text); | 37 | (Panel *, int32_t x, int32_t y, uint32_t w, uint32_t h, const std::string & text); |
321 | 38 | 38 | ||
323 | 39 | boost::signal<void ()> changed; | 39 | boost::signals2::signal<void ()> changed; |
324 | 40 | 40 | ||
325 | 41 | const std::string & get_text() const; | 41 | const std::string & get_text() const; |
326 | 42 | void set_text(const std::string &); | 42 | void set_text(const std::string &); |
327 | 43 | 43 | ||
328 | === modified file 'src/ui_basic/panel.h' | |||
329 | --- src/ui_basic/panel.h 2013-07-26 19:16:51 +0000 | |||
330 | +++ src/ui_basic/panel.h 2013-08-02 18:49:35 +0000 | |||
331 | @@ -28,7 +28,7 @@ | |||
332 | 28 | 28 | ||
333 | 29 | #include <SDL_keyboard.h> | 29 | #include <SDL_keyboard.h> |
334 | 30 | #include <boost/noncopyable.hpp> | 30 | #include <boost/noncopyable.hpp> |
336 | 31 | #include <boost/signals/trackable.hpp> | 31 | #include <boost/signals2/trackable.hpp> |
337 | 32 | 32 | ||
338 | 33 | #include "point.h" | 33 | #include "point.h" |
339 | 34 | 34 | ||
340 | @@ -57,7 +57,7 @@ | |||
341 | 57 | * its desired size changes, this automatically changes the actual size (which then invokes | 57 | * its desired size changes, this automatically changes the actual size (which then invokes |
342 | 58 | * \ref layout and \ref move_inside_parent). | 58 | * \ref layout and \ref move_inside_parent). |
343 | 59 | */ | 59 | */ |
345 | 60 | struct Panel : boost::signals::trackable, boost::noncopyable { | 60 | struct Panel : boost::signals2::trackable, boost::noncopyable { |
346 | 61 | enum { | 61 | enum { |
347 | 62 | pf_handle_mouse = 1, ///< receive mouse events | 62 | pf_handle_mouse = 1, ///< receive mouse events |
348 | 63 | pf_think = 2, ///< call think() function during run | 63 | pf_think = 2, ///< call think() function during run |
349 | 64 | 64 | ||
350 | === modified file 'src/ui_basic/radiobutton.h' | |||
351 | --- src/ui_basic/radiobutton.h 2013-07-26 20:19:36 +0000 | |||
352 | +++ src/ui_basic/radiobutton.h 2013-08-02 18:49:35 +0000 | |||
353 | @@ -58,9 +58,9 @@ | |||
354 | 58 | Radiogroup(); | 58 | Radiogroup(); |
355 | 59 | ~Radiogroup(); | 59 | ~Radiogroup(); |
356 | 60 | 60 | ||
360 | 61 | boost::signal<void ()> changed; | 61 | boost::signals2::signal<void ()> changed; |
361 | 62 | boost::signal<void (int32_t)> changedto; | 62 | boost::signals2::signal<void (int32_t)> changedto; |
362 | 63 | boost::signal<void ()> clicked; // clicked without things changed | 63 | boost::signals2::signal<void ()> clicked; // clicked without things changed |
363 | 64 | 64 | ||
364 | 65 | int32_t add_button | 65 | int32_t add_button |
365 | 66 | (Panel * parent, Point, const Image* pic, const std::string& tooltip = "", Radiobutton ** = nullptr); | 66 | (Panel * parent, Point, const Image* pic, const std::string& tooltip = "", Radiobutton ** = nullptr); |
366 | 67 | 67 | ||
367 | === modified file 'src/ui_basic/scrollbar.h' | |||
368 | --- src/ui_basic/scrollbar.h 2013-07-26 20:19:36 +0000 | |||
369 | +++ src/ui_basic/scrollbar.h 2013-08-02 18:49:35 +0000 | |||
370 | @@ -20,7 +20,7 @@ | |||
371 | 20 | #ifndef UI_SCROLLBAR_H | 20 | #ifndef UI_SCROLLBAR_H |
372 | 21 | #define UI_SCROLLBAR_H | 21 | #define UI_SCROLLBAR_H |
373 | 22 | 22 | ||
375 | 23 | #include <boost/signal.hpp> | 23 | #include <boost/signals2.hpp> |
376 | 24 | 24 | ||
377 | 25 | #include "ui_basic/panel.h" | 25 | #include "ui_basic/panel.h" |
378 | 26 | #include "rect.h" | 26 | #include "rect.h" |
379 | @@ -50,7 +50,7 @@ | |||
380 | 50 | (Panel * parent, | 50 | (Panel * parent, |
381 | 51 | int32_t x, int32_t y, uint32_t w, uint32_t h, bool horiz); | 51 | int32_t x, int32_t y, uint32_t w, uint32_t h, bool horiz); |
382 | 52 | 52 | ||
384 | 53 | boost::signal<void (int32_t)> moved; | 53 | boost::signals2::signal<void (int32_t)> moved; |
385 | 54 | 54 | ||
386 | 55 | void set_steps(int32_t steps); | 55 | void set_steps(int32_t steps); |
387 | 56 | void set_singlestepsize(uint32_t singlestepsize); | 56 | void set_singlestepsize(uint32_t singlestepsize); |
388 | 57 | 57 | ||
389 | === modified file 'src/ui_basic/slider.h' | |||
390 | --- src/ui_basic/slider.h 2013-07-26 20:19:36 +0000 | |||
391 | +++ src/ui_basic/slider.h 2013-08-02 18:49:35 +0000 | |||
392 | @@ -19,7 +19,7 @@ | |||
393 | 19 | #ifndef UI_SLIDER_H | 19 | #ifndef UI_SLIDER_H |
394 | 20 | #define UI_SLIDER_H | 20 | #define UI_SLIDER_H |
395 | 21 | 21 | ||
397 | 22 | #include <boost/signal.hpp> | 22 | #include <boost/signals2.hpp> |
398 | 23 | 23 | ||
399 | 24 | #include "graphic/font.h" | 24 | #include "graphic/font.h" |
400 | 25 | #include "ui_basic/panel.h" | 25 | #include "ui_basic/panel.h" |
401 | @@ -85,8 +85,8 @@ | |||
402 | 85 | void set_highlighted(bool highlighted); | 85 | void set_highlighted(bool highlighted); |
403 | 86 | 86 | ||
404 | 87 | public: | 87 | public: |
407 | 88 | boost::signal<void ()> changed; | 88 | boost::signals2::signal<void ()> changed; |
408 | 89 | boost::signal<void (int32_t)> changedto; | 89 | boost::signals2::signal<void (int32_t)> changedto; |
409 | 90 | 90 | ||
410 | 91 | private: | 91 | private: |
411 | 92 | int32_t m_min_value; // cursor values | 92 | int32_t m_min_value; // cursor values |
412 | @@ -195,8 +195,8 @@ | |||
413 | 195 | 195 | ||
414 | 196 | void set_labels(std::vector<std::string>); | 196 | void set_labels(std::vector<std::string>); |
415 | 197 | 197 | ||
418 | 198 | boost::signal<void ()> changed; | 198 | boost::signals2::signal<void ()> changed; |
419 | 199 | boost::signal<void (int32_t)> changedto; | 199 | boost::signals2::signal<void (int32_t)> changedto; |
420 | 200 | 200 | ||
421 | 201 | protected: | 201 | protected: |
422 | 202 | virtual void draw(RenderTarget & dst); | 202 | virtual void draw(RenderTarget & dst); |
423 | 203 | 203 | ||
424 | === modified file 'src/ui_basic/table.h' | |||
425 | --- src/ui_basic/table.h 2013-07-26 20:19:36 +0000 | |||
426 | +++ src/ui_basic/table.h 2013-08-02 18:49:35 +0000 | |||
427 | @@ -25,7 +25,7 @@ | |||
428 | 25 | #include <vector> | 25 | #include <vector> |
429 | 26 | 26 | ||
430 | 27 | #include <boost/function.hpp> | 27 | #include <boost/function.hpp> |
432 | 28 | #include <boost/signal.hpp> | 28 | #include <boost/signals2.hpp> |
433 | 29 | 29 | ||
434 | 30 | #include "align.h" | 30 | #include "align.h" |
435 | 31 | #include "ui_basic/panel.h" | 31 | #include "ui_basic/panel.h" |
436 | @@ -54,8 +54,8 @@ | |||
437 | 54 | bool descending = false); | 54 | bool descending = false); |
438 | 55 | ~Table(); | 55 | ~Table(); |
439 | 56 | 56 | ||
442 | 57 | boost::signal<void (uint32_t)> selected; | 57 | boost::signals2::signal<void (uint32_t)> selected; |
443 | 58 | boost::signal<void (uint32_t)> double_clicked; | 58 | boost::signals2::signal<void (uint32_t)> double_clicked; |
444 | 59 | 59 | ||
445 | 60 | /// A column that has a title is sortable (by clicking on the title). | 60 | /// A column that has a title is sortable (by clicking on the title). |
446 | 61 | void add_column | 61 | void add_column |
447 | @@ -160,8 +160,8 @@ | |||
448 | 160 | bool descending = false); | 160 | bool descending = false); |
449 | 161 | ~Table(); | 161 | ~Table(); |
450 | 162 | 162 | ||
453 | 163 | boost::signal<void (uint32_t)> selected; | 163 | boost::signals2::signal<void (uint32_t)> selected; |
454 | 164 | boost::signal<void (uint32_t)> double_clicked; | 164 | boost::signals2::signal<void (uint32_t)> double_clicked; |
455 | 165 | 165 | ||
456 | 166 | void add_column | 166 | void add_column |
457 | 167 | (uint32_t width, | 167 | (uint32_t width, |
458 | 168 | 168 | ||
459 | === modified file 'src/wui/building_ui.cc' | |||
460 | --- src/wui/building_ui.cc 2013-07-26 20:19:36 +0000 | |||
461 | +++ src/wui/building_ui.cc 2013-08-02 18:49:35 +0000 | |||
462 | @@ -57,7 +57,7 @@ | |||
463 | 57 | */ | 57 | */ |
464 | 58 | void Building::hide_options() | 58 | void Building::hide_options() |
465 | 59 | { | 59 | { |
467 | 60 | BOOST_FOREACH(boost::signals::connection& c, options_window_connections) | 60 | BOOST_FOREACH(boost::signals2::connection& c, options_window_connections) |
468 | 61 | c.disconnect(); | 61 | c.disconnect(); |
469 | 62 | delete m_optionswindow; | 62 | delete m_optionswindow; |
470 | 63 | m_optionswindow = nullptr; | 63 | m_optionswindow = nullptr; |
471 | 64 | 64 | ||
472 | === modified file 'src/wui/fieldaction.cc' | |||
473 | --- src/wui/fieldaction.cc 2013-07-26 20:19:36 +0000 | |||
474 | +++ src/wui/fieldaction.cc 2013-08-02 18:49:35 +0000 | |||
475 | @@ -65,9 +65,9 @@ | |||
476 | 65 | int32_t x, int32_t y, | 65 | int32_t x, int32_t y, |
477 | 66 | int32_t cols); | 66 | int32_t cols); |
478 | 67 | 67 | ||
482 | 68 | boost::signal<void (Widelands::Building_Index::value_t)> buildclicked; | 68 | boost::signals2::signal<void (Widelands::Building_Index::value_t)> buildclicked; |
483 | 69 | boost::signal<void (Widelands::Building_Index::value_t)> buildmouseout; | 69 | boost::signals2::signal<void (Widelands::Building_Index::value_t)> buildmouseout; |
484 | 70 | boost::signal<void (Widelands::Building_Index::value_t)> buildmousein; | 70 | boost::signals2::signal<void (Widelands::Building_Index::value_t)> buildmousein; |
485 | 71 | 71 | ||
486 | 72 | void add(Widelands::Building_Index::value_t); | 72 | void add(Widelands::Building_Index::value_t); |
487 | 73 | 73 | ||
488 | 74 | 74 | ||
489 | === modified file 'src/wui/gamechatpanel.h' | |||
490 | --- src/wui/gamechatpanel.h 2013-07-26 19:16:51 +0000 | |||
491 | +++ src/wui/gamechatpanel.h 2013-08-02 18:49:35 +0000 | |||
492 | @@ -41,12 +41,12 @@ | |||
493 | 41 | /** | 41 | /** |
494 | 42 | * Signal is called when a message has been sent by the user. | 42 | * Signal is called when a message has been sent by the user. |
495 | 43 | */ | 43 | */ |
497 | 44 | boost::signal<void ()> sent; | 44 | boost::signals2::signal<void ()> sent; |
498 | 45 | 45 | ||
499 | 46 | /** | 46 | /** |
500 | 47 | * Signal is called when the user has aborted entering a message. | 47 | * Signal is called when the user has aborted entering a message. |
501 | 48 | */ | 48 | */ |
503 | 49 | boost::signal<void ()> aborted; | 49 | boost::signals2::signal<void ()> aborted; |
504 | 50 | 50 | ||
505 | 51 | const std::string & get_edit_text() const {return editbox.text();} | 51 | const std::string & get_edit_text() const {return editbox.text();} |
506 | 52 | void set_edit_text(const std::string & text) {editbox.setText(text);} | 52 | void set_edit_text(const std::string & text) {editbox.setText(text);} |
507 | 53 | 53 | ||
508 | === modified file 'src/wui/mapview.h' | |||
509 | --- src/wui/mapview.h 2013-07-26 19:16:51 +0000 | |||
510 | +++ src/wui/mapview.h 2013-08-02 18:49:35 +0000 | |||
511 | @@ -21,7 +21,7 @@ | |||
512 | 21 | #define MAPVIEW_H | 21 | #define MAPVIEW_H |
513 | 22 | 22 | ||
514 | 23 | #include <boost/function.hpp> | 23 | #include <boost/function.hpp> |
516 | 24 | #include <boost/signal.hpp> | 24 | #include <boost/signals2.hpp> |
517 | 25 | 25 | ||
518 | 26 | #include "logic/widelands_geometry.h" | 26 | #include "logic/widelands_geometry.h" |
519 | 27 | #include "ui_basic/panel.h" | 27 | #include "ui_basic/panel.h" |
520 | @@ -54,9 +54,9 @@ | |||
521 | 54 | * | 54 | * |
522 | 55 | * Parameters are x/y position in screen coordinates. | 55 | * Parameters are x/y position in screen coordinates. |
523 | 56 | */ | 56 | */ |
525 | 57 | boost::signal<void (int32_t, int32_t)> changeview; | 57 | boost::signals2::signal<void (int32_t, int32_t)> changeview; |
526 | 58 | 58 | ||
528 | 59 | boost::signal<void ()> fieldclicked; | 59 | boost::signals2::signal<void ()> fieldclicked; |
529 | 60 | 60 | ||
530 | 61 | void warp_mouse_to_node(Widelands::Coords); | 61 | void warp_mouse_to_node(Widelands::Coords); |
531 | 62 | 62 | ||
532 | 63 | 63 | ||
533 | === modified file 'src/wui/minimap.h' | |||
534 | --- src/wui/minimap.h 2013-02-09 23:18:23 +0000 | |||
535 | +++ src/wui/minimap.h 2013-08-02 18:49:35 +0000 | |||
536 | @@ -20,7 +20,7 @@ | |||
537 | 20 | #ifndef MINIMAP_H | 20 | #ifndef MINIMAP_H |
538 | 21 | #define MINIMAP_H | 21 | #define MINIMAP_H |
539 | 22 | 22 | ||
541 | 23 | #include <boost/signal.hpp> | 23 | #include <boost/signals2.hpp> |
542 | 24 | 24 | ||
543 | 25 | #include "ui_basic/button.h" | 25 | #include "ui_basic/button.h" |
544 | 26 | #include "ui_basic/unique_window.h" | 26 | #include "ui_basic/unique_window.h" |
545 | @@ -36,7 +36,7 @@ | |||
546 | 36 | 36 | ||
547 | 37 | MiniMap(Interactive_Base & parent, Registry *); | 37 | MiniMap(Interactive_Base & parent, Registry *); |
548 | 38 | 38 | ||
550 | 39 | boost::signal<void (int32_t, int32_t)> warpview; | 39 | boost::signals2::signal<void (int32_t, int32_t)> warpview; |
551 | 40 | 40 | ||
552 | 41 | void set_view_pos(int32_t const x, int32_t const y) { | 41 | void set_view_pos(int32_t const x, int32_t const y) { |
553 | 42 | m_view.set_view_pos(x, y); | 42 | m_view.set_view_pos(x, y); |
554 | 43 | 43 | ||
555 | === modified file 'src/wui/waresdisplay.cc' | |||
556 | --- src/wui/waresdisplay.cc 2013-07-26 20:19:36 +0000 | |||
557 | +++ src/wui/waresdisplay.cc 2013-08-02 18:49:35 +0000 | |||
558 | @@ -275,7 +275,7 @@ | |||
559 | 275 | 275 | ||
560 | 276 | void WaresDisplay::remove_all_warelists() { | 276 | void WaresDisplay::remove_all_warelists() { |
561 | 277 | m_warelists.clear(); | 277 | m_warelists.clear(); |
563 | 278 | BOOST_FOREACH(boost::signals::connection& c, connections_) | 278 | BOOST_FOREACH(boost::signals2::connection& c, connections_) |
564 | 279 | c.disconnect(); | 279 | c.disconnect(); |
565 | 280 | connections_.clear(); | 280 | connections_.clear(); |
566 | 281 | update(); | 281 | update(); |
567 | 282 | 282 | ||
568 | === modified file 'src/wui/waresdisplay.h' | |||
569 | --- src/wui/waresdisplay.h 2013-07-26 19:16:51 +0000 | |||
570 | +++ src/wui/waresdisplay.h 2013-08-02 18:49:35 +0000 | |||
571 | @@ -22,7 +22,7 @@ | |||
572 | 22 | 22 | ||
573 | 23 | #include <vector> | 23 | #include <vector> |
574 | 24 | 24 | ||
576 | 25 | #include <boost/signal.hpp> | 25 | #include <boost/signals2.hpp> |
577 | 26 | 26 | ||
578 | 27 | #include "logic/tribe.h" | 27 | #include "logic/tribe.h" |
579 | 28 | #include "logic/warelist.h" | 28 | #include "logic/warelist.h" |
580 | @@ -144,7 +144,7 @@ | |||
581 | 144 | private: | 144 | private: |
582 | 145 | typedef std::vector<const Widelands::WareList *> vector_type; | 145 | typedef std::vector<const Widelands::WareList *> vector_type; |
583 | 146 | vector_type m_warelists; | 146 | vector_type m_warelists; |
585 | 147 | std::vector<boost::signals::connection> connections_; | 147 | std::vector<boost::signals2::connection> connections_; |
586 | 148 | }; | 148 | }; |
587 | 149 | 149 | ||
588 | 150 | std::string waremap_to_richtext | 150 | std::string waremap_to_richtext |
589 | 151 | 151 | ||
590 | === modified file 'src/wui/watchwindow.cc' | |||
591 | --- src/wui/watchwindow.cc 2013-07-26 20:19:36 +0000 | |||
592 | +++ src/wui/watchwindow.cc 2013-08-02 18:49:35 +0000 | |||
593 | @@ -58,7 +58,7 @@ | |||
594 | 58 | return ref_cast<Interactive_GameBase, UI::Panel>(*get_parent()).game(); | 58 | return ref_cast<Interactive_GameBase, UI::Panel>(*get_parent()).game(); |
595 | 59 | } | 59 | } |
596 | 60 | 60 | ||
598 | 61 | boost::signal<void (Point)> warp_mainview; | 61 | boost::signals2::signal<void (Point)> warp_mainview; |
599 | 62 | 62 | ||
600 | 63 | void add_view(Widelands::Coords); | 63 | void add_view(Widelands::Coords); |
601 | 64 | void next_view(bool first = false); | 64 | void next_view(bool first = false); |
Compiles for me and the changes are very straightforward. Merged. Thanks for looking into this Jens!