Merge lp:~klaus-halfmann/widelands/bug-1395278-wui into lp:widelands

Proposed by Klaus Halfmann
Status: Merged
Merged at revision: 7740
Proposed branch: lp:~klaus-halfmann/widelands/bug-1395278-wui
Merge into: lp:widelands
Diff against target: 7530 lines (+1659/-1659)
68 files modified
src/ai/computer_player.cc (+2/-2)
src/ai/computer_player.h (+4/-4)
src/logic/map_objects/tribes/tribe_descr.h (+1/-1)
src/logic/player.h (+2/-2)
src/wlapplication.cc (+134/-134)
src/wlapplication.h (+19/-19)
src/wui/buildingwindow.cc (+75/-75)
src/wui/buildingwindow.h (+16/-16)
src/wui/debugconsole.cc (+3/-3)
src/wui/debugconsole.h (+2/-2)
src/wui/edge_overlay_manager.cc (+15/-15)
src/wui/edge_overlay_manager.h (+2/-2)
src/wui/field_overlay_manager.cc (+20/-20)
src/wui/field_overlay_manager.h (+7/-7)
src/wui/game_chat_menu.cc (+11/-11)
src/wui/game_chat_menu.h (+3/-3)
src/wui/game_main_menu.cc (+23/-23)
src/wui/game_main_menu.h (+3/-3)
src/wui/game_main_menu_save_game.cc (+47/-47)
src/wui/game_main_menu_save_game.h (+10/-10)
src/wui/game_message_menu.cc (+63/-63)
src/wui/game_message_menu.h (+10/-10)
src/wui/game_summary.cc (+61/-61)
src/wui/game_summary.h (+10/-10)
src/wui/game_tips.cc (+23/-23)
src/wui/game_tips.h (+7/-7)
src/wui/gamechatpanel.cc (+4/-4)
src/wui/gamechatpanel.h (+2/-2)
src/wui/general_statistics_menu.cc (+92/-92)
src/wui/general_statistics_menu.h (+8/-8)
src/wui/interactive_gamebase.cc (+18/-18)
src/wui/interactive_gamebase.h (+17/-17)
src/wui/interactive_player.cc (+89/-89)
src/wui/interactive_player.h (+22/-22)
src/wui/interactive_spectator.cc (+62/-62)
src/wui/interactive_spectator.h (+11/-11)
src/wui/itemwaresdisplay.cc (+17/-17)
src/wui/itemwaresdisplay.h (+8/-8)
src/wui/mapdata.h (+7/-7)
src/wui/mapview.cc (+19/-19)
src/wui/mapview.h (+10/-10)
src/wui/minimap.cc (+43/-43)
src/wui/minimap.h (+7/-7)
src/wui/multiplayersetupgroup.cc (+40/-40)
src/wui/multiplayersetupgroup.h (+5/-5)
src/wui/playerdescrgroup.cc (+3/-3)
src/wui/playerdescrgroup.h (+2/-2)
src/wui/plot_area.cc (+77/-77)
src/wui/plot_area.h (+18/-18)
src/wui/productionsitewindow.cc (+21/-21)
src/wui/productionsitewindow.h (+3/-3)
src/wui/quicknavigation.cc (+42/-42)
src/wui/quicknavigation.h (+12/-12)
src/wui/soldierlist.cc (+1/-1)
src/wui/stock_menu.cc (+15/-15)
src/wui/stock_menu.h (+6/-6)
src/wui/story_message_box.h (+1/-1)
src/wui/suggested_teams_box.cc (+37/-37)
src/wui/suggested_teams_box.h (+9/-9)
src/wui/transport_draw.cc (+1/-1)
src/wui/transport_ui.cc (+57/-57)
src/wui/ware_statistics_menu.cc (+51/-51)
src/wui/ware_statistics_menu.h (+7/-7)
src/wui/warehousewindow.cc (+26/-26)
src/wui/waresdisplay.cc (+90/-90)
src/wui/waresdisplay.h (+16/-16)
src/wui/waresqueuedisplay.cc (+92/-92)
src/wui/waresqueuedisplay.h (+18/-18)
To merge this branch: bzr merge lp:~klaus-halfmann/widelands/bug-1395278-wui
Reviewer Review Type Date Requested Status
SirVer Approve
Review via email: mp+283747@code.launchpad.net

Description of the change

Migration from m_... to ..._ mostly in wui

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Hi, I am bunnybot (https://github.com/widelands/bunnybot).

I am keeping the source branch lp:~klaus-halfmann/widelands/bug-1395278-wui mirrored to https://github.com/widelands/widelands/tree/_klaus_halfmann_widelands_bug_1395278_wui

You can give me commands by starting a line with @bunnybot <command>. I understand:
 merge: Merges the source branch into the target branch, closing the merge proposal. I will use the proposed commit message if it is set.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 381. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/104490091.
Appveyor build 288. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_klaus_halfmann_widelands_bug_1395278_wui-288.

Revision history for this message
SirVer (sirver) wrote :

Travis fails, because you have to fix one CMakeTarget: /home/travis/build/widelands/widelands/src/ai/CMakeLists.txt:1: ai misses DEPENDS on base_time_string, because it includes base/time_string.h

you can get these warnings locally by running 'make codecheck'

otherwise lgtm.

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

Another way to run codecheck that works better for me is:

cmake/codecheck/CodeCheck.py src/* | grep -v "src/third_party"

More on CodeCheck and regression tests: https://wl.widelands.org/wiki/RegressionTests/

Revision history for this message
SirVer (sirver) wrote :

What gun posted will only check .cc and .h files though, not the cmake files.

> Am 25.01.2016 um 08:15 schrieb GunChleoc <email address hidden>:
>
> Another way to run codecheck that works better for me is:
>
> cmake/codecheck/CodeCheck.py src/* | grep -v "src/third_party"
>
> More on CodeCheck and regression tests: https://wl.widelands.org/wiki/RegressionTests/
> --
> https://code.launchpad.net/~klaus-halfmann/widelands/bug-1395278-wui/+merge/283747
> You are reviewing the proposed merge of lp:~klaus-halfmann/widelands/bug-1395278-wui into lp:widelands.

Revision history for this message
SirVer (sirver) wrote :

This bug was actually already in trunk. I fixed it in 7739.

Since release compiled, I think this is save to go in.

@bunnybot merge.

Fingers crossed :)

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

The reason I never tun "make codecheck is that I get a screenful of

[ 15%] Built target see_if_codecheck_needs_to_run_425808b46d62349edb2afc756e74770b1a35a46d

And it's pretty impossible to find the actual codecheck messages among them.

Revision history for this message
SirVer (sirver) wrote :

ninja is not printing that. You can throttle ninja by using ninja -j1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ai/computer_player.cc'
2--- src/ai/computer_player.cc 2015-12-06 12:37:51 +0000
3+++ src/ai/computer_player.cc 2016-01-24 20:25:45 +0000
4@@ -1,5 +1,5 @@
5 /*
6- * Copyright (C) 2004, 2006-2009 by the Widelands Development Team
7+ * Copyright (C) 2004-2016 by the Widelands Development Team
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11@@ -23,7 +23,7 @@
12
13 ComputerPlayer::ComputerPlayer
14 (Widelands::Game & g, Widelands::PlayerNumber const pid)
15- : m_game(g), m_player_number(pid)
16+ : game_(g), player_number_(pid)
17 {
18 }
19
20
21=== modified file 'src/ai/computer_player.h'
22--- src/ai/computer_player.h 2015-12-06 11:15:52 +0000
23+++ src/ai/computer_player.h 2016-01-24 20:25:45 +0000
24@@ -42,8 +42,8 @@
25
26 virtual void think () = 0;
27
28- Widelands::Game & game() const {return m_game;}
29- Widelands::PlayerNumber player_number() {return m_player_number;}
30+ Widelands::Game & game() const {return game_;}
31+ Widelands::PlayerNumber player_number() {return player_number_;}
32
33 /**
34 * Interface to a concrete implementation, used to instantiate AIs.
35@@ -71,8 +71,8 @@
36 static const Implementation * get_implementation(const std::string & name);
37
38 private:
39- Widelands::Game & m_game;
40- Widelands::PlayerNumber const m_player_number;
41+ Widelands::Game & game_;
42+ Widelands::PlayerNumber const player_number_;
43
44 DISALLOW_COPY_AND_ASSIGN(ComputerPlayer);
45 };
46
47=== modified file 'src/logic/map_objects/tribes/tribe_descr.h'
48--- src/logic/map_objects/tribes/tribe_descr.h 2016-01-23 19:36:55 +0000
49+++ src/logic/map_objects/tribes/tribe_descr.h 2016-01-24 20:25:45 +0000
50@@ -143,7 +143,7 @@
51
52 void resize_ware_orders(size_t maxLength);
53
54- const std::vector<std::string>& get_ship_names() const {return ship_names_;};
55+ const std::vector<std::string>& get_ship_names() const {return ship_names_;}
56
57 private:
58 // Helper function for adding a special worker type (carriers etc.)
59
60=== modified file 'src/logic/player.h'
61--- src/logic/player.h 2016-01-22 19:53:32 +0000
62+++ src/logic/player.h 2016-01-24 20:25:45 +0000
63@@ -138,7 +138,7 @@
64
65 /// Data that are used and managed by AI. They are here to have it saved as a port of player's data
66 struct AiPersistentState {
67- AiPersistentState() : initialized(0){};
68+ AiPersistentState() : initialized(0){}
69
70 //was initialized
71 uint8_t initialized;
72@@ -159,7 +159,7 @@
73
74 AiPersistentState* get_mutable_ai_persistent_state(){
75 return &ai_data;
76- };
77+ }
78
79 /// Per-player field information.
80 struct Field {
81
82=== modified file 'src/wlapplication.cc'
83--- src/wlapplication.cc 2016-01-17 09:55:27 +0000
84+++ src/wlapplication.cc 2016-01-24 20:25:45 +0000
85@@ -1,5 +1,5 @@
86 /*
87- * Copyright (C) 2006-2015 by the Widelands Development Team
88+ * Copyright (C) 2006-2016 by the Widelands Development Team
89 *
90 * This program is free software; you can redistribute it and/or
91 * modify it under the terms of the GNU General Public License
92@@ -179,12 +179,12 @@
93
94 void WLApplication::setup_homedir() {
95 //If we don't have a home directory don't do anything
96- if (m_homedir.size()) {
97+ if (homedir_.size()) {
98 //assume some dir exists
99 try {
100- log ("Set home directory: %s\n", m_homedir.c_str());
101+ log ("Set home directory: %s\n", homedir_.c_str());
102
103- std::unique_ptr<FileSystem> home(new RealFSImpl(m_homedir));
104+ std::unique_ptr<FileSystem> home(new RealFSImpl(homedir_));
105 home->ensure_directory_exists(".");
106 g_fs->set_home_file_system(home.release());
107 } catch (const std::exception & e) {
108@@ -232,40 +232,40 @@
109 * \param argv Array of command line arguments
110 */
111 WLApplication::WLApplication(int const argc, char const * const * const argv) :
112-m_commandline (std::map<std::string, std::string>()),
113-m_game_type (NONE),
114-m_mouse_swapped (false),
115-m_faking_middle_mouse_button(false),
116-m_mouse_position (0, 0),
117-m_mouse_locked (0),
118-m_mouse_compensate_warp(0, 0),
119-m_should_die (false),
120+commandline_ (std::map<std::string, std::string>()),
121+game_type_ (NONE),
122+mouse_swapped_ (false),
123+faking_middle_mouse_button_(false),
124+mouse_position_ (0, 0),
125+mouse_locked_ (0),
126+mouse_compensate_warp_(0, 0),
127+should_die_ (false),
128 #ifdef _WIN32
129-m_homedir(FileSystem::get_homedir() + "\\.widelands"),
130+homedir_(FileSystem::get_homedir() + "\\.widelands"),
131 #else
132-m_homedir(FileSystem::get_homedir() + "/.widelands"),
133+homedir_(FileSystem::get_homedir() + "/.widelands"),
134 #endif
135-m_redirected_stdio(false)
136+redirected_stdio_(false)
137 {
138 g_fs = new LayeredFileSystem();
139
140 parse_commandline(argc, argv); //throws ParameterError, handled by main.cc
141
142- if (m_commandline.count("homedir")) {
143- log ("Adding home directory: %s\n", m_commandline["homedir"].c_str());
144- m_homedir = m_commandline["homedir"];
145- m_commandline.erase("homedir");
146+ if (commandline_.count("homedir")) {
147+ log ("Adding home directory: %s\n", commandline_["homedir"].c_str());
148+ homedir_ = commandline_["homedir"];
149+ commandline_.erase("homedir");
150 }
151 #ifdef REDIRECT_OUTPUT
152 if (!redirect_output())
153- redirect_output(m_homedir);
154+ redirect_output(homedir_);
155 #endif
156
157 setup_homedir();
158 init_settings();
159
160- log("Adding directory: %s\n", m_datadir.c_str());
161- g_fs->add_file_system(&FileSystem::create(m_datadir));
162+ log("Adding directory: %s\n", datadir_.c_str());
163+ g_fs->add_file_system(&FileSystem::create(datadir_));
164
165 init_language(); // search paths must already be set up
166 changedir_on_mac();
167@@ -334,7 +334,7 @@
168 delete g_fs;
169 g_fs = nullptr;
170
171- if (m_redirected_stdio)
172+ if (redirected_stdio_)
173 {
174 std::cout.flush();
175 fclose(stdout);
176@@ -356,15 +356,15 @@
177 // This also grabs the mouse cursor if so desired.
178 refresh_graphics();
179
180- if (m_game_type == EDITOR) {
181+ if (game_type_ == EDITOR) {
182 g_sound_handler.start_music("ingame");
183- EditorInteractive::run_editor(m_filename, m_script_to_run);
184- } else if (m_game_type == REPLAY) {
185+ EditorInteractive::run_editor(filename_, script_to_run_);
186+ } else if (game_type_ == REPLAY) {
187 replay();
188- } else if (m_game_type == LOADGAME) {
189+ } else if (game_type_ == LOADGAME) {
190 Widelands::Game game;
191 try {
192- game.run_load_game(m_filename.c_str(), m_script_to_run);
193+ game.run_load_game(filename_.c_str(), script_to_run_);
194 } catch (const Widelands::GameDataError & e) {
195 log("Game not loaded: Game data error: %s\n", e.what());
196 } catch (const std::exception & e) {
197@@ -372,10 +372,10 @@
198 emergency_save(game);
199 throw;
200 }
201- } else if (m_game_type == SCENARIO) {
202+ } else if (game_type_ == SCENARIO) {
203 Widelands::Game game;
204 try {
205- game.run_splayer_scenario_direct(m_filename.c_str(), m_script_to_run);
206+ game.run_splayer_scenario_direct(filename_.c_str(), script_to_run_);
207 } catch (const Widelands::GameDataError & e) {
208 log("Scenario not started: Game data error: %s\n", e.what());
209 } catch (const std::exception & e) {
210@@ -383,7 +383,7 @@
211 emergency_save(game);
212 throw;
213 }
214- } else if (m_game_type == INTERNET) {
215+ } else if (game_type_ == INTERNET) {
216 Widelands::Game game;
217 try {
218 // disable sound completely
219@@ -421,13 +421,13 @@
220
221 // Load the requested map
222 Widelands::Map map;
223- map.set_filename(m_filename);
224- std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(m_filename);
225+ map.set_filename(filename_);
226+ std::unique_ptr<Widelands::MapLoader> ml = map.get_correct_loader(filename_);
227 if (!ml) {
228 throw WLWarning
229 ("Unsupported format",
230 "Widelands could not load the file \"%s\". The file format seems to be incompatible.",
231- m_filename.c_str());
232+ filename_.c_str());
233 }
234 ml->preload_map(true);
235
236@@ -479,15 +479,15 @@
237 // settings are invisible to the rest of the code
238 switch (ev.type) {
239 case SDL_MOUSEMOTION:
240- ev.motion.xrel += m_mouse_compensate_warp.x;
241- ev.motion.yrel += m_mouse_compensate_warp.y;
242- m_mouse_compensate_warp = Point(0, 0);
243-
244- if (m_mouse_locked) {
245- warp_mouse(m_mouse_position);
246-
247- ev.motion.x = m_mouse_position.x;
248- ev.motion.y = m_mouse_position.y;
249+ ev.motion.xrel += mouse_compensate_warp_.x;
250+ ev.motion.yrel += mouse_compensate_warp_.y;
251+ mouse_compensate_warp_ = Point(0, 0);
252+
253+ if (mouse_locked_) {
254+ warp_mouse(mouse_position_);
255+
256+ ev.motion.x = mouse_position_.x;
257+ ev.motion.y = mouse_position_.y;
258 }
259 break;
260
261@@ -509,7 +509,7 @@
262 case SDLK_F10:
263 // exits the game.
264 if (ctrl) {
265- m_should_die = true;
266+ should_die_ = true;
267 }
268 return true;
269
270@@ -579,7 +579,7 @@
271 }
272 break;
273 case SDL_MOUSEMOTION:
274- m_mouse_position = Point(ev.motion.x, ev.motion.y);
275+ mouse_position_ = Point(ev.motion.x, ev.motion.y);
276
277 if ((ev.motion.xrel || ev.motion.yrel) && cb && cb->mouse_move)
278 cb->mouse_move
279@@ -588,7 +588,7 @@
280 ev.motion.xrel, ev.motion.yrel);
281 break;
282 case SDL_QUIT:
283- m_should_die = true;
284+ should_die_ = true;
285 break;
286 default:;
287 }
288@@ -601,7 +601,7 @@
289 void WLApplication::_handle_mousebutton
290 (SDL_Event & ev, InputCallback const * cb)
291 {
292- if (m_mouse_swapped) {
293+ if (mouse_swapped_) {
294 switch (ev.button.button) {
295 case SDL_BUTTON_LEFT:
296 ev.button.button = SDL_BUTTON_RIGHT;
297@@ -625,7 +625,7 @@
298 (get_key_state(SDL_SCANCODE_LALT) || get_key_state(SDL_SCANCODE_RALT)))
299 {
300 ev.button.button = SDL_BUTTON_LEFT;
301- m_faking_middle_mouse_button = true;
302+ faking_middle_mouse_button_ = true;
303 }
304 #endif
305
306@@ -633,9 +633,9 @@
307 cb->mouse_press(ev.button.button, ev.button.x, ev.button.y);
308 else if (ev.type == SDL_MOUSEBUTTONUP) {
309 if (cb && cb->mouse_release) {
310- if (ev.button.button == SDL_BUTTON_MIDDLE && m_faking_middle_mouse_button) {
311+ if (ev.button.button == SDL_BUTTON_MIDDLE && faking_middle_mouse_button_) {
312 cb->mouse_release(SDL_BUTTON_LEFT, ev.button.x, ev.button.y);
313- m_faking_middle_mouse_button = false;
314+ faking_middle_mouse_button_ = false;
315 }
316 cb->mouse_release(ev.button.button, ev.button.x, ev.button.y);
317 }
318@@ -646,18 +646,18 @@
319 /// Instantaneously move the mouse cursor without creating a motion event.
320 ///
321 /// SDL_WarpMouseInWindow() *will* create a mousemotion event, which we do not want.
322-/// As a workaround, we store the delta in m_mouse_compensate_warp and use that to
323+/// As a workaround, we store the delta in mouse_compensate_warp_ and use that to
324 /// eliminate the motion event in poll_event()
325 ///
326 /// \param position The new mouse position
327 void WLApplication::warp_mouse(const Point position)
328 {
329- m_mouse_position = position;
330+ mouse_position_ = position;
331
332 Point cur_position;
333 SDL_GetMouseState(&cur_position.x, &cur_position.y);
334 if (cur_position != position) {
335- m_mouse_compensate_warp += cur_position - position;
336+ mouse_compensate_warp_ += cur_position - position;
337 SDL_Window* sdl_window = g_gr->get_sdlwindow();
338 if (sdl_window) {
339 SDL_WarpMouseInWindow(sdl_window, position.x, position.y);
340@@ -688,7 +688,7 @@
341 if (sdl_window) {
342 SDL_SetWindowGrab(sdl_window, SDL_FALSE);
343 }
344- warp_mouse(m_mouse_position); //TODO(unknown): is this redundant?
345+ warp_mouse(mouse_position_); //TODO(unknown): is this redundant?
346 }
347 }
348
349@@ -767,7 +767,7 @@
350 // Initialize locale and grab "widelands" textdomain
351 i18n::init_locale();
352
353- i18n::set_localedir(m_datadir + "/locale");
354+ i18n::set_localedir(datadir_ + "/locale");
355 i18n::grab_textdomain("widelands");
356
357 // Set locale corresponding to selected language
358@@ -852,12 +852,12 @@
359 opt.erase(pos, opt.size() - pos);
360 }
361
362- m_commandline[opt] = value;
363+ commandline_[opt] = value;
364 }
365 }
366
367 /**
368- * Parse the command line given in m_commandline
369+ * Parse the command line given in commandline_
370 *
371 * \return false if there were errors during parsing \e or if "--help"
372 * was given,
373@@ -865,105 +865,105 @@
374 */
375 void WLApplication::handle_commandline_parameters()
376 {
377- if (m_commandline.count("logfile")) {
378- m_logfile = m_commandline["logfile"];
379- std::cerr << "Redirecting log target to: " << m_logfile << std::endl;
380- if (m_logfile.size() != 0) {
381+ if (commandline_.count("logfile")) {
382+ logfile_ = commandline_["logfile"];
383+ std::cerr << "Redirecting log target to: " << logfile_ << std::endl;
384+ if (logfile_.size() != 0) {
385 //TODO(unknown): (very small) memory leak of 1 ofstream;
386 //swaw the buffers (internally) of the file and wout
387- std::ofstream * widelands_out = new std::ofstream(m_logfile.c_str());
388+ std::ofstream * widelands_out = new std::ofstream(logfile_.c_str());
389 std::streambuf * logbuf = widelands_out->rdbuf();
390 wout.rdbuf(logbuf);
391 }
392- m_commandline.erase("logfile");
393+ commandline_.erase("logfile");
394 }
395- if (m_commandline.count("nosound")) {
396+ if (commandline_.count("nosound")) {
397 g_sound_handler.nosound_ = true;
398- m_commandline.erase("nosound");
399+ commandline_.erase("nosound");
400 }
401- if (m_commandline.count("nozip")) {
402+ if (commandline_.count("nozip")) {
403 g_options.pull_section("global").create_val("nozip", "true");
404- m_commandline.erase("nozip");
405+ commandline_.erase("nozip");
406 }
407
408- if (m_commandline.count("datadir")) {
409- m_datadir = m_commandline["datadir"];
410- m_commandline.erase("datadir");
411+ if (commandline_.count("datadir")) {
412+ datadir_ = commandline_["datadir"];
413+ commandline_.erase("datadir");
414 } else {
415- m_datadir = is_absolute_path(INSTALL_DATADIR) ?
416+ datadir_ = is_absolute_path(INSTALL_DATADIR) ?
417 INSTALL_DATADIR :
418 get_executable_directory() + INSTALL_DATADIR;
419 }
420- if (!is_absolute_path(m_datadir)) {
421- m_datadir = absolute_path_if_not_windows(FileSystem::get_working_directory() +
422- FileSystem::file_separator() + m_datadir);
423+ if (!is_absolute_path(datadir_)) {
424+ datadir_ = absolute_path_if_not_windows(FileSystem::get_working_directory() +
425+ FileSystem::file_separator() + datadir_);
426 }
427
428- if (m_commandline.count("verbose")) {
429+ if (commandline_.count("verbose")) {
430 g_verbose = true;
431
432- m_commandline.erase("verbose");
433- }
434-
435- if (m_commandline.count("editor")) {
436- m_filename = m_commandline["editor"];
437- if (m_filename.size() && *m_filename.rbegin() == '/')
438- m_filename.erase(m_filename.size() - 1);
439- m_game_type = EDITOR;
440- m_commandline.erase("editor");
441- }
442-
443- if (m_commandline.count("replay")) {
444- if (m_game_type != NONE)
445+ commandline_.erase("verbose");
446+ }
447+
448+ if (commandline_.count("editor")) {
449+ filename_ = commandline_["editor"];
450+ if (filename_.size() && *filename_.rbegin() == '/')
451+ filename_.erase(filename_.size() - 1);
452+ game_type_ = EDITOR;
453+ commandline_.erase("editor");
454+ }
455+
456+ if (commandline_.count("replay")) {
457+ if (game_type_ != NONE)
458 throw wexception("replay can not be combined with other actions");
459- m_filename = m_commandline["replay"];
460- if (m_filename.size() && *m_filename.rbegin() == '/')
461- m_filename.erase(m_filename.size() - 1);
462- m_game_type = REPLAY;
463- m_commandline.erase("replay");
464+ filename_ = commandline_["replay"];
465+ if (filename_.size() && *filename_.rbegin() == '/')
466+ filename_.erase(filename_.size() - 1);
467+ game_type_ = REPLAY;
468+ commandline_.erase("replay");
469 }
470
471- if (m_commandline.count("loadgame")) {
472- if (m_game_type != NONE)
473+ if (commandline_.count("loadgame")) {
474+ if (game_type_ != NONE)
475 throw wexception("loadgame can not be combined with other actions");
476- m_filename = m_commandline["loadgame"];
477- if (m_filename.empty())
478+ filename_ = commandline_["loadgame"];
479+ if (filename_.empty())
480 throw wexception("empty value of command line parameter --loadgame");
481- if (*m_filename.rbegin() == '/')
482- m_filename.erase(m_filename.size() - 1);
483- m_game_type = LOADGAME;
484- m_commandline.erase("loadgame");
485+ if (*filename_.rbegin() == '/')
486+ filename_.erase(filename_.size() - 1);
487+ game_type_ = LOADGAME;
488+ commandline_.erase("loadgame");
489 }
490
491- if (m_commandline.count("scenario")) {
492- if (m_game_type != NONE)
493+ if (commandline_.count("scenario")) {
494+ if (game_type_ != NONE)
495 throw wexception("scenario can not be combined with other actions");
496- m_filename = m_commandline["scenario"];
497- if (m_filename.empty())
498+ filename_ = commandline_["scenario"];
499+ if (filename_.empty())
500 throw wexception("empty value of command line parameter --scenario");
501- if (*m_filename.rbegin() == '/')
502- m_filename.erase(m_filename.size() - 1);
503- m_game_type = SCENARIO;
504- m_commandline.erase("scenario");
505+ if (*filename_.rbegin() == '/')
506+ filename_.erase(filename_.size() - 1);
507+ game_type_ = SCENARIO;
508+ commandline_.erase("scenario");
509 }
510- if (m_commandline.count("dedicated")) {
511- if (m_game_type != NONE)
512+ if (commandline_.count("dedicated")) {
513+ if (game_type_ != NONE)
514 throw wexception("dedicated can not be combined with other actions");
515- m_filename = m_commandline["dedicated"];
516- if (m_filename.empty())
517+ filename_ = commandline_["dedicated"];
518+ if (filename_.empty())
519 throw wexception("empty value of commandline parameter --dedicated");
520- if (*m_filename.rbegin() == '/')
521- m_filename.erase(m_filename.size() - 1);
522- m_game_type = INTERNET;
523- m_commandline.erase("dedicated");
524+ if (*filename_.rbegin() == '/')
525+ filename_.erase(filename_.size() - 1);
526+ game_type_ = INTERNET;
527+ commandline_.erase("dedicated");
528 }
529- if (m_commandline.count("script")) {
530- m_script_to_run = m_commandline["script"];
531- if (m_script_to_run.empty())
532+ if (commandline_.count("script")) {
533+ script_to_run_ = commandline_["script"];
534+ if (script_to_run_.empty())
535 throw wexception("empty value of command line parameter --script");
536- if (*m_script_to_run.rbegin() == '/')
537- m_script_to_run.erase(m_script_to_run.size() - 1);
538- m_commandline.erase("script");
539+ if (*script_to_run_.rbegin() == '/')
540+ script_to_run_.erase(script_to_run_.size() - 1);
541+ commandline_.erase("script");
542 }
543
544 //If it hasn't been handled yet it's probably an attempt to
545@@ -972,10 +972,10 @@
546 //will be taken care of (==ignored) when saving the options
547
548 const std::map<std::string, std::string>::const_iterator commandline_end =
549- m_commandline.end();
550+ commandline_.end();
551 for
552 (std::map<std::string, std::string>::const_iterator it =
553- m_commandline.begin();
554+ commandline_.begin();
555 it != commandline_end;
556 ++it)
557 {
558@@ -986,7 +986,7 @@
559 (it->first.c_str(), it->second.c_str());
560 }
561
562- if (m_commandline.count("help") || m_commandline.count("version")) {
563+ if (commandline_.count("help") || commandline_.count("version")) {
564 init_language();
565 throw ParameterError(); //no message on purpose
566 }
567@@ -1057,7 +1057,7 @@
568 break;
569 }
570 case FullscreenMenuBase::MenuTarget::kEditor:
571- EditorInteractive::run_editor(m_filename, m_script_to_run);
572+ EditorInteractive::run_editor(filename_, script_to_run_);
573 break;
574 default:
575 case FullscreenMenuBase::MenuTarget::kExit:
576@@ -1376,13 +1376,13 @@
577 void WLApplication::replay()
578 {
579 Widelands::Game game;
580- if (m_filename.empty()) {
581+ if (filename_.empty()) {
582 SinglePlayerGameSettingsProvider sp;
583 FullscreenMenuLoadGame rm(game, &sp, nullptr, true);
584 if (rm.run<FullscreenMenuBase::MenuTarget>() == FullscreenMenuBase::MenuTarget::kBack)
585 return;
586
587- m_filename = rm.filename();
588+ filename_ = rm.filename();
589 }
590
591 try {
592@@ -1396,7 +1396,7 @@
593 game.set_ibase
594 (new InteractiveSpectator(game, g_options.pull_section("global")));
595 game.set_write_replay(false);
596- ReplayGameController rgc(game, m_filename);
597+ ReplayGameController rgc(game, filename_);
598
599 game.save_handler().set_allow_saving(false);
600
601@@ -1404,10 +1404,10 @@
602 } catch (const std::exception & e) {
603 log("Fatal Exception: %s\n", e.what());
604 emergency_save(game);
605- m_filename.clear();
606+ filename_.clear();
607 throw;
608 }
609- m_filename.clear();
610+ filename_.clear();
611 }
612
613
614@@ -1483,7 +1483,7 @@
615 memset(&tfile, 0, sizeof(tm));
616
617 tfile.tm_mday = atoi(timestr.substr(8, 2).c_str());
618- tfile.tm_mon = atoi(timestr.substr(5, 2).c_str()) - 1;
619+ tfile.tm_mon = atoi(timestr.substr(5, 2).c_str()) - 1;
620 tfile.tm_year = atoi(timestr.substr(0, 4).c_str()) - 1900;
621
622 double tdiff = std::difftime(tnow, mktime(&tfile)) / 86400;
623@@ -1527,6 +1527,6 @@
624 /* No buffering */
625 setbuf(stderr, nullptr);
626
627- m_redirected_stdio = true;
628+ redirected_stdio_ = true;
629 return true;
630 }
631
632=== modified file 'src/wlapplication.h'
633--- src/wlapplication.h 2016-01-09 15:27:05 +0000
634+++ src/wlapplication.h 2016-01-24 20:25:45 +0000
635@@ -1,5 +1,5 @@
636 /*
637- * Copyright (C) 2006-2012, 2015 by the Widelands Development Team
638+ * Copyright (C) 2006-2016 by the Widelands Development Team
639 *
640 * This program is free software; you can redistribute it and/or
641 * modify it under the terms of the GNU General Public License
642@@ -140,7 +140,7 @@
643 void run();
644
645 /// \warning true if an external entity wants us to quit
646- bool should_die() const {return m_should_die;}
647+ bool should_die() const {return should_die_;}
648
649 /// Get the state of the current KeyBoard Button
650 /// \warning This function doesn't check for dumbness
651@@ -151,16 +151,16 @@
652 void set_input_grab(bool grab);
653
654 /// The mouse's current coordinates
655- Point get_mouse_position() const {return m_mouse_position;}
656+ Point get_mouse_position() const {return mouse_position_;}
657 //
658 /// Find out whether the mouse is currently pressed
659 bool is_mouse_pressed() const {return SDL_GetMouseState(nullptr, nullptr); }
660
661 /// Swap left and right mouse key?
662- void set_mouse_swap(const bool swap) {m_mouse_swapped = swap;}
663+ void set_mouse_swap(const bool swap) {mouse_swapped_ = swap;}
664
665 /// Lock the mouse cursor into place (e.g., for scrolling the map)
666- void set_mouse_lock(const bool locked) {m_mouse_locked = locked;}
667+ void set_mouse_lock(const bool locked) {mouse_locked_ = locked;}
668 //@}
669
670
671@@ -209,47 +209,47 @@
672 /**
673 * The commandline, conveniently repackaged.
674 */
675- std::map<std::string, std::string> m_commandline;
676+ std::map<std::string, std::string> commandline_;
677
678- std::string m_filename;
679+ std::string filename_;
680
681 /// Script to be run after the game was started with --editor,
682 /// --scenario or --loadgame.
683- std::string m_script_to_run;
684+ std::string script_to_run_;
685
686 //Log all output to this file if set, otherwise use cout
687- std::string m_logfile;
688+ std::string logfile_;
689
690- GameType m_game_type;
691+ GameType game_type_;
692
693 ///True if left and right mouse button should be swapped
694- bool m_mouse_swapped;
695+ bool mouse_swapped_;
696
697 /// When apple is involved, the middle mouse button is sometimes send, even
698 /// if it wasn't pressed. We try to revert this and this helps.
699- bool m_faking_middle_mouse_button;
700+ bool faking_middle_mouse_button_;
701
702 ///The current position of the mouse pointer
703- Point m_mouse_position;
704+ Point mouse_position_;
705
706 ///If true, the mouse cursor will \e not move with a mousemotion event:
707 ///instead, the map will be scrolled
708- bool m_mouse_locked;
709+ bool mouse_locked_;
710
711 ///If the mouse needs to be moved in warp_mouse(), this Point is
712 ///used to cancel the resulting SDL_MouseMotionEvent.
713- Point m_mouse_compensate_warp;
714+ Point mouse_compensate_warp_;
715
716 ///true if an external entity wants us to quit
717- bool m_should_die;
718+ bool should_die_;
719
720- std::string m_homedir;
721+ std::string homedir_;
722
723 /// flag indicating if stdout and stderr have been redirected
724- bool m_redirected_stdio;
725+ bool redirected_stdio_;
726
727 /// Absolute path to the data directory.
728- std::string m_datadir;
729+ std::string datadir_;
730
731 ///Holds this process' one and only instance of WLApplication, if it was
732 ///created already. nullptr otherwise.
733
734=== modified file 'src/wui/buildingwindow.cc'
735--- src/wui/buildingwindow.cc 2016-01-10 11:36:05 +0000
736+++ src/wui/buildingwindow.cc 2016-01-24 20:25:45 +0000
737@@ -1,5 +1,5 @@
738 /*
739- * Copyright (C) 2002-2004, 2006-2013 by the Widelands Development Team
740+ * Copyright (C) 2002-2016 by the Widelands Development Team
741 *
742 * This program is free software; you can redistribute it and/or
743 * modify it under the terms of the GNU General Public License
744@@ -55,27 +55,27 @@
745 (&parent, "building_window",
746 0, 0, Width, 0,
747 b.descr().descname()),
748- m_registry(registry),
749- m_building (b),
750- m_workarea_overlay_id(0),
751- m_avoid_fastclick(false)
752+ registry_(registry),
753+ building_ (b),
754+ workarea_overlay_id_(0),
755+ avoid_fastclick_(false)
756 {
757- delete m_registry;
758- m_registry = this;
759+ delete registry_;
760+ registry_ = this;
761
762- m_capscache_player_number = 0;
763- m_capsbuttons = nullptr;
764- m_capscache = 0;
765- m_caps_setup = false;
766- m_toggle_workarea = nullptr;
767+ capscache_player_number_ = 0;
768+ capsbuttons_ = nullptr;
769+ capscache_ = 0;
770+ caps_setup_ = false;
771+ toggle_workarea_ = nullptr;
772
773 UI::Box * vbox = new UI::Box(this, 0, 0, UI::Box::Vertical);
774
775- m_tabs = new UI::TabPanel(vbox, 0, 0, nullptr);
776- vbox->add(m_tabs, UI::Box::AlignLeft, true);
777+ tabs_ = new UI::TabPanel(vbox, 0, 0, nullptr);
778+ vbox->add(tabs_, UI::Box::AlignLeft, true);
779
780- m_capsbuttons = new UI::Box(vbox, 0, 0, UI::Box::Horizontal);
781- vbox->add(m_capsbuttons, UI::Box::AlignLeft, true);
782+ capsbuttons_ = new UI::Box(vbox, 0, 0, UI::Box::Horizontal);
783+ vbox->add(capsbuttons_, UI::Box::AlignLeft, true);
784 // actually create buttons on the first call to think(),
785 // so that overriding create_capsbuttons() works
786
787@@ -86,7 +86,7 @@
788 show_workarea();
789
790 // Title for construction site
791- if (upcast(Widelands::ConstructionSite, csite, &m_building)) {
792+ if (upcast(Widelands::ConstructionSite, csite, &building_)) {
793 // Show name in parenthesis as it may take all width already
794 const std::string title = (boost::format("(%s)") % csite->building().descname()).str();
795 set_title(title);
796@@ -96,10 +96,10 @@
797
798 BuildingWindow::~BuildingWindow()
799 {
800- if (m_workarea_overlay_id) {
801- igbase().mutable_field_overlay_manager()->remove_overlay(m_workarea_overlay_id);
802+ if (workarea_overlay_id_) {
803+ igbase().mutable_field_overlay_manager()->remove_overlay(workarea_overlay_id_);
804 }
805- m_registry = nullptr;
806+ registry_ = nullptr;
807 }
808
809 namespace Widelands {class BuildingDescr;}
810@@ -138,18 +138,18 @@
811 die();
812
813 if
814- (!m_caps_setup
815- ||
816- m_capscache_player_number != igbase().player_number()
817- ||
818- building().get_playercaps() != m_capscache)
819+ (!caps_setup_
820+ ||
821+ capscache_player_number_ != igbase().player_number()
822+ ||
823+ building().get_playercaps() != capscache_)
824 {
825- m_capsbuttons->free_children();
826- create_capsbuttons(m_capsbuttons);
827+ capsbuttons_->free_children();
828+ create_capsbuttons(capsbuttons_);
829 move_out_of_the_way();
830- if (!m_avoid_fastclick)
831+ if (!avoid_fastclick_)
832 warp_mouse_to_fastclick_panel();
833- m_caps_setup = true;
834+ caps_setup_ = true;
835 }
836
837
838@@ -165,8 +165,8 @@
839 */
840 void BuildingWindow::create_capsbuttons(UI::Box * capsbuttons)
841 {
842- m_capscache = building().get_playercaps();
843- m_capscache_player_number = igbase().player_number();
844+ capscache_ = building().get_playercaps();
845+ capscache_player_number_ = igbase().player_number();
846
847 const Widelands::Player & owner = building().owner();
848 const Widelands::PlayerNumber owner_number = owner.player_number();
849@@ -176,7 +176,7 @@
850 bool requires_destruction_separator = false;
851 if (can_act) {
852 // Check if this is a port building and if yes show expedition button
853- if (upcast(Widelands::Warehouse const, warehouse, &m_building)) {
854+ if (upcast(Widelands::Warehouse const, warehouse, &building_)) {
855 if (Widelands::PortDock * pd = warehouse->get_portdock()) {
856 if (pd->expedition_started()) {
857 UI::Button * expeditionbtn =
858@@ -202,7 +202,7 @@
859 }
860 }
861 else
862- if (upcast(const Widelands::ProductionSite, productionsite, &m_building)) {
863+ if (upcast(const Widelands::ProductionSite, productionsite, &building_)) {
864 if (!is_a(Widelands::MilitarySite, productionsite)) {
865 const bool is_stopped = productionsite->is_stopped();
866 UI::Button * stopbtn =
867@@ -227,9 +227,9 @@
868 }
869 } // upcast to productionsite
870
871- if (m_capscache & Widelands::Building::PCap_Enhancable) {
872+ if (capscache_ & Widelands::Building::PCap_Enhancable) {
873 const Widelands::DescriptionIndex & enhancement =
874- m_building.descr().enhancement();
875+ building_.descr().enhancement();
876 const Widelands::TribeDescr & tribe = owner.tribe();
877 if (owner.is_building_type_allowed(enhancement)) {
878 const Widelands::BuildingDescr & building_descr =
879@@ -256,7 +256,7 @@
880 }
881 }
882
883- if (m_capscache & Widelands::Building::PCap_Bulldoze) {
884+ if (capscache_ & Widelands::Building::PCap_Bulldoze) {
885 UI::Button * destroybtn =
886 new UI::Button
887 (capsbuttons, "destroy", 0, 0, 34, 34,
888@@ -272,9 +272,9 @@
889 requires_destruction_separator = true;
890 }
891
892- if (m_capscache & Widelands::Building::PCap_Dismantle) {
893+ if (capscache_ & Widelands::Building::PCap_Dismantle) {
894 std::map<Widelands::DescriptionIndex, uint8_t> wares;
895- Widelands::DismantleSite::count_returned_wares(&m_building, wares);
896+ Widelands::DismantleSite::count_returned_wares(&building_, wares);
897 UI::Button * dismantlebtn =
898 new UI::Button
899 (capsbuttons, "dismantle", 0, 0, 34, 34,
900@@ -301,24 +301,24 @@
901
902 if (can_see) {
903 WorkareaInfo wa_info;
904- if (upcast(Widelands::ConstructionSite, csite, &m_building)) {
905+ if (upcast(Widelands::ConstructionSite, csite, &building_)) {
906 wa_info = csite->building().m_workarea_info;
907 } else {
908- wa_info = m_building.descr().m_workarea_info;
909+ wa_info = building_.descr().m_workarea_info;
910 }
911 if (!wa_info.empty()) {
912- m_toggle_workarea = new UI::Button
913+ toggle_workarea_ = new UI::Button
914 (capsbuttons, "workarea",
915 0, 0, 34, 34,
916 g_gr->images().get("pics/but4.png"),
917 g_gr->images().get("pics/workarea123.png"),
918 _("Hide work area"));
919- m_toggle_workarea->sigclicked.connect
920+ toggle_workarea_->sigclicked.connect
921 (boost::bind(&BuildingWindow::toggle_workarea, boost::ref(*this)));
922
923- capsbuttons->add(m_toggle_workarea, UI::Box::AlignCenter);
924+ capsbuttons->add(toggle_workarea_, UI::Box::AlignCenter);
925 configure_workarea_button();
926- set_fastclick_panel(m_toggle_workarea);
927+ set_fastclick_panel(toggle_workarea_);
928 }
929
930 if (igbase().get_display_flag(InteractiveBase::dfDebug)) {
931@@ -358,10 +358,10 @@
932 _("Help"));
933
934 UI::UniqueWindow::Registry& registry =
935- igbase().unique_windows().get_registry(m_building.descr().name() + "_help");
936+ igbase().unique_windows().get_registry(building_.descr().name() + "_help");
937 registry.open_window = [this, &registry] {
938 new UI::BuildingHelpWindow(
939- &igbase(), registry, m_building.descr(), m_building.owner().tribe(), &igbase().egbase().lua());
940+ &igbase(), registry, building_.descr(), building_.owner().tribe(), &igbase().egbase().lua());
941 };
942
943 helpbtn->sigclicked.connect(boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(registry)));
944@@ -377,11 +377,11 @@
945 void BuildingWindow::act_bulldoze()
946 {
947 if (get_key_state(SDL_SCANCODE_LCTRL) || get_key_state(SDL_SCANCODE_RCTRL)) {
948- if (m_building.get_playercaps() & Widelands::Building::PCap_Bulldoze)
949- igbase().game().send_player_bulldoze(m_building);
950+ if (building_.get_playercaps() & Widelands::Building::PCap_Bulldoze)
951+ igbase().game().send_player_bulldoze(building_);
952 }
953 else {
954- show_bulldoze_confirm(dynamic_cast<InteractivePlayer&>(igbase()), m_building);
955+ show_bulldoze_confirm(dynamic_cast<InteractivePlayer&>(igbase()), building_);
956 }
957 }
958
959@@ -393,11 +393,11 @@
960 void BuildingWindow::act_dismantle()
961 {
962 if (get_key_state(SDL_SCANCODE_LCTRL) || get_key_state(SDL_SCANCODE_RCTRL)) {
963- if (m_building.get_playercaps() & Widelands::Building::PCap_Dismantle)
964- igbase().game().send_player_dismantle(m_building);
965+ if (building_.get_playercaps() & Widelands::Building::PCap_Dismantle)
966+ igbase().game().send_player_dismantle(building_);
967 }
968 else {
969- show_dismantle_confirm(dynamic_cast<InteractivePlayer&>(igbase()), m_building);
970+ show_dismantle_confirm(dynamic_cast<InteractivePlayer&>(igbase()), building_);
971 }
972 }
973
974@@ -407,8 +407,8 @@
975 ===============
976 */
977 void BuildingWindow::act_start_stop() {
978- if (dynamic_cast<const Widelands::ProductionSite *>(&m_building))
979- igbase().game().send_player_start_stop_building (m_building);
980+ if (dynamic_cast<const Widelands::ProductionSite *>(&building_))
981+ igbase().game().send_player_start_stop_building (building_);
982
983 die();
984 }
985@@ -420,9 +420,9 @@
986 ===============
987 */
988 void BuildingWindow::act_start_or_cancel_expedition() {
989- if (upcast(Widelands::Warehouse const, warehouse, &m_building))
990+ if (upcast(Widelands::Warehouse const, warehouse, &building_))
991 if (warehouse->get_portdock())
992- igbase().game().send_player_start_or_cancel_expedition(m_building);
993+ igbase().game().send_player_start_or_cancel_expedition(building_);
994
995 // No need to die here - as soon as the request is handled, the UI will get updated by the portdock
996 //die();
997@@ -436,13 +436,13 @@
998 void BuildingWindow::act_enhance(Widelands::DescriptionIndex id)
999 {
1000 if (get_key_state(SDL_SCANCODE_LCTRL) || get_key_state(SDL_SCANCODE_RCTRL)) {
1001- if (m_building.get_playercaps() & Widelands::Building::PCap_Enhancable)
1002- igbase().game().send_player_enhance_building(m_building, id);
1003+ if (building_.get_playercaps() & Widelands::Building::PCap_Enhancable)
1004+ igbase().game().send_player_enhance_building(building_, id);
1005 }
1006 else {
1007 show_enhance_confirm
1008 (dynamic_cast<InteractivePlayer&>(igbase()),
1009- m_building,
1010+ building_,
1011 id);
1012 }
1013 }
1014@@ -456,7 +456,7 @@
1015 {
1016 show_field_debug
1017 (igbase(),
1018- igbase().game().map().get_fcoords(m_building.get_position()));
1019+ igbase().game().map().get_fcoords(building_.get_position()));
1020 }
1021
1022 /**
1023@@ -464,19 +464,19 @@
1024 */
1025 void BuildingWindow::show_workarea()
1026 {
1027- if (m_workarea_overlay_id) {
1028+ if (workarea_overlay_id_) {
1029 return; // already shown, nothing to be done
1030 }
1031 WorkareaInfo workarea_info;
1032- if (upcast(Widelands::ConstructionSite, csite, &m_building)) {
1033+ if (upcast(Widelands::ConstructionSite, csite, &building_)) {
1034 workarea_info = csite->building().m_workarea_info;
1035 } else {
1036- workarea_info = m_building.descr().m_workarea_info;
1037+ workarea_info = building_.descr().m_workarea_info;
1038 }
1039 if (workarea_info.empty()) {
1040 return;
1041 }
1042- m_workarea_overlay_id = igbase().show_work_area(workarea_info, m_building.get_position());
1043+ workarea_overlay_id_ = igbase().show_work_area(workarea_info, building_.get_position());
1044
1045 configure_workarea_button();
1046 }
1047@@ -486,33 +486,33 @@
1048 */
1049 void BuildingWindow::hide_workarea()
1050 {
1051- if (m_workarea_overlay_id) {
1052- igbase().hide_work_area(m_workarea_overlay_id);
1053- m_workarea_overlay_id = 0;
1054+ if (workarea_overlay_id_) {
1055+ igbase().hide_work_area(workarea_overlay_id_);
1056+ workarea_overlay_id_ = 0;
1057
1058 configure_workarea_button();
1059 }
1060 }
1061
1062 /**
1063- * Sets the perm_pressed state and the tooltip.
1064+ * Sets the perpressed_ state and the tooltip.
1065 */
1066 void BuildingWindow::configure_workarea_button()
1067 {
1068- if (m_toggle_workarea) {
1069- if (m_workarea_overlay_id) {
1070- m_toggle_workarea->set_tooltip(_("Hide work area"));
1071- m_toggle_workarea->set_perm_pressed(true);
1072+ if (toggle_workarea_) {
1073+ if (workarea_overlay_id_) {
1074+ toggle_workarea_->set_tooltip(_("Hide work area"));
1075+ toggle_workarea_->set_perm_pressed(true);
1076 } else {
1077- m_toggle_workarea->set_tooltip(_("Show work area"));
1078- m_toggle_workarea->set_perm_pressed(false);
1079+ toggle_workarea_->set_tooltip(_("Show work area"));
1080+ toggle_workarea_->set_perm_pressed(false);
1081 }
1082 }
1083 }
1084
1085
1086 void BuildingWindow::toggle_workarea() {
1087- if (m_workarea_overlay_id) {
1088+ if (workarea_overlay_id_) {
1089 hide_workarea();
1090 } else {
1091 show_workarea();
1092
1093=== modified file 'src/wui/buildingwindow.h'
1094--- src/wui/buildingwindow.h 2016-01-07 12:47:17 +0000
1095+++ src/wui/buildingwindow.h 2016-01-24 20:25:45 +0000
1096@@ -1,5 +1,5 @@
1097 /*
1098- * Copyright (C) 2002-2004, 2006-2010, 2012 by the Widelands Development Team
1099+ * Copyright (C) 2002-2016 by the Widelands Development Team
1100 *
1101 * This program is free software; you can redistribute it and/or
1102 * modify it under the terms of the GNU General Public License
1103@@ -45,7 +45,7 @@
1104
1105 virtual ~BuildingWindow();
1106
1107- Widelands::Building & building() {return m_building;}
1108+ Widelands::Building & building() {return building_;}
1109
1110 InteractiveGameBase & igbase() const {
1111 return dynamic_cast<InteractiveGameBase&>(*get_parent());
1112@@ -53,10 +53,10 @@
1113
1114 void draw(RenderTarget &) override;
1115 void think() override;
1116- void set_avoid_fastclick(bool afc) {m_avoid_fastclick = afc;}
1117+ void set_avoid_fastclick(bool afc) {avoid_fastclick_ = afc;}
1118
1119 protected:
1120- UI::TabPanel * get_tabs() {return m_tabs;}
1121+ UI::TabPanel * get_tabs() {return tabs_;}
1122
1123 void act_bulldoze();
1124 void act_dismantle();
1125@@ -75,23 +75,23 @@
1126
1127 virtual void create_capsbuttons(UI::Box * buttons);
1128
1129- UI::Window * & m_registry;
1130+ UI::Window * & registry_;
1131
1132 private:
1133- Widelands::Building& m_building;
1134-
1135- UI::TabPanel * m_tabs;
1136-
1137- UI::Box * m_capsbuttons; ///< \ref UI::Box that contains capabilities buttons
1138- UI::Button * m_toggle_workarea;
1139+ Widelands::Building& building_;
1140+
1141+ UI::TabPanel * tabs_;
1142+
1143+ UI::Box * capsbuttons_; ///< \ref UI::Box that contains capabilities buttons
1144+ UI::Button * toggle_workarea_;
1145
1146 // capabilities that were last used in setting up the caps panel
1147- uint32_t m_capscache;
1148- Widelands::PlayerNumber m_capscache_player_number;
1149- bool m_caps_setup;
1150+ uint32_t capscache_;
1151+ Widelands::PlayerNumber capscache_player_number_;
1152+ bool caps_setup_;
1153
1154- FieldOverlayManager::OverlayId m_workarea_overlay_id;
1155- bool m_avoid_fastclick;
1156+ FieldOverlayManager::OverlayId workarea_overlay_id_;
1157+ bool avoid_fastclick_;
1158 };
1159
1160 #endif // end of include guard: WL_WUI_BUILDINGWINDOW_H
1161
1162=== modified file 'src/wui/debugconsole.cc'
1163--- src/wui/debugconsole.cc 2014-09-20 09:37:47 +0000
1164+++ src/wui/debugconsole.cc 2016-01-24 20:25:45 +0000
1165@@ -1,5 +1,5 @@
1166 /*
1167- * Copyright (C) 2008-2009 by the Widelands Development Team
1168+ * Copyright (C) 2008-2016 by the Widelands Development Team
1169 *
1170 * This program is free software; you can redistribute it and/or
1171 * modify it under the terms of the GNU General Public License
1172@@ -136,7 +136,7 @@
1173 // This check is an evil hack to account for the singleton-nature
1174 // of the Console
1175 if (this != &g_console) {
1176- for (const auto& command : m_commands) {
1177+ for (const auto& command : commands_) {
1178 g_console.commands.erase(command);
1179 }
1180 }
1181@@ -145,7 +145,7 @@
1182 void Handler::addCommand(const std::string & cmd, const HandlerFn & fun)
1183 {
1184 g_console.commands[cmd] = fun;
1185- m_commands.push_back(cmd);
1186+ commands_.push_back(cmd);
1187 }
1188
1189 void Handler::setDefaultCommand(const HandlerFn & fun)
1190
1191=== modified file 'src/wui/debugconsole.h'
1192--- src/wui/debugconsole.h 2014-09-19 09:07:14 +0000
1193+++ src/wui/debugconsole.h 2016-01-24 20:25:45 +0000
1194@@ -1,5 +1,5 @@
1195 /*
1196- * Copyright (C) 2008-2010 by the Widelands Development Team
1197+ * Copyright (C) 2008-2016 by the Widelands Development Team
1198 *
1199 * This program is free software; you can redistribute it and/or
1200 * modify it under the terms of the GNU General Public License
1201@@ -60,7 +60,7 @@
1202 void setDefaultCommand(const HandlerFn &);
1203
1204 private:
1205- std::vector<std::string> m_commands;
1206+ std::vector<std::string> commands_;
1207 };
1208
1209 /**
1210
1211=== modified file 'src/wui/edge_overlay_manager.cc'
1212--- src/wui/edge_overlay_manager.cc 2015-03-29 18:07:45 +0000
1213+++ src/wui/edge_overlay_manager.cc 2016-01-24 20:25:45 +0000
1214@@ -1,5 +1,5 @@
1215 /*
1216- * Copyright (C) 2006-2015 by the Widelands Development Team
1217+ * Copyright (C) 2006-2016 by the Widelands Development Team
1218 *
1219 * This program is free software; you can redistribute it and/or
1220 * modify it under the terms of the GNU General Public License
1221@@ -19,21 +19,21 @@
1222
1223 #include "wui/edge_overlay_manager.h"
1224
1225-EdgeOverlayManager::EdgeOverlayManager() : m_current_overlay_id(0) {
1226+EdgeOverlayManager::EdgeOverlayManager() : current_overlay_id_(0) {
1227 }
1228
1229 EdgeOverlayManager::OverlayId EdgeOverlayManager::next_overlay_id() {
1230- ++m_current_overlay_id;
1231- return m_current_overlay_id;
1232+ ++current_overlay_id_;
1233+ return current_overlay_id_;
1234 }
1235
1236 void EdgeOverlayManager::register_overlay
1237 (Widelands::Coords const c, uint8_t const where, OverlayId const overlay_id)
1238 {
1239 const RegisteredRoadOverlays overlay = {overlay_id, where};
1240- RegisteredRoadOverlaysMap::iterator it = m_overlays.find(c);
1241- if (it == m_overlays.end())
1242- m_overlays.insert
1243+ RegisteredRoadOverlaysMap::iterator it = overlays_.find(c);
1244+ if (it == overlays_.end())
1245+ overlays_.insert
1246 (std::pair<const Widelands::Coords,
1247 RegisteredRoadOverlays>(c, overlay));
1248 else
1249@@ -41,25 +41,25 @@
1250 }
1251
1252 void EdgeOverlayManager::remove_overlay(const Widelands::Coords c) {
1253- const RegisteredRoadOverlaysMap::iterator it = m_overlays.find(c);
1254- if (it != m_overlays.end())
1255- m_overlays.erase(it);
1256+ const RegisteredRoadOverlaysMap::iterator it = overlays_.find(c);
1257+ if (it != overlays_.end())
1258+ overlays_.erase(it);
1259 }
1260
1261 void EdgeOverlayManager::remove_overlay(OverlayId const overlay_id) {
1262- RegisteredRoadOverlaysMap::iterator it = m_overlays.begin();
1263+ RegisteredRoadOverlaysMap::iterator it = overlays_.begin();
1264 const RegisteredRoadOverlaysMap::const_iterator end =
1265- m_overlays.end();
1266+ overlays_.end();
1267 while (it != end)
1268 if (it->second.overlay_id == overlay_id)
1269- m_overlays.erase(it++); // Necessary!
1270+ overlays_.erase(it++); // Necessary!
1271 else
1272 ++it;
1273 }
1274
1275 uint8_t EdgeOverlayManager::get_overlay(const Widelands::Coords c) const {
1276- RegisteredRoadOverlaysMap::const_iterator const it = m_overlays.find(c);
1277- if (it != m_overlays.end())
1278+ RegisteredRoadOverlaysMap::const_iterator const it = overlays_.find(c);
1279+ if (it != overlays_.end())
1280 return it->second.where;
1281 return 0;
1282 }
1283
1284=== modified file 'src/wui/edge_overlay_manager.h'
1285--- src/wui/edge_overlay_manager.h 2015-03-29 18:07:45 +0000
1286+++ src/wui/edge_overlay_manager.h 2016-01-24 20:25:45 +0000
1287@@ -54,8 +54,8 @@
1288 using RegisteredRoadOverlaysMap =
1289 std::map<const Widelands::Coords, RegisteredRoadOverlays, Widelands::Coords::OrderingFunctor>;
1290
1291- OverlayId m_current_overlay_id;
1292- RegisteredRoadOverlaysMap m_overlays;
1293+ OverlayId current_overlay_id_;
1294+ RegisteredRoadOverlaysMap overlays_;
1295
1296 DISALLOW_COPY_AND_ASSIGN(EdgeOverlayManager);
1297 };
1298
1299=== modified file 'src/wui/field_overlay_manager.cc'
1300--- src/wui/field_overlay_manager.cc 2016-01-15 19:48:47 +0000
1301+++ src/wui/field_overlay_manager.cc 2016-01-24 20:25:45 +0000
1302@@ -1,5 +1,5 @@
1303 /*
1304- * Copyright (C) 2002-2004, 2006-2008, 2010-2011, 2013 by the Widelands Development Team
1305+ * Copyright (C) 2002-2016 by the Widelands Development Team
1306 *
1307 * This program is free software; you can redistribute it and/or
1308 * modify it under the terms of the GNU General Public License
1309@@ -26,8 +26,8 @@
1310 #include "graphic/graphic.h"
1311 #include "logic/field.h"
1312
1313-FieldOverlayManager::FieldOverlayManager() : m_current_overlay_id(0) {
1314- OverlayInfo * buildhelp_info = m_buildhelp_infos;
1315+FieldOverlayManager::FieldOverlayManager() : current_overlay_id_(0) {
1316+ OverlayInfo * buildhelp_info = buildhelp_infos_;
1317 const char * filenames[] = {
1318 "pics/set_flag.png",
1319 "pics/small.png",
1320@@ -55,16 +55,16 @@
1321 }
1322
1323 bool FieldOverlayManager::buildhelp() const {
1324- return m_buildhelp;
1325+ return buildhelp_;
1326 }
1327
1328 void FieldOverlayManager::show_buildhelp(const bool value) {
1329- m_buildhelp = value;
1330+ buildhelp_ = value;
1331 }
1332
1333 void FieldOverlayManager::get_overlays(Widelands::FCoords const c,
1334 std::vector<OverlayInfo>* result) const {
1335- const RegisteredOverlaysMap & overlay_map = m_overlays[Widelands::TCoords<>::None];
1336+ const RegisteredOverlaysMap & overlay_map = overlays_[Widelands::TCoords<>::None];
1337 RegisteredOverlaysMap::const_iterator it = overlay_map.lower_bound(c);
1338
1339 while (it != overlay_map.end() && it->first == c && it->second.level <= kLevelForBuildHelp) {
1340@@ -72,10 +72,10 @@
1341 ++it;
1342 }
1343
1344- if (m_buildhelp) {
1345+ if (buildhelp_) {
1346 int buildhelp_overlay_index = get_buildhelp_overlay(c);
1347 if (buildhelp_overlay_index < Widelands::Field::Buildhelp_None) {
1348- result->emplace_back(m_buildhelp_infos[buildhelp_overlay_index]);
1349+ result->emplace_back(buildhelp_infos_[buildhelp_overlay_index]);
1350 }
1351 }
1352
1353@@ -90,7 +90,7 @@
1354 assert(c.t == Widelands::TCoords<>::D || c.t == Widelands::TCoords<>::R);
1355
1356
1357- const RegisteredOverlaysMap & overlay_map = m_overlays[c.t];
1358+ const RegisteredOverlaysMap & overlay_map = overlays_[c.t];
1359 RegisteredOverlaysMap::const_iterator it = overlay_map.lower_bound(c);
1360 while (it != overlay_map.end() && it->first == c) {
1361 result->emplace_back(it->second.pic, it->second.hotspot);
1362@@ -100,7 +100,7 @@
1363
1364 int FieldOverlayManager::get_buildhelp_overlay(const Widelands::FCoords& fc) const {
1365 Widelands::NodeCaps const caps =
1366- m_callback ? static_cast<Widelands::NodeCaps>(m_callback(fc)) : fc.field->nodecaps();
1367+ callback_ ? static_cast<Widelands::NodeCaps>(callback_(fc)) : fc.field->nodecaps();
1368
1369 const int value = caps & Widelands::BUILDCAPS_MINE ?
1370 Widelands::Field::Buildhelp_Mine :
1371@@ -130,7 +130,7 @@
1372 hotspot = Point(pic->width() / 2, pic->height() / 2);
1373 }
1374
1375- RegisteredOverlaysMap & overlay_map = m_overlays[c.t];
1376+ RegisteredOverlaysMap & overlay_map = overlays_[c.t];
1377 for
1378 (RegisteredOverlaysMap::iterator it = overlay_map.find(c);
1379 it != overlay_map.end() && it->first == c;
1380@@ -180,7 +180,7 @@
1381 void FieldOverlayManager::remove_overlay(Widelands::TCoords<> const c, const Image* pic) {
1382 assert(c.t <= 2);
1383
1384- RegisteredOverlaysMap & overlay_map = m_overlays[c.t];
1385+ RegisteredOverlaysMap & overlay_map = overlays_[c.t];
1386
1387 if (overlay_map.count(c)) {
1388 RegisteredOverlaysMap::iterator it = overlay_map.lower_bound(c);
1389@@ -196,8 +196,8 @@
1390 }
1391
1392 void FieldOverlayManager::remove_overlay(const OverlayId overlay_id) {
1393- const RegisteredOverlaysMap * const overlays_end = m_overlays + 3;
1394- for (RegisteredOverlaysMap * j = m_overlays; j != overlays_end; ++j)
1395+ const RegisteredOverlaysMap * const overlays_end = overlays_ + 3;
1396+ for (RegisteredOverlaysMap * j = overlays_; j != overlays_end; ++j)
1397 for (RegisteredOverlaysMap::iterator it = j->begin(); it != j->end();) {
1398 it->second.overlay_ids.erase(overlay_id);
1399 if (it->second.overlay_ids.empty())
1400@@ -208,16 +208,16 @@
1401 }
1402
1403 void FieldOverlayManager::remove_all_overlays() {
1404- m_overlays[0].clear();
1405- m_overlays[1].clear();
1406- m_overlays[2].clear();
1407+ overlays_[0].clear();
1408+ overlays_[1].clear();
1409+ overlays_[2].clear();
1410 }
1411
1412 void FieldOverlayManager::register_overlay_callback_function(CallbackFn function) {
1413- m_callback = function;
1414+ callback_ = function;
1415 }
1416
1417 FieldOverlayManager::OverlayId FieldOverlayManager::next_overlay_id() {
1418- ++m_current_overlay_id;
1419- return m_current_overlay_id;
1420+ ++current_overlay_id_;
1421+ return current_overlay_id_;
1422 }
1423
1424=== modified file 'src/wui/field_overlay_manager.h'
1425--- src/wui/field_overlay_manager.h 2016-01-15 19:48:47 +0000
1426+++ src/wui/field_overlay_manager.h 2016-01-24 20:25:45 +0000
1427@@ -126,19 +126,19 @@
1428 RegisteredOverlays,
1429 Widelands::Coords::OrderingFunctor>;
1430
1431- // Returns the index into m_buildhelp_infos for the correct fieldcaps for
1432- // 'fc' according to the current 'm_callback'.
1433+ // Returns the index into buildhelp_infos_ for the correct fieldcaps for
1434+ // 'fc' according to the current 'callback_'.
1435 int get_buildhelp_overlay(const Widelands::FCoords& fc) const;
1436
1437 // indexed by TCoords<>::TriangleIndex
1438- RegisteredOverlaysMap m_overlays[3];
1439+ RegisteredOverlaysMap overlays_[3];
1440
1441- OverlayInfo m_buildhelp_infos[Widelands::Field::Buildhelp_None];
1442- bool m_buildhelp;
1443+ OverlayInfo buildhelp_infos_[Widelands::Field::Buildhelp_None];
1444+ bool buildhelp_;
1445
1446 // this callback is used to define where overlays are drawn.
1447- CallbackFn m_callback;
1448- OverlayId m_current_overlay_id;
1449+ CallbackFn callback_;
1450+ OverlayId current_overlay_id_;
1451 };
1452
1453 #endif // end of include guard: WL_WUI_FIELD_OVERLAY_MANAGER_H
1454
1455=== modified file 'src/wui/game_chat_menu.cc'
1456--- src/wui/game_chat_menu.cc 2014-09-20 09:37:47 +0000
1457+++ src/wui/game_chat_menu.cc 2016-01-24 20:25:45 +0000
1458@@ -1,5 +1,5 @@
1459 /*
1460- * Copyright (C) 2002-2004, 2006-2008, 2011 by the Widelands Development Team
1461+ * Copyright (C) 2002-2016 by the Widelands Development Team
1462 *
1463 * This program is free software; you can redistribute it and/or
1464 * modify it under the terms of the GNU General Public License
1465@@ -36,17 +36,17 @@
1466 const std::string & title)
1467 :
1468 UI::UniqueWindow(parent, "chat", &registry, 440, 235, title),
1469-m_chat(this, 5, 5, get_inner_w() - 10, get_inner_h() - 10, chat)
1470+chat_(this, 5, 5, get_inner_w() - 10, get_inner_h() - 10, chat)
1471 {
1472 if (get_usedefaultpos())
1473 center_to_parent();
1474
1475- m_close_on_send = false;
1476-
1477- m_chat.sent.connect(boost::bind(&GameChatMenu::acknowledge, this));
1478- m_chat.aborted.connect(boost::bind(&GameChatMenu::acknowledge, this));
1479-
1480- enter_chat_message(m_close_on_send);
1481+ close_on_send_ = false;
1482+
1483+ chat_.sent.connect(boost::bind(&GameChatMenu::acknowledge, this));
1484+ chat_.aborted.connect(boost::bind(&GameChatMenu::acknowledge, this));
1485+
1486+ enter_chat_message(close_on_send_);
1487 }
1488
1489 GameChatMenu* GameChatMenu::create_chat_console(
1490@@ -67,13 +67,13 @@
1491
1492 void GameChatMenu::enter_chat_message(bool close_on_send)
1493 {
1494- m_chat.focus_edit();
1495- m_close_on_send = close_on_send;
1496+ chat_.focus_edit();
1497+ close_on_send_ = close_on_send;
1498 }
1499
1500
1501 void GameChatMenu::acknowledge()
1502 {
1503- if (m_close_on_send)
1504+ if (close_on_send_)
1505 die();
1506 }
1507
1508=== modified file 'src/wui/game_chat_menu.h'
1509--- src/wui/game_chat_menu.h 2014-07-05 16:41:51 +0000
1510+++ src/wui/game_chat_menu.h 2016-01-24 20:25:45 +0000
1511@@ -1,5 +1,5 @@
1512 /*
1513- * Copyright (C) 2002-2004, 2006, 2008 by the Widelands Development Team
1514+ * Copyright (C) 2002-2016, 2008 by the Widelands Development Team
1515 *
1516 * This program is free software; you can redistribute it and/or
1517 * modify it under the terms of the GNU General Public License
1518@@ -50,8 +50,8 @@
1519 private:
1520 GameChatMenu(UI::Panel *, UI::UniqueWindow::Registry &, ChatProvider &, const std::string & title);
1521 void acknowledge();
1522- GameChatPanel m_chat;
1523- bool m_close_on_send;
1524+ GameChatPanel chat_;
1525+ bool close_on_send_;
1526 };
1527
1528 #endif // end of include guard: WL_WUI_GAME_CHAT_MENU_H
1529
1530=== modified file 'src/wui/game_main_menu.cc'
1531--- src/wui/game_main_menu.cc 2014-10-11 09:11:29 +0000
1532+++ src/wui/game_main_menu.cc 2016-01-24 20:25:45 +0000
1533@@ -1,5 +1,5 @@
1534 /*
1535- * Copyright (C) 2002-2004, 2006, 2008 by the Widelands Development Team
1536+ * Copyright (C) 2002-2016 by the Widelands Development Team
1537 *
1538 * This program is free software; you can redistribute it and/or
1539 * modify it under the terms of the GNU General Public License
1540@@ -37,8 +37,8 @@
1541 InteractivePlayer::GameMainMenuWindows & windows)
1542 :
1543 UI::UniqueWindow(&plr, "main_menu", &registry, 180, 55, _("Statistics Menu")),
1544-m_player (plr),
1545-m_windows (windows),
1546+player_ (plr),
1547+windows_ (windows),
1548 general_stats
1549 (this, "general_stats",
1550 posx(0, 4), posy(0, 3), buttonw(4), buttonh(1),
1551@@ -65,13 +65,13 @@
1552 _("Stock"))
1553 {
1554 general_stats.sigclicked.connect
1555- (boost::bind(&GeneralStatisticsMenu::Registry::toggle, boost::ref(m_windows.general_stats)));
1556+ (boost::bind(&GeneralStatisticsMenu::Registry::toggle, boost::ref(windows_.general_stats)));
1557 ware_stats.sigclicked.connect
1558- (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(m_windows.ware_stats)));
1559+ (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(windows_.ware_stats)));
1560 building_stats.sigclicked.connect
1561- (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(m_windows.building_stats)));
1562+ (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(windows_.building_stats)));
1563 stock.sigclicked.connect
1564- (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(m_windows.stock)));
1565+ (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(windows_.stock)));
1566
1567 #define INIT_BTN_HOOKS(registry, btn) \
1568 assert (!registry.on_create); \
1569@@ -80,19 +80,19 @@
1570 registry.on_delete = std::bind(&UI::Button::set_perm_pressed, &btn, false); \
1571 if (registry.window) btn.set_perm_pressed(true); \
1572
1573- INIT_BTN_HOOKS(m_windows.general_stats, general_stats)
1574- INIT_BTN_HOOKS(m_windows.ware_stats, ware_stats)
1575- INIT_BTN_HOOKS(m_windows.building_stats, building_stats)
1576- INIT_BTN_HOOKS(m_windows.stock, stock)
1577+ INIT_BTN_HOOKS(windows_.general_stats, general_stats)
1578+ INIT_BTN_HOOKS(windows_.ware_stats, ware_stats)
1579+ INIT_BTN_HOOKS(windows_.building_stats, building_stats)
1580+ INIT_BTN_HOOKS(windows_.stock, stock)
1581
1582- m_windows.general_stats.open_window = [this] {
1583- new GeneralStatisticsMenu(m_player, m_windows.general_stats);
1584- };
1585- m_windows.ware_stats.open_window = [this] {
1586- new WareStatisticsMenu(m_player, m_windows.ware_stats);
1587- };
1588- m_windows.building_stats.open_window = [this] {
1589- new BuildingStatisticsMenu(m_player, m_windows.building_stats);
1590+ windows_.general_stats.open_window = [this] {
1591+ new GeneralStatisticsMenu(player_, windows_.general_stats);
1592+ };
1593+ windows_.ware_stats.open_window = [this] {
1594+ new WareStatisticsMenu(player_, windows_.ware_stats);
1595+ };
1596+ windows_.building_stats.open_window = [this] {
1597+ new BuildingStatisticsMenu(player_, windows_.building_stats);
1598 };
1599
1600 if (get_usedefaultpos())
1601@@ -109,8 +109,8 @@
1602 registry.on_create = 0; \
1603 registry.on_delete = 0;
1604
1605- DEINIT_BTN_HOOKS(m_windows.general_stats, general_stats)
1606- DEINIT_BTN_HOOKS(m_windows.ware_stats, ware_stats)
1607- DEINIT_BTN_HOOKS(m_windows.building_stats, building_stats)
1608- DEINIT_BTN_HOOKS(m_windows.stock, stock)
1609+ DEINIT_BTN_HOOKS(windows_.general_stats, general_stats)
1610+ DEINIT_BTN_HOOKS(windows_.ware_stats, ware_stats)
1611+ DEINIT_BTN_HOOKS(windows_.building_stats, building_stats)
1612+ DEINIT_BTN_HOOKS(windows_.stock, stock)
1613 }
1614
1615=== modified file 'src/wui/game_main_menu.h'
1616--- src/wui/game_main_menu.h 2014-09-10 16:57:31 +0000
1617+++ src/wui/game_main_menu.h 2016-01-24 20:25:45 +0000
1618@@ -1,5 +1,5 @@
1619 /*
1620- * Copyright (C) 2002-2004, 2006, 2008 by the Widelands Development Team
1621+ * Copyright (C) 2002-2016 by the Widelands Development Team
1622 *
1623 * This program is free software; you can redistribute it and/or
1624 * modify it under the terms of the GNU General Public License
1625@@ -33,8 +33,8 @@
1626 ~GameMainMenu();
1627
1628 private:
1629- InteractivePlayer & m_player;
1630- InteractivePlayer::GameMainMenuWindows & m_windows;
1631+ InteractivePlayer & player_;
1632+ InteractivePlayer::GameMainMenuWindows & windows_;
1633 UI::Button general_stats;
1634 UI::Button ware_stats;
1635 UI::Button building_stats;
1636
1637=== modified file 'src/wui/game_main_menu_save_game.cc'
1638--- src/wui/game_main_menu_save_game.cc 2015-11-01 10:11:56 +0000
1639+++ src/wui/game_main_menu_save_game.cc 2016-01-24 20:25:45 +0000
1640@@ -1,5 +1,5 @@
1641 /*
1642- * Copyright (C) 2002-2004, 2006-2008, 2010-2013 by the Widelands Development Team
1643+ * Copyright (C) 2002-2016 by the Widelands Development Team
1644 *
1645 * This program is free software; you can redistribute it and/or
1646 * modify it under the terms of the GNU General Public License
1647@@ -59,31 +59,31 @@
1648 UI::UniqueWindow
1649 (&parent, "save_game", &registry,
1650 WINDOW_WIDTH, WINDOW_HEIGHT, _("Save Game")),
1651- m_ls (this, HSPACING, VSPACING, LIST_WIDTH, LIST_HEIGHT),
1652- m_name_label
1653+ ls_ (this, HSPACING, VSPACING, LIST_WIDTH, LIST_HEIGHT),
1654+ name_label_
1655 (this, DESCRIPTION_X, 5, 0, 20, _("Map Name:"), UI::Align_CenterLeft),
1656- m_mapname
1657+ mapname_
1658 (this, DESCRIPTION_X, 20, 0, 20, " ", UI::Align_CenterLeft),
1659- m_gametime_label
1660+ gametime_label_
1661 (this, DESCRIPTION_X, 45, 0, 20, _("Game Time:"), UI::Align_CenterLeft),
1662- m_gametime
1663+ gametime_
1664 (this, DESCRIPTION_X, 60, 0, 20, " ", UI::Align_CenterLeft),
1665- m_players_label
1666+ players_label_
1667 (this, DESCRIPTION_X, 85, 0, 20, " ", UI::Align_CenterLeft),
1668- m_win_condition_label
1669+ win_condition_label_
1670 (this, DESCRIPTION_X, 110, 0, 20, _("Win condition:"), UI::Align_CenterLeft),
1671- m_win_condition
1672+ win_condition_
1673 (this, DESCRIPTION_X, 125, 0, 20, " ", UI::Align_CenterLeft),
1674- m_curdir(SaveHandler::get_base_dir())
1675+ curdir_(SaveHandler::get_base_dir())
1676 {
1677- m_editbox =
1678+ editbox_ =
1679 new UI::EditBox
1680 (this, HSPACING, EDITBOX_Y, LIST_WIDTH, EDITBOX_HEIGHT,
1681 g_gr->images().get("pics/but1.png"));
1682- m_editbox->changed.connect(boost::bind(&GameMainMenuSaveGame::edit_box_changed, this));
1683- m_editbox->ok.connect(boost::bind(&GameMainMenuSaveGame::ok, this));
1684+ editbox_->changed.connect(boost::bind(&GameMainMenuSaveGame::edit_box_changed, this));
1685+ editbox_->ok.connect(boost::bind(&GameMainMenuSaveGame::ok, this));
1686
1687- m_button_ok =
1688+ button_ok_ =
1689 new UI::Button
1690 (this, "ok",
1691 DESCRIPTION_X, OK_Y, DESCRIPTION_WIDTH, BUTTON_HEIGHT,
1692@@ -91,7 +91,7 @@
1693 _("OK"),
1694 std::string(),
1695 false);
1696- m_button_ok->sigclicked.connect(boost::bind(&GameMainMenuSaveGame::ok, this));
1697+ button_ok_->sigclicked.connect(boost::bind(&GameMainMenuSaveGame::ok, this));
1698
1699 UI::Button * cancelbtn =
1700 new UI::Button
1701@@ -109,8 +109,8 @@
1702 _("Delete"));
1703 deletebtn->sigclicked.connect(boost::bind(&GameMainMenuSaveGame::delete_clicked, this));
1704
1705- m_ls.selected.connect(boost::bind(&GameMainMenuSaveGame::selected, this, _1));
1706- m_ls.double_clicked.connect(boost::bind(&GameMainMenuSaveGame::double_clicked, this, _1));
1707+ ls_.selected.connect(boost::bind(&GameMainMenuSaveGame::selected, this, _1));
1708+ ls_.double_clicked.connect(boost::bind(&GameMainMenuSaveGame::double_clicked, this, _1));
1709
1710 fill_list();
1711
1712@@ -125,21 +125,21 @@
1713 {
1714 //Try to translate the map name.
1715 i18n::Textdomain td("maps");
1716- m_mapname.set_text(_(parent.game().get_map()->get_name()));
1717+ mapname_.set_text(_(parent.game().get_map()->get_name()));
1718 }
1719 uint32_t gametime = parent.game().get_gametime();
1720- m_gametime.set_text(gametimestring(gametime));
1721+ gametime_.set_text(gametimestring(gametime));
1722
1723 int player_nr = parent.game().player_manager()->get_number_of_players();
1724- m_players_label.set_text(
1725+ players_label_.set_text(
1726 (boost::format(ngettext("%i player", "%i players", player_nr)) % player_nr).str());
1727 {
1728 i18n::Textdomain td("win_conditions");
1729- m_win_condition.set_text(_(parent.game().get_win_condition_displayname()));
1730+ win_condition_.set_text(_(parent.game().get_win_condition_displayname()));
1731 }
1732 }
1733
1734- m_editbox->focus();
1735+ editbox_->focus();
1736 pause_game(true);
1737 }
1738
1739@@ -148,35 +148,35 @@
1740 * called when a item is selected
1741 */
1742 void GameMainMenuSaveGame::selected(uint32_t) {
1743- const std::string & name = m_ls.get_selected();
1744+ const std::string & name = ls_.get_selected();
1745
1746 Widelands::GameLoader gl(name, igbase().game());
1747 Widelands::GamePreloadPacket gpdp;
1748 gl.preload_game(gpdp); // This has worked before, no problem
1749 {
1750- m_editbox->set_text(FileSystem::filename_without_ext(name.c_str()));
1751+ editbox_->set_text(FileSystem::filename_without_ext(name.c_str()));
1752 }
1753- m_button_ok->set_enabled(true);
1754+ button_ok_->set_enabled(true);
1755
1756 //Try to translate the map name.
1757 {
1758 i18n::Textdomain td("maps");
1759- m_mapname.set_text(_(gpdp.get_mapname()));
1760+ mapname_.set_text(_(gpdp.get_mapname()));
1761 }
1762
1763 uint32_t gametime = gpdp.get_gametime();
1764- m_gametime.set_text(gametimestring(gametime));
1765+ gametime_.set_text(gametimestring(gametime));
1766
1767 if (gpdp.get_number_of_players() > 0) {
1768 const std::string text =
1769 (boost::format(ngettext("%u Player", "%u Players", gpdp.get_number_of_players()))
1770 % static_cast<unsigned int>(gpdp.get_number_of_players())).str();
1771- m_players_label.set_text(text);
1772+ players_label_.set_text(text);
1773 } else {
1774 // Keep label empty
1775- m_players_label.set_text("");
1776+ players_label_.set_text("");
1777 }
1778- m_win_condition.set_text(gpdp.get_win_condition());
1779+ win_condition_.set_text(gpdp.get_win_condition());
1780 }
1781
1782 /**
1783@@ -190,11 +190,11 @@
1784 * fill the file list
1785 */
1786 void GameMainMenuSaveGame::fill_list() {
1787- m_ls.clear();
1788+ ls_.clear();
1789 FilenameSet gamefiles;
1790
1791 // Fill it with all files we find.
1792- gamefiles = g_fs->list_directory(m_curdir);
1793+ gamefiles = g_fs->list_directory(curdir_);
1794
1795 Widelands::GamePreloadPacket gpdp;
1796
1797@@ -208,17 +208,17 @@
1798 try {
1799 Widelands::GameLoader gl(name, igbase().game());
1800 gl.preload_game(gpdp);
1801- m_ls.add(FileSystem::filename_without_ext(name), name);
1802+ ls_.add(FileSystem::filename_without_ext(name), name);
1803 } catch (const WException &) {} // we simply skip illegal entries
1804 }
1805 }
1806
1807 void GameMainMenuSaveGame::select_by_name(std::string name)
1808 {
1809- for (uint32_t idx = 0; idx < m_ls.size(); idx++) {
1810- const std::string val = m_ls[idx];
1811+ for (uint32_t idx = 0; idx < ls_.size(); idx++) {
1812+ const std::string val = ls_[idx];
1813 if (name == val) {
1814- m_ls.select(idx);
1815+ ls_.select(idx);
1816 return;
1817 }
1818 }
1819@@ -228,7 +228,7 @@
1820 * The editbox was changed. Enable ok button
1821 */
1822 void GameMainMenuSaveGame::edit_box_changed() {
1823- m_button_ok->set_enabled(m_editbox->text().size());
1824+ button_ok_->set_enabled(editbox_->text().size());
1825 }
1826
1827 static void dosave
1828@@ -260,7 +260,7 @@
1829 (boost::format(_("A file with the name ‘%s’ already exists. Overwrite?"))
1830 % FileSystem::fs_filename(filename.c_str())).str(),
1831 MBoxType::kOkCancel),
1832- m_filename(filename)
1833+ filename_(filename)
1834 {}
1835
1836 GameMainMenuSaveGame & menu_save_game() {
1837@@ -270,8 +270,8 @@
1838
1839 void clicked_ok() override
1840 {
1841- g_fs->fs_unlink(m_filename);
1842- dosave(menu_save_game().igbase(), m_filename);
1843+ g_fs->fs_unlink(filename_);
1844+ dosave(menu_save_game().igbase(), filename_);
1845 menu_save_game().die();
1846 }
1847
1848@@ -281,7 +281,7 @@
1849 }
1850
1851 private:
1852- std::string const m_filename;
1853+ std::string const filename_;
1854 };
1855
1856 /**
1857@@ -289,12 +289,12 @@
1858 */
1859 void GameMainMenuSaveGame::ok()
1860 {
1861- if (m_editbox->text().empty())
1862+ if (editbox_->text().empty())
1863 return;
1864
1865 std::string const complete_filename =
1866 igbase().game().save_handler().create_file_name
1867- (m_curdir, m_editbox->text());
1868+ (curdir_, editbox_->text());
1869
1870 // Check if file exists. If it does, show a warning.
1871 if (g_fs->file_exists(complete_filename)) {
1872@@ -324,12 +324,12 @@
1873 (boost::format(_("Do you really want to delete the file %s?")) %
1874 FileSystem::fs_filename(filename.c_str())),
1875 MBoxType::kOkCancel),
1876- m_filename(filename)
1877+ filename_(filename)
1878 {}
1879
1880 void clicked_ok() override
1881 {
1882- g_fs->fs_unlink(m_filename);
1883+ g_fs->fs_unlink(filename_);
1884 dynamic_cast<GameMainMenuSaveGame&>(*get_parent()).fill_list();
1885 die();
1886 }
1887@@ -340,7 +340,7 @@
1888 }
1889
1890 private:
1891- std::string const m_filename;
1892+ std::string const filename_;
1893 };
1894
1895
1896@@ -351,7 +351,7 @@
1897 {
1898 std::string const complete_filename =
1899 igbase().game().save_handler().create_file_name
1900- (m_curdir, m_editbox->text());
1901+ (curdir_, editbox_->text());
1902
1903 // Check if file exists. If it does, let the user confirm the deletion.
1904 if (g_fs->file_exists(complete_filename))
1905
1906=== modified file 'src/wui/game_main_menu_save_game.h'
1907--- src/wui/game_main_menu_save_game.h 2014-11-28 16:40:55 +0000
1908+++ src/wui/game_main_menu_save_game.h 2016-01-24 20:25:45 +0000
1909@@ -1,5 +1,5 @@
1910 /*
1911- * Copyright (C) 2002-2004, 2006, 2008-2013 by the Widelands Development Team
1912+ * Copyright (C) 2002-2016 by the Widelands Development Team
1913 *
1914 * This program is free software; you can redistribute it and/or
1915 * modify it under the terms of the GNU General Public License
1916@@ -51,15 +51,15 @@
1917 bool save_game(std::string);
1918 void pause_game(bool paused);
1919
1920- UI::Listselect<std::string> m_ls;
1921- UI::EditBox * m_editbox;
1922- UI::Textarea m_name_label, m_mapname, m_gametime_label, m_gametime, m_players_label,
1923- m_win_condition_label, m_win_condition;
1924- UI::Button * m_button_ok;
1925- std::string m_curdir;
1926- std::string m_parentdir;
1927- std::string m_filename;
1928- bool m_overwrite;
1929+ UI::Listselect<std::string> ls_;
1930+ UI::EditBox * editbox_;
1931+ UI::Textarea name_label_, mapname_, gametime_label_, gametime_, players_label_,
1932+ win_condition_label_, win_condition_;
1933+ UI::Button * button_ok_;
1934+ std::string curdir_;
1935+ std::string parentdir_;
1936+ std::string filename_;
1937+ bool overwrite_;
1938 };
1939
1940 #endif // end of include guard: WL_WUI_GAME_MAIN_MENU_SAVE_GAME_H
1941
1942=== modified file 'src/wui/game_message_menu.cc'
1943--- src/wui/game_message_menu.cc 2016-01-18 19:35:25 +0000
1944+++ src/wui/game_message_menu.cc 2016-01-24 20:25:45 +0000
1945@@ -1,5 +1,5 @@
1946 /*
1947- * Copyright (C) 2002-2004, 2006-2013 by the Widelands Development Team
1948+ * Copyright (C) 2002-2016 by the Widelands Development Team
1949 *
1950 * This program is free software; you can redistribute it and/or
1951 * modify it under the terms of the GNU General Public License
1952@@ -79,7 +79,7 @@
1953 list->focus();
1954
1955 // Buttons for message types
1956- m_geologistsbtn =
1957+ geologistsbtn_ =
1958 new UI::Button
1959 (this, "filter_geologists_messages",
1960 kPadding, kPadding, kButtonSize, kButtonSize,
1961@@ -87,10 +87,10 @@
1962 g_gr->images().get("pics/menu_geologist.png"),
1963 "",
1964 true);
1965- m_geologistsbtn->sigclicked.connect
1966+ geologistsbtn_->sigclicked.connect
1967 (boost::bind(&GameMessageMenu::filter_messages, this, Widelands::Message::Type::kGeologists));
1968
1969- m_economybtn =
1970+ economybtn_ =
1971 new UI::Button
1972 (this, "filter_economy_messages",
1973 2 * kPadding + kButtonSize, kPadding, kButtonSize, kButtonSize,
1974@@ -98,10 +98,10 @@
1975 g_gr->images().get("pics/genstats_nrwares.png"),
1976 "",
1977 true);
1978- m_economybtn->sigclicked.connect
1979+ economybtn_->sigclicked.connect
1980 (boost::bind(&GameMessageMenu::filter_messages, this, Widelands::Message::Type::kEconomy));
1981
1982- m_seafaringbtn =
1983+ seafaringbtn_ =
1984 new UI::Button
1985 (this, "filter_seafaring_messages",
1986 3 * kPadding + 2 * kButtonSize, kPadding, kButtonSize, kButtonSize,
1987@@ -109,10 +109,10 @@
1988 g_gr->images().get("pics/start_expedition.png"),
1989 "",
1990 true);
1991- m_seafaringbtn->sigclicked.connect
1992+ seafaringbtn_->sigclicked.connect
1993 (boost::bind(&GameMessageMenu::filter_messages, this, Widelands::Message::Type::kSeafaring));
1994
1995- m_warfarebtn =
1996+ warfarebtn_ =
1997 new UI::Button
1998 (this, "filter_warfare_messages",
1999 4 * kPadding + 3 * kButtonSize, kPadding, kButtonSize, kButtonSize,
2000@@ -120,10 +120,10 @@
2001 g_gr->images().get("pics/messages_warfare.png"),
2002 "",
2003 true);
2004- m_warfarebtn->sigclicked.connect
2005+ warfarebtn_->sigclicked.connect
2006 (boost::bind(&GameMessageMenu::filter_messages, this, Widelands::Message::Type::kWarfare));
2007
2008- m_scenariobtn =
2009+ scenariobtn_ =
2010 new UI::Button
2011 (this, "filter_scenario_messages",
2012 5 * kPadding + 4 * kButtonSize, kPadding, kButtonSize, kButtonSize,
2013@@ -131,14 +131,14 @@
2014 g_gr->images().get("pics/menu_objectives.png"),
2015 "",
2016 true);
2017- m_scenariobtn->sigclicked.connect
2018+ scenariobtn_->sigclicked.connect
2019 (boost::bind(&GameMessageMenu::filter_messages, this, Widelands::Message::Type::kScenario));
2020
2021- m_message_filter = Widelands::Message::Type::kAllMessages;
2022+ message_filter_ = Widelands::Message::Type::kAllMessages;
2023 set_filter_messages_tooltips();
2024 // End: Buttons for message types
2025
2026- m_archivebtn =
2027+ archivebtn_ =
2028 new UI::Button
2029 (this, "archive_or_restore_selected_messages",
2030 kPadding, kWindowHeight - kPadding - kButtonSize, kButtonSize, kButtonSize,
2031@@ -148,26 +148,26 @@
2032 (boost::format(_("Del: %s"))
2033 /** TRANSLATORS: Tooltip in the messages window */
2034 % _("Archive selected message")).str());
2035- m_archivebtn->sigclicked.connect
2036+ archivebtn_->sigclicked.connect
2037 (boost::bind(&GameMessageMenu::archive_or_restore, this));
2038
2039- m_togglemodebtn =
2040+ togglemodebtn_ =
2041 new UI::Button
2042 (this, "toggle_between_inbox_or_archive",
2043- m_archivebtn->get_x() + m_archivebtn->get_w() + kPadding,
2044- m_archivebtn->get_y(),
2045+ archivebtn_->get_x() + archivebtn_->get_w() + kPadding,
2046+ archivebtn_->get_y(),
2047 kButtonSize,
2048 kButtonSize,
2049 g_gr->images().get("pics/but2.png"),
2050 g_gr->images().get("pics/message_archived.png"),
2051 _("Show Archive"));
2052- m_togglemodebtn->sigclicked.connect
2053+ togglemodebtn_->sigclicked.connect
2054 (boost::bind(&GameMessageMenu::toggle_mode, this));
2055
2056- m_centerviewbtn =
2057+ centerviewbtn_ =
2058 new UI::Button
2059 (this, "center_main_mapview_on_location",
2060- kWindowWidth - kPadding - kButtonSize, m_archivebtn->get_y(), kButtonSize, kButtonSize,
2061+ kWindowWidth - kPadding - kButtonSize, archivebtn_->get_y(), kButtonSize, kButtonSize,
2062 g_gr->images().get("pics/but2.png"),
2063 g_gr->images().get("pics/menu_goto.png"),
2064 /** TRANSLATORS: %s is a tooltip, G is the corresponding hotkey */
2065@@ -175,7 +175,7 @@
2066 /** TRANSLATORS: Tooltip in the messages window */
2067 % _("Center main mapview on location")).str(),
2068 false);
2069- m_centerviewbtn->sigclicked.connect(boost::bind(&GameMessageMenu::center_view, this));
2070+ centerviewbtn_->sigclicked.connect(boost::bind(&GameMessageMenu::center_view, this));
2071
2072 if (get_usedefaultpos())
2073 center_to_parent();
2074@@ -298,8 +298,8 @@
2075 // Update messages in the list and remove messages
2076 // that should no longer be shown
2077 for (uint32_t j = list->size(); j; --j) {
2078- MessageId m_id((*list)[j - 1]);
2079- if (Message const * const message = mq[m_id]) {
2080+ MessageId id_((*list)[j - 1]);
2081+ if (Message const * const message = mq[id_]) {
2082 if ((mode == Archive) != (message->status() == Message::Status::kArchived)) {
2083 list->remove(j - 1);
2084 } else {
2085@@ -325,11 +325,11 @@
2086 }
2087
2088 // Filter message type
2089- if (m_message_filter != Message::Type::kAllMessages) {
2090+ if (message_filter_ != Message::Type::kAllMessages) {
2091 for (uint32_t j = list->size(); j; --j) {
2092- MessageId m_id((*list)[j - 1]);
2093- if (Message const * const message = mq[m_id]) {
2094- if (message->message_type_category() != m_message_filter) {
2095+ MessageId id_((*list)[j - 1]);
2096+ if (Message const * const message = mq[id_]) {
2097+ if (message->message_type_category() != message_filter_) {
2098 list->remove(j - 1);
2099 }
2100 }
2101@@ -343,7 +343,7 @@
2102 // be a solution without this extra update().
2103 list->update();
2104 } else {
2105- m_centerviewbtn->set_enabled(false);
2106+ centerviewbtn_->set_enabled(false);
2107 message_body.set_text(std::string());
2108 }
2109 }
2110@@ -376,7 +376,7 @@
2111 (*new Widelands::CmdMessageSetStatusRead
2112 (game.get_gametime(), player.player_number(), id));
2113 }
2114- m_centerviewbtn->set_enabled(message->position());
2115+ centerviewbtn_->set_enabled(message->position());
2116
2117 message_body.set_text(
2118 (boost::format("<rt><p font-size=18 font-weight=bold font-color=D1D1D1>%s<br></p>"
2119@@ -386,7 +386,7 @@
2120 return;
2121 }
2122 }
2123- m_centerviewbtn->set_enabled(false);
2124+ centerviewbtn_->set_enabled(false);
2125 message_body.set_text(std::string());
2126 }
2127
2128@@ -394,7 +394,7 @@
2129 * a message was double clicked
2130 */
2131 void GameMessageMenu::double_clicked(uint32_t const /* t */) {
2132- if (m_centerviewbtn->enabled()) center_view();
2133+ if (centerviewbtn_->enabled()) center_view();
2134 }
2135
2136 /**
2137@@ -406,7 +406,7 @@
2138 switch (code.sym) {
2139 // Don't forget to change the tooltips if any of these get reassigned
2140 case SDLK_g:
2141- if (m_centerviewbtn->enabled())
2142+ if (centerviewbtn_->enabled())
2143 center_view();
2144 return true;
2145 case SDLK_0:
2146@@ -495,19 +495,19 @@
2147 void GameMessageMenu::filter_messages(Widelands::Message::Type const msgtype) {
2148 switch (msgtype) {
2149 case Widelands::Message::Type::kGeologists:
2150- toggle_filter_messages_button(*m_geologistsbtn, msgtype);
2151+ toggle_filter_messages_button(*geologistsbtn_, msgtype);
2152 break;
2153 case Widelands::Message::Type::kEconomy:
2154- toggle_filter_messages_button(*m_economybtn, msgtype);
2155+ toggle_filter_messages_button(*economybtn_, msgtype);
2156 break;
2157 case Widelands::Message::Type::kSeafaring:
2158- toggle_filter_messages_button(*m_seafaringbtn, msgtype);
2159+ toggle_filter_messages_button(*seafaringbtn_, msgtype);
2160 break;
2161 case Widelands::Message::Type::kWarfare:
2162- toggle_filter_messages_button(*m_warfarebtn, msgtype);
2163+ toggle_filter_messages_button(*warfarebtn_, msgtype);
2164 break;
2165 case Widelands::Message::Type::kScenario:
2166- toggle_filter_messages_button(*m_scenariobtn, msgtype);
2167+ toggle_filter_messages_button(*scenariobtn_, msgtype);
2168 break;
2169
2170 case Widelands::Message::Type::kNoMessages:
2171@@ -523,12 +523,12 @@
2172 case Widelands::Message::Type::kWarfareSiteLost:
2173 case Widelands::Message::Type::kWarfareUnderAttack:
2174 set_filter_messages_tooltips();
2175- m_message_filter = Widelands::Message::Type::kAllMessages;
2176- m_geologistsbtn->set_perm_pressed(false);
2177- m_economybtn->set_perm_pressed(false);
2178- m_seafaringbtn->set_perm_pressed(false);
2179- m_warfarebtn->set_perm_pressed(false);
2180- m_scenariobtn->set_perm_pressed(false);
2181+ message_filter_ = Widelands::Message::Type::kAllMessages;
2182+ geologistsbtn_->set_perm_pressed(false);
2183+ economybtn_ ->set_perm_pressed(false);
2184+ seafaringbtn_ ->set_perm_pressed(false);
2185+ warfarebtn_ ->set_perm_pressed(false);
2186+ scenariobtn_ ->set_perm_pressed(false);
2187 break;
2188 }
2189 think();
2190@@ -541,15 +541,15 @@
2191 set_filter_messages_tooltips();
2192 if (button.get_perm_pressed()) {
2193 button.set_perm_pressed(false);
2194- m_message_filter = Widelands::Message::Type::kAllMessages;
2195+ message_filter_ = Widelands::Message::Type::kAllMessages;
2196 } else {
2197- m_geologistsbtn->set_perm_pressed(false);
2198- m_economybtn->set_perm_pressed(false);
2199- m_seafaringbtn->set_perm_pressed(false);
2200- m_warfarebtn->set_perm_pressed(false);
2201- m_scenariobtn->set_perm_pressed(false);
2202+ geologistsbtn_->set_perm_pressed(false);
2203+ economybtn_->set_perm_pressed(false);
2204+ seafaringbtn_->set_perm_pressed(false);
2205+ warfarebtn_->set_perm_pressed(false);
2206+ scenariobtn_->set_perm_pressed(false);
2207 button.set_perm_pressed(true);
2208- m_message_filter = msgtype;
2209+ message_filter_ = msgtype;
2210 /** TRANSLATORS: %1% is a tooltip, %2% is the corresponding hotkey */
2211 button.set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2212 /** TRANSLATORS: Tooltip in the messages window */
2213@@ -562,23 +562,23 @@
2214 * Helper for filter_messages
2215 */
2216 void GameMessageMenu::set_filter_messages_tooltips() {
2217- m_geologistsbtn->set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2218+ geologistsbtn_->set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2219 /** TRANSLATORS: Tooltip in the messages window */
2220 % _("Show geologists' messages only")
2221 % "1").str());
2222- m_economybtn->set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2223+ economybtn_->set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2224 /** TRANSLATORS: Tooltip in the messages window */
2225 % _("Show economy messages only")
2226 % "2").str());
2227- m_seafaringbtn->set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2228+ seafaringbtn_->set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2229 /** TRANSLATORS: Tooltip in the messages window */
2230 % _("Show seafaring messages only")
2231 % "3").str());
2232- m_warfarebtn->set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2233+ warfarebtn_->set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2234 /** TRANSLATORS: Tooltip in the messages window */
2235 % _("Show warfare messages only")
2236 % "4").str());
2237- m_scenariobtn->set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2238+ scenariobtn_->set_tooltip((boost::format(_("%1% (Hotkey: %2%)"))
2239 /** TRANSLATORS: Tooltip in the messages window */
2240 % _("Show scenario messages only")
2241 % "5").str());
2242@@ -626,24 +626,24 @@
2243 case Inbox:
2244 mode = Archive;
2245 set_title(_("Messages: Archive"));
2246- m_archivebtn->set_pic(g_gr->images().get("pics/message_restore.png"));
2247+ archivebtn_->set_pic(g_gr->images().get("pics/message_restore.png"));
2248 /** TRANSLATORS: %s is a tooltip, Del is the corresponding hotkey */
2249- m_archivebtn->set_tooltip((boost::format(_("Del: %s"))
2250+ archivebtn_->set_tooltip((boost::format(_("Del: %s"))
2251 /** TRANSLATORS: Tooltip in the messages window */
2252 % _("Restore selected message")).str());
2253- m_togglemodebtn->set_pic(g_gr->images().get("pics/message_new.png"));
2254- m_togglemodebtn->set_tooltip(_("Show Inbox"));
2255+ togglemodebtn_->set_pic(g_gr->images().get("pics/message_new.png"));
2256+ togglemodebtn_->set_tooltip(_("Show Inbox"));
2257 break;
2258 case Archive:
2259 mode = Inbox;
2260 set_title(_("Messages: Inbox"));
2261- m_archivebtn->set_pic(g_gr->images().get("pics/message_archive.png"));
2262+ archivebtn_->set_pic(g_gr->images().get("pics/message_archive.png"));
2263 /** TRANSLATORS: %s is a tooltip, Del is the corresponding hotkey */
2264- m_archivebtn->set_tooltip((boost::format(_("Del: %s"))
2265+ archivebtn_->set_tooltip((boost::format(_("Del: %s"))
2266 /** TRANSLATORS: Tooltip in the messages window */
2267 % _("Archive selected message")).str());
2268- m_togglemodebtn->set_pic(g_gr->images().get("pics/message_archived.png"));
2269- m_togglemodebtn->set_tooltip(_("Show Archive"));
2270+ togglemodebtn_->set_pic(g_gr->images().get("pics/message_archived.png"));
2271+ togglemodebtn_->set_tooltip(_("Show Archive"));
2272 break;
2273 }
2274 }
2275
2276=== modified file 'src/wui/game_message_menu.h'
2277--- src/wui/game_message_menu.h 2015-09-11 06:24:02 +0000
2278+++ src/wui/game_message_menu.h 2016-01-24 20:25:45 +0000
2279@@ -1,5 +1,5 @@
2280 /*
2281- * Copyright (C) 2002-2004, 2006, 2008-2011 by the Widelands Development Team
2282+ * Copyright (C) 2002-2016 by the Widelands Development Team
2283 *
2284 * This program is free software; you can redistribute it and/or
2285 * modify it under the terms of the GNU General Public License
2286@@ -70,17 +70,17 @@
2287
2288 UI::Table<uintptr_t> * list;
2289 UI::MultilineTextarea message_body;
2290- UI::Button * m_archivebtn;
2291- UI::Button * m_togglemodebtn;
2292- UI::Button * m_centerviewbtn;
2293+ UI::Button * archivebtn_;
2294+ UI::Button * togglemodebtn_;
2295+ UI::Button * centerviewbtn_;
2296 Mode mode;
2297 // Buttons for message types
2298- UI::Button * m_geologistsbtn;
2299- UI::Button * m_economybtn;
2300- UI::Button * m_seafaringbtn;
2301- UI::Button * m_warfarebtn;
2302- UI::Button * m_scenariobtn;
2303- Widelands::Message::Type m_message_filter;
2304+ UI::Button * geologistsbtn_;
2305+ UI::Button * economybtn_;
2306+ UI::Button * seafaringbtn_;
2307+ UI::Button * warfarebtn_;
2308+ UI::Button * scenariobtn_;
2309+ Widelands::Message::Type message_filter_;
2310 };
2311
2312 #endif // end of include guard: WL_WUI_GAME_MESSAGE_MENU_H
2313
2314=== modified file 'src/wui/game_summary.cc'
2315--- src/wui/game_summary.cc 2016-01-17 08:29:59 +0000
2316+++ src/wui/game_summary.cc 2016-01-24 20:25:45 +0000
2317@@ -1,5 +1,5 @@
2318 /*
2319- * Copyright (C) 2007-2008 by the Widelands Development Team
2320+ * Copyright (C) 2007-2016 by the Widelands Development Team
2321 *
2322 * This program is free software; you can redistribute it and/or
2323 * modify it under the terms of the GNU General Public License
2324@@ -41,82 +41,82 @@
2325 GameSummaryScreen::GameSummaryScreen
2326 (InteractiveGameBase * parent, UI::UniqueWindow::Registry * r)
2327 : UI::UniqueWindow(parent, "game_summary", r, 0, 0, _("Game over")),
2328-m_game(parent->game())
2329+game_(parent->game())
2330 {
2331 // Init boxes
2332 UI::Box * vbox = new UI::Box(this, 0, 0, UI::Box::Vertical, 0, 0, PADDING);
2333- m_title_area = new UI::Textarea(vbox, "", UI::Align_HCenter);
2334- vbox->add(m_title_area, UI::Box::AlignCenter);
2335+ title_area_ = new UI::Textarea(vbox, "", UI::Align_HCenter);
2336+ vbox->add(title_area_, UI::Box::AlignCenter);
2337 vbox->add_space(PADDING);
2338
2339 UI::Box * hbox1 = new UI::Box(this, 0, 0, UI::Box::Horizontal);
2340- m_players_table = new UI::Table<uintptr_t const>(hbox1, 0, 0, 0, 0);
2341- m_players_table->fit_height(m_game.player_manager()->get_players_end_status().size());
2342+ players_table_ = new UI::Table<uintptr_t const>(hbox1, 0, 0, 0, 0);
2343+ players_table_->fit_height(game_.player_manager()->get_players_end_status().size());
2344 hbox1->add_space(PADDING);
2345- hbox1->add(m_players_table, UI::Box::AlignTop);
2346+ hbox1->add(players_table_, UI::Box::AlignTop);
2347 hbox1->add_space(PADDING);
2348
2349 UI::Box * info_box = new UI::Box(hbox1, 0, 0, UI::Box::Vertical, 0, 0);
2350- m_info_area_label = new UI::Textarea(info_box, _("Player info:"));
2351- info_box->add(m_info_area_label, UI::Box::AlignLeft);
2352- m_info_area = new UI::MultilineTextarea(
2353+ info_area_label_ = new UI::Textarea(info_box, _("Player info:"));
2354+ info_box->add(info_area_label_, UI::Box::AlignLeft);
2355+ info_area_ = new UI::MultilineTextarea(
2356 info_box, 0, 0, 130,
2357- std::max(130, m_players_table->get_h() - m_info_area_label->get_h() - PADDING),
2358+ std::max(130, players_table_->get_h() - info_area_label_->get_h() - PADDING),
2359 "");
2360- info_box->add(m_info_area, UI::Box::AlignLeft, true);
2361+ info_box->add(info_area_, UI::Box::AlignLeft, true);
2362 info_box->add_space(PADDING);
2363 hbox1->add(info_box, UI::Box::AlignTop);
2364 hbox1->add_space(PADDING);
2365 vbox->add(hbox1, UI::Box::AlignLeft);
2366
2367- UI::Box * bottom_box = new UI::Box(this, 0, 0, UI::Box::Horizontal);
2368-
2369- bottom_box->add_space(PADDING);
2370-
2371- m_gametime_label = new UI::Textarea(bottom_box, _("Elapsed time:"));
2372- bottom_box->add(m_gametime_label, UI::Box::AlignCenter);
2373- bottom_box->add_space(PADDING);
2374- m_gametime_value = new UI::Textarea(bottom_box, gametimestring(m_game.get_gametime()));
2375- bottom_box->add(m_gametime_value, UI::Box::AlignCenter);
2376-
2377- bottom_box->add_inf_space();
2378-
2379- m_continue_button = new UI::Button
2380- (bottom_box, "continue_button",
2381+ UI::Box * bottobox_ = new UI::Box(this, 0, 0, UI::Box::Horizontal);
2382+
2383+ bottobox_->add_space(PADDING);
2384+
2385+ gametime_label_ = new UI::Textarea(bottobox_, _("Elapsed time:"));
2386+ bottobox_->add(gametime_label_, UI::Box::AlignCenter);
2387+ bottobox_->add_space(PADDING);
2388+ gametime_value_ = new UI::Textarea(bottobox_, gametimestring(game_.get_gametime()));
2389+ bottobox_->add(gametime_value_, UI::Box::AlignCenter);
2390+
2391+ bottobox_->add_inf_space();
2392+
2393+ continue_button_ = new UI::Button
2394+ (bottobox_, "continue_button",
2395 0, 0, 35, 35,
2396 g_gr->images().get("pics/but4.png"),
2397 g_gr->images().get("pics/continue.png"),
2398 _("Continue playing"));
2399- bottom_box->add(m_continue_button, UI::Box::AlignCenter);
2400- bottom_box->add_space(PADDING);
2401- m_stop_button = new UI::Button
2402- (bottom_box, "stop_button",
2403+ bottobox_->add(continue_button_, UI::Box::AlignCenter);
2404+ bottobox_->add_space(PADDING);
2405+ stop_button_ = new UI::Button
2406+ (bottobox_, "stop_button",
2407 0, 0, 35, 35,
2408 g_gr->images().get("pics/but4.png"),
2409 g_gr->images().get("pics/menu_exit_game.png"),
2410 _("Exit Game"));
2411- bottom_box->add(m_stop_button, UI::Box::AlignCenter);
2412- bottom_box->add_space(PADDING);
2413+ bottobox_->add(stop_button_, UI::Box::AlignCenter);
2414+ bottobox_->add_space(PADDING);
2415
2416- vbox->add(bottom_box, UI::Box::AlignLeft, true);
2417+ vbox->add(bottobox_, UI::Box::AlignLeft, true);
2418 vbox->add_space(PADDING);
2419 set_center_panel(vbox);
2420
2421 // Prepare table
2422- m_players_table->add_column(150, _("Player"));
2423- m_players_table->add_column(80, _("Team"), "", UI::Align_HCenter);
2424- m_players_table->add_column(100, _("Status"), "", UI::Align_HCenter);
2425- m_players_table->add_column(100, _("Time"));
2426+ players_table_->add_column(150, _("Player"));
2427+ players_table_->add_column(80, _("Team"), "", UI::Align_HCenter);
2428+ players_table_->add_column(100, _("Status"), "", UI::Align_HCenter);
2429+ players_table_->add_column(100, _("Time"));
2430
2431 // Prepare Elements
2432- m_title_area->set_textstyle(UI::TextStyle::ui_big());
2433+ title_area_->set_textstyle(UI::TextStyle::ui_big());
2434
2435 // Connections
2436- m_continue_button->sigclicked.connect
2437+ continue_button_->sigclicked.connect
2438 (boost::bind(&GameSummaryScreen::continue_clicked, this));
2439- m_stop_button->sigclicked.connect
2440+ stop_button_->sigclicked.connect
2441 (boost::bind(&GameSummaryScreen::stop_clicked, this));
2442- m_players_table->selected.connect
2443+ players_table_->selected.connect
2444 (boost::bind(&GameSummaryScreen::player_selected, this, _1));
2445
2446 // Window
2447@@ -140,12 +140,12 @@
2448 void GameSummaryScreen::fill_data()
2449 {
2450 std::vector<Widelands::PlayerEndStatus> players_status
2451- = m_game.player_manager()->get_players_end_status();
2452+ = game_.player_manager()->get_players_end_status();
2453 bool local_in_game = false;
2454 bool local_won = false;
2455 Widelands::Player* single_won = nullptr;
2456- uint8_t team_won = 0;
2457- InteractivePlayer* ipl = m_game.get_ipl();
2458+ uint8_t teawon_ = 0;
2459+ InteractivePlayer* ipl = game_.get_ipl();
2460 //this defines a row to be selected, current player,
2461 //if not then the first line
2462 uint32_t current_player_position = 0;
2463@@ -157,8 +157,8 @@
2464 local_won = pes.result == Widelands::PlayerEndResult::PLAYER_WON;
2465 current_player_position = i;
2466 }
2467- Widelands::Player* p = m_game.get_player(pes.player);
2468- UI::Table<uintptr_t const>::EntryRecord & te = m_players_table->add(i);
2469+ Widelands::Player* p = game_.get_player(pes.player);
2470+ UI::Table<uintptr_t const>::EntryRecord & te = players_table_->add(i);
2471 // Player name & pic
2472 std::string pic_path =
2473 (boost::format("pics/genstats_enable_plr_0%|1$u|.png")
2474@@ -166,10 +166,10 @@
2475 const Image* pic = g_gr->images().get(pic_path);
2476 te.set_picture(0, pic, p->get_name());
2477 // Team
2478- std::string team_str =
2479+ std::string teastr_ =
2480 (boost::format("%|1$u|")
2481 % static_cast<unsigned int>(p->team_number())).str();
2482- te.set_string(1, team_str);
2483+ te.set_string(1, teastr_);
2484 // Status
2485 std::string stat_str;
2486 switch (pes.result) {
2487@@ -183,7 +183,7 @@
2488 if (!single_won) {
2489 single_won = p;
2490 } else {
2491- team_won = p->team_number();
2492+ teawon_ = p->team_number();
2493 }
2494 break;
2495 case Widelands::PlayerEndResult::PLAYER_RESIGNED:
2496@@ -203,24 +203,24 @@
2497
2498 if (local_in_game) {
2499 if (local_won) {
2500- m_title_area->set_text(_("You won!"));
2501+ title_area_->set_text(_("You won!"));
2502 } else {
2503- m_title_area->set_text(_("You lost."));
2504+ title_area_->set_text(_("You lost."));
2505 }
2506 } else {
2507- if (team_won <= 0) {
2508+ if (teawon_ <= 0) {
2509 assert(single_won);
2510- m_title_area->set_text
2511+ title_area_->set_text
2512 ((boost::format(_("%s won!")) % single_won->get_name()).str());
2513 } else {
2514- m_title_area->set_text
2515+ title_area_->set_text
2516 ((boost::format(_("Team %|1$u| won!"))
2517- % static_cast<unsigned int>(team_won)).str());
2518+ % static_cast<unsigned int>(teawon_)).str());
2519 }
2520 }
2521- m_players_table->update();
2522+ players_table_->update();
2523 if (!players_status.empty()) {
2524- m_players_table->select(current_player_position);
2525+ players_table_->select(current_player_position);
2526 }
2527 }
2528
2529@@ -231,17 +231,17 @@
2530
2531 void GameSummaryScreen::stop_clicked()
2532 {
2533- m_game.get_ibase()->end_modal<UI::Panel::Returncodes>(UI::Panel::Returncodes::kBack);
2534+ game_.get_ibase()->end_modal<UI::Panel::Returncodes>(UI::Panel::Returncodes::kBack);
2535 }
2536
2537 void GameSummaryScreen::player_selected(uint32_t entry_index)
2538 {
2539- const uintptr_t selected_player_index = (*m_players_table)[entry_index];
2540+ const uintptr_t selected_player_index = (*players_table_)[entry_index];
2541 const Widelands::PlayerEndStatus& player_status =
2542- m_game.player_manager()->get_players_end_status()[selected_player_index];
2543+ game_.player_manager()->get_players_end_status()[selected_player_index];
2544
2545 std::string info_str = parse_player_info(player_status.info);
2546- m_info_area->set_text(info_str);
2547+ info_area_->set_text(info_str);
2548 layout();
2549 }
2550
2551
2552=== modified file 'src/wui/game_summary.h'
2553--- src/wui/game_summary.h 2015-03-21 14:11:39 +0000
2554+++ src/wui/game_summary.h 2016-01-24 20:25:45 +0000
2555@@ -1,5 +1,5 @@
2556 /*
2557- * Copyright (C) 2007-2008 by the Widelands Development Team
2558+ * Copyright (C) 2007-2016 by the Widelands Development Team
2559 *
2560 * This program is free software; you can redistribute it and/or
2561 * modify it under the terms of the GNU General Public License
2562@@ -47,15 +47,15 @@
2563 void player_selected(uint32_t idx);
2564 std::string parse_player_info(std::string info);
2565
2566- Widelands::Game & m_game;
2567- UI::Textarea * m_title_area;
2568- UI::Textarea * m_gametime_label;
2569- UI::Textarea * m_gametime_value;
2570- UI::Textarea * m_info_area_label;
2571- UI::MultilineTextarea * m_info_area;
2572- UI::Button * m_continue_button;
2573- UI::Button * m_stop_button;
2574- UI::Table<uintptr_t const> * m_players_table;
2575+ Widelands::Game & game_;
2576+ UI::Textarea * title_area_;
2577+ UI::Textarea * gametime_label_;
2578+ UI::Textarea * gametime_value_;
2579+ UI::Textarea * info_area_label_;
2580+ UI::MultilineTextarea * info_area_;
2581+ UI::Button * continue_button_;
2582+ UI::Button * stop_button_;
2583+ UI::Table<uintptr_t const> * players_table_;
2584 };
2585
2586 #endif // end of include guard: WL_WUI_GAME_SUMMARY_H
2587
2588=== modified file 'src/wui/game_tips.cc'
2589--- src/wui/game_tips.cc 2014-11-27 12:02:08 +0000
2590+++ src/wui/game_tips.cc 2016-01-24 20:25:45 +0000
2591@@ -1,5 +1,5 @@
2592 /*
2593- * Copyright (C) 2007-2008, 2010 by the Widelands Development Team
2594+ * Copyright (C) 2007-2016 by the Widelands Development Team
2595 *
2596 * This program is free software; you can redistribute it and/or
2597 * modify it under the terms of the GNU General Public License
2598@@ -33,11 +33,11 @@
2599 GameTips::GameTips
2600 (UI::ProgressWindow & progressWindow, const std::vector<std::string>& names)
2601 :
2602-m_lastUpdated (0),
2603-m_updateAfter (0),
2604-m_progressWindow(progressWindow),
2605-m_registered (false),
2606-m_lastTip (0)
2607+lastUpdated_ (0),
2608+updateAfter_ (0),
2609+progressWindow_(progressWindow),
2610+registered_ (false),
2611+lastTip_ (0)
2612 {
2613 // Loading texts-locals, for translating the tips
2614 i18n::Textdomain textdomain("texts");
2615@@ -45,11 +45,11 @@
2616 for (uint8_t i = 0; i < names.size(); ++i)
2617 load_tips(names[i]);
2618
2619- if (!m_tips.empty()) {
2620+ if (!tips_.empty()) {
2621 // add visualization only if any tips are loaded
2622- m_progressWindow.add_visualization(this);
2623- m_registered = true;
2624- m_lastTip = m_tips.size();
2625+ progressWindow_.add_visualization(this);
2626+ registered_ = true;
2627+ lastTip_ = tips_.size();
2628 }
2629 }
2630
2631@@ -71,7 +71,7 @@
2632 Tip tip;
2633 tip.text = text;
2634 tip.interval = s->get_int("sec", DEFAULT_INTERVAL);
2635- m_tips.push_back (tip);
2636+ tips_.push_back (tip);
2637 }
2638 } catch (std::exception &) {
2639 // just ignore - tips do not impact game
2640@@ -81,24 +81,24 @@
2641
2642 void GameTips::update(bool repaint) {
2643 uint8_t ticks = SDL_GetTicks();
2644- if (ticks >= (m_lastUpdated + m_updateAfter)) {
2645- const uint32_t next = rand() % m_tips.size();
2646- if (next == m_lastTip)
2647- m_lastTip = (next + 1) % m_tips.size();
2648+ if (ticks >= (lastUpdated_ + updateAfter_)) {
2649+ const uint32_t next = rand() % tips_.size();
2650+ if (next == lastTip_)
2651+ lastTip_ = (next + 1) % tips_.size();
2652 else
2653- m_lastTip = next;
2654+ lastTip_ = next;
2655 show_tip(next);
2656- m_lastUpdated = SDL_GetTicks();
2657- m_updateAfter = m_tips[next].interval * 1000;
2658+ lastUpdated_ = SDL_GetTicks();
2659+ updateAfter_ = tips_[next].interval * 1000;
2660 } else if (repaint) {
2661- show_tip(m_lastTip);
2662+ show_tip(lastTip_);
2663 }
2664 }
2665
2666 void GameTips::stop() {
2667- if (m_registered) {
2668- m_progressWindow.remove_visualization(this);
2669- m_registered = false;
2670+ if (registered_) {
2671+ progressWindow_.remove_visualization(this);
2672+ registered_ = false;
2673 }
2674 }
2675
2676@@ -117,7 +117,7 @@
2677 rt.blit(pt, pic_background);
2678
2679 Point center(tips_area.x + tips_area.w / 2, tips_area.y + tips_area.h / 2);
2680- const Image* rendered_text = UI::g_fh1->render(as_game_tip(m_tips[index].text), tips_area.w);
2681+ const Image* rendered_text = UI::g_fh1->render(as_game_tip(tips_[index].text), tips_area.w);
2682 rt.blit(center - Point(rendered_text->width() / 2, rendered_text->height() / 2), rendered_text);
2683
2684 g_gr->update();
2685
2686=== modified file 'src/wui/game_tips.h'
2687--- src/wui/game_tips.h 2014-07-26 10:43:23 +0000
2688+++ src/wui/game_tips.h 2016-01-24 20:25:45 +0000
2689@@ -1,5 +1,5 @@
2690 /*
2691- * Copyright (C) 2007-2008 by the Widelands Development Team
2692+ * Copyright (C) 2007-2016 by the Widelands Development Team
2693 *
2694 * This program is free software; you can redistribute it and/or
2695 * modify it under the terms of the GNU General Public License
2696@@ -43,13 +43,13 @@
2697 void load_tips(std::string);
2698 void show_tip(int32_t index);
2699
2700- uint32_t m_lastUpdated;
2701- uint32_t m_updateAfter;
2702- UI::ProgressWindow & m_progressWindow;
2703- bool m_registered;
2704- uint32_t m_lastTip;
2705+ uint32_t lastUpdated_;
2706+ uint32_t updateAfter_;
2707+ UI::ProgressWindow & progressWindow_;
2708+ bool registered_;
2709+ uint32_t lastTip_;
2710
2711- std::vector<Tip> m_tips;
2712+ std::vector<Tip> tips_;
2713 };
2714
2715 #endif // end of include guard: WL_WUI_GAME_TIPS_H
2716
2717=== modified file 'src/wui/gamechatpanel.cc'
2718--- src/wui/gamechatpanel.cc 2014-09-20 09:37:47 +0000
2719+++ src/wui/gamechatpanel.cc 2016-01-24 20:25:45 +0000
2720@@ -33,7 +33,7 @@
2721 ChatProvider & chat)
2722 :
2723 UI::Panel(parent, x, y, w, h),
2724- m_chat (chat),
2725+ chat_ (chat),
2726 chatbox (this, 0, 0, w, h - 25, "", UI::Align_Left, 1),
2727 editbox (this, 0, h - 20, w, 20),
2728 chat_message_counter(std::numeric_limits<uint32_t>::max())
2729@@ -57,7 +57,7 @@
2730 */
2731 void GameChatPanel::recalculate()
2732 {
2733- const std::vector<ChatMessage> msgs = m_chat.get_messages();
2734+ const std::vector<ChatMessage> msgs = chat_.get_messages();
2735
2736 std::string str = "<rt>";
2737 for (uint32_t i = 0; i < msgs.size(); ++i) {
2738@@ -75,7 +75,7 @@
2739 // Note: if many messages arrive simultaneously,
2740 // the latest is a system message and some others
2741 // are not, then this act wrong!
2742- if (!msgs.back().sender.empty() && !m_chat.sound_off())
2743+ if (!msgs.back().sender.empty() && !chat_.sound_off())
2744 {
2745 // The latest message is not a system message
2746 if (std::string::npos == msgs.back().sender.find("(IRC)") && chat_message_counter < msgs.size())
2747@@ -104,7 +104,7 @@
2748 const std::string & str = editbox.text();
2749
2750 if (str.size())
2751- m_chat.send(str);
2752+ chat_.send(str);
2753
2754 editbox.set_text("");
2755 sent();
2756
2757=== modified file 'src/wui/gamechatpanel.h'
2758--- src/wui/gamechatpanel.h 2014-09-20 09:37:47 +0000
2759+++ src/wui/gamechatpanel.h 2016-01-24 20:25:45 +0000
2760@@ -1,5 +1,5 @@
2761 /*
2762- * Copyright (C) 2008-2011 by the Widelands Development Team
2763+ * Copyright (C) 2008-2016 by the Widelands Development Team
2764 *
2765 * This program is free software; you can redistribute it and/or
2766 * modify it under the terms of the GNU General Public License
2767@@ -54,7 +54,7 @@
2768 void key_enter();
2769 void key_escape();
2770
2771- ChatProvider & m_chat;
2772+ ChatProvider & chat_;
2773 UI::MultilineTextarea chatbox;
2774 UI::EditBox editbox;
2775 uint32_t chat_message_counter;
2776
2777=== modified file 'src/wui/general_statistics_menu.cc'
2778--- src/wui/general_statistics_menu.cc 2015-11-28 22:29:26 +0000
2779+++ src/wui/general_statistics_menu.cc 2016-01-24 20:25:45 +0000
2780@@ -1,5 +1,5 @@
2781 /*
2782- * Copyright (C) 2002-2004, 2006-2011 by the Widelands Development Team
2783+ * Copyright (C) 2002-2016 by the Widelands Development Team
2784 *
2785 * This program is free software; you can redistribute it and/or
2786 * modify it under the terms of the GNU General Public License
2787@@ -52,21 +52,21 @@
2788 UI::UniqueWindow
2789 (&parent, "statistics_menu", &registry,
2790 440, 400, _("General Statistics")),
2791-m_my_registry (&registry),
2792-m_box (this, 0, 0, UI::Box::Vertical, 0, 0, 5),
2793-m_plot (&m_box, 0, 0, 430, PLOT_HEIGHT),
2794-m_selected_information(0)
2795+ my_registry_ (&registry),
2796+ box_ (this, 0, 0, UI::Box::Vertical, 0, 0, 5),
2797+ plot_ (&box_, 0, 0, 430, PLOT_HEIGHT),
2798+ selected_information_(0)
2799 {
2800- assert (m_my_registry);
2801-
2802- m_selected_information = m_my_registry->selected_information;
2803-
2804- set_center_panel(&m_box);
2805- m_box.set_border(5, 5, 5, 5);
2806+ assert (my_registry_);
2807+
2808+ selected_information_ = my_registry_->selected_information;
2809+
2810+ set_center_panel(&box_);
2811+ box_.set_border(5, 5, 5, 5);
2812
2813 // Setup plot data
2814- m_plot.set_sample_rate(STATISTICS_SAMPLE_TIME);
2815- m_plot.set_plotmode(WuiPlotArea::PLOTMODE_ABSOLUTE);
2816+ plot_.set_sample_rate(STATISTICS_SAMPLE_TIME);
2817+ plot_.set_plotmode(WuiPlotArea::PLOTMODE_ABSOLUTE);
2818 Game & game = *parent.get_game();
2819 const Game::GeneralStatsVector & genstats =
2820 game.get_general_statistics();
2821@@ -74,14 +74,14 @@
2822 general_statistics_size = genstats.size();
2823
2824 // Is there a hook dataset?
2825- m_ndatasets = NR_BASE_DATASETS;
2826+ ndatasets_ = NR_BASE_DATASETS;
2827 std::unique_ptr<LuaTable> hook = game.lua().get_hook("custom_statistic");
2828 std::string cs_name, cs_pic;
2829 if (hook) {
2830 hook->do_not_warn_about_unaccessed_keys();
2831 cs_name = hook->get_string("name");
2832 cs_pic = hook->get_string("pic");
2833- m_ndatasets++;
2834+ ndatasets_++;
2835 }
2836
2837 for
2838@@ -90,56 +90,56 @@
2839 ++i)
2840 {
2841 const RGBColor & color = Player::Colors[i];
2842- m_plot.register_plot_data
2843- (i * m_ndatasets + 0, &genstats[i].land_size,
2844- color);
2845- m_plot.register_plot_data
2846- (i * m_ndatasets + 1, &genstats[i].nr_workers,
2847- color);
2848- m_plot.register_plot_data
2849- (i * m_ndatasets + 2, &genstats[i].nr_buildings,
2850- color);
2851- m_plot.register_plot_data
2852- (i * m_ndatasets + 3, &genstats[i].nr_wares,
2853- color);
2854- m_plot.register_plot_data
2855- (i * m_ndatasets + 4, &genstats[i].productivity,
2856- color);
2857- m_plot.register_plot_data
2858- (i * m_ndatasets + 5, &genstats[i].nr_casualties,
2859- color);
2860- m_plot.register_plot_data
2861- (i * m_ndatasets + 6, &genstats[i].nr_kills,
2862- color);
2863- m_plot.register_plot_data
2864- (i * m_ndatasets + 7, &genstats[i].nr_msites_lost,
2865- color);
2866- m_plot.register_plot_data
2867- (i * m_ndatasets + 8, &genstats[i].nr_msites_defeated,
2868- color);
2869- m_plot.register_plot_data
2870- (i * m_ndatasets + 9, &genstats[i].nr_civil_blds_lost,
2871- color);
2872- m_plot.register_plot_data
2873- (i * m_ndatasets + 10, &genstats[i].miltary_strength,
2874+ plot_.register_plot_data
2875+ (i * ndatasets_ + 0, &genstats[i].land_size,
2876+ color);
2877+ plot_.register_plot_data
2878+ (i * ndatasets_ + 1, &genstats[i].nr_workers,
2879+ color);
2880+ plot_.register_plot_data
2881+ (i * ndatasets_ + 2, &genstats[i].nr_buildings,
2882+ color);
2883+ plot_.register_plot_data
2884+ (i * ndatasets_ + 3, &genstats[i].nr_wares,
2885+ color);
2886+ plot_.register_plot_data
2887+ (i * ndatasets_ + 4, &genstats[i].productivity,
2888+ color);
2889+ plot_.register_plot_data
2890+ (i * ndatasets_ + 5, &genstats[i].nr_casualties,
2891+ color);
2892+ plot_.register_plot_data
2893+ (i * ndatasets_ + 6, &genstats[i].nr_kills,
2894+ color);
2895+ plot_.register_plot_data
2896+ (i * ndatasets_ + 7, &genstats[i].nr_msites_lost,
2897+ color);
2898+ plot_.register_plot_data
2899+ (i * ndatasets_ + 8, &genstats[i].nr_msites_defeated,
2900+ color);
2901+ plot_.register_plot_data
2902+ (i * ndatasets_ + 9, &genstats[i].nr_civil_blds_lost,
2903+ color);
2904+ plot_.register_plot_data
2905+ (i * ndatasets_ + 10, &genstats[i].miltary_strength,
2906 color);
2907 if (hook) {
2908- m_plot.register_plot_data
2909- (i * m_ndatasets + 11, &genstats[i].custom_statistic,
2910+ plot_.register_plot_data
2911+ (i * ndatasets_ + 11, &genstats[i].custom_statistic,
2912 color);
2913 }
2914 if (game.get_player(i + 1)) // Show area plot
2915- m_plot.show_plot
2916- (i * m_ndatasets + m_selected_information,
2917- m_my_registry->selected_players[i]);
2918+ plot_.show_plot
2919+ (i * ndatasets_ + selected_information_,
2920+ my_registry_->selected_players[i]);
2921 }
2922
2923- m_plot.set_time(m_my_registry->time);
2924+ plot_.set_time(my_registry_->time);
2925
2926 // Setup Widgets
2927- m_box.add(&m_plot, UI::Box::AlignTop);
2928+ box_.add(&plot_, UI::Box::AlignTop);
2929
2930- UI::Box * hbox1 = new UI::Box(&m_box, 0, 0, UI::Box::Horizontal, 0, 0, 1);
2931+ UI::Box * hbox1 = new UI::Box(&box_, 0, 0, UI::Box::Horizontal, 0, 0, 1);
2932
2933 uint32_t plr_in_game = 0;
2934 PlayerNumber const nr_players = game.map().get_nrplayers();
2935@@ -157,21 +157,21 @@
2936 player->get_name().c_str());
2937 cb.sigclicked.connect
2938 (boost::bind(&GeneralStatisticsMenu::cb_changed_to, this, p));
2939- cb.set_perm_pressed(m_my_registry->selected_players[p - 1]);
2940+ cb.set_perm_pressed(my_registry_->selected_players[p - 1]);
2941
2942- m_cbs[p - 1] = &cb;
2943+ cbs_[p - 1] = &cb;
2944
2945 hbox1->add(&cb, UI::Box::AlignLeft, false, true);
2946 } else // player nr p does not exist
2947- m_cbs[p - 1] = nullptr;
2948-
2949- m_box.add(hbox1, UI::Box::AlignTop, true);
2950-
2951- UI::Box * hbox2 = new UI::Box(&m_box, 0, 0, UI::Box::Horizontal, 0, 0, 1);
2952+ cbs_[p - 1] = nullptr;
2953+
2954+ box_.add(hbox1, UI::Box::AlignTop, true);
2955+
2956+ UI::Box * hbox2 = new UI::Box(&box_, 0, 0, UI::Box::Horizontal, 0, 0, 1);
2957
2958 UI::Radiobutton * btn;
2959
2960- m_radiogroup.add_button
2961+ radiogroup_.add_button
2962 (hbox2,
2963 Point(0, 0),
2964 g_gr->images().get("pics/genstats_landsize.png"),
2965@@ -179,7 +179,7 @@
2966 &btn);
2967 hbox2->add(btn, UI::Box::AlignLeft, false, true);
2968
2969- m_radiogroup.add_button
2970+ radiogroup_.add_button
2971 (hbox2,
2972 Point(0, 0),
2973 g_gr->images().get("pics/genstats_nrworkers.png"),
2974@@ -187,7 +187,7 @@
2975 &btn);
2976 hbox2->add(btn, UI::Box::AlignLeft, false, true);
2977
2978- m_radiogroup.add_button
2979+ radiogroup_.add_button
2980 (hbox2,
2981 Point(0, 0),
2982 g_gr->images().get("pics/genstats_nrbuildings.png"),
2983@@ -195,7 +195,7 @@
2984 &btn);
2985 hbox2->add(btn, UI::Box::AlignLeft, false, true);
2986
2987- m_radiogroup.add_button
2988+ radiogroup_.add_button
2989 (hbox2,
2990 Point(0, 0),
2991 g_gr->images().get("pics/genstats_nrwares.png"),
2992@@ -203,7 +203,7 @@
2993 &btn);
2994 hbox2->add(btn, UI::Box::AlignLeft, false, true);
2995
2996- m_radiogroup.add_button
2997+ radiogroup_.add_button
2998 (hbox2,
2999 Point(0, 0),
3000 g_gr->images().get("pics/genstats_productivity.png"),
3001@@ -211,7 +211,7 @@
3002 &btn);
3003 hbox2->add(btn, UI::Box::AlignLeft, false, true);
3004
3005- m_radiogroup.add_button
3006+ radiogroup_.add_button
3007 (hbox2,
3008 Point(0, 0),
3009 g_gr->images().get("pics/genstats_casualties.png"),
3010@@ -219,7 +219,7 @@
3011 &btn);
3012 hbox2->add(btn, UI::Box::AlignLeft, false, true);
3013
3014- m_radiogroup.add_button
3015+ radiogroup_.add_button
3016 (hbox2,
3017 Point(0, 0),
3018 g_gr->images().get("pics/genstats_kills.png"),
3019@@ -227,7 +227,7 @@
3020 &btn);
3021 hbox2->add(btn, UI::Box::AlignLeft, false, true);
3022
3023- m_radiogroup.add_button
3024+ radiogroup_.add_button
3025 (hbox2,
3026 Point(0, 0),
3027 g_gr->images().get("pics/genstats_msites_lost.png"),
3028@@ -235,7 +235,7 @@
3029 &btn);
3030 hbox2->add(btn, UI::Box::AlignLeft, false, true);
3031
3032- m_radiogroup.add_button
3033+ radiogroup_.add_button
3034 (hbox2,
3035 Point(0, 0),
3036 g_gr->images().get("pics/genstats_msites_defeated.png"),
3037@@ -243,7 +243,7 @@
3038 &btn);
3039 hbox2->add(btn, UI::Box::AlignLeft, false, true);
3040
3041- m_radiogroup.add_button
3042+ radiogroup_.add_button
3043 (hbox2,
3044 Point(0, 0),
3045 g_gr->images().get("pics/genstats_civil_blds_lost.png"),
3046@@ -251,7 +251,7 @@
3047 &btn);
3048 hbox2->add(btn, UI::Box::AlignLeft, false, true);
3049
3050- m_radiogroup.add_button
3051+ radiogroup_.add_button
3052 (hbox2,
3053 Point(0, 0),
3054 g_gr->images().get("pics/genstats_militarystrength.png"),
3055@@ -260,7 +260,7 @@
3056 hbox2->add(btn, UI::Box::AlignLeft, false, true);
3057
3058 if (hook) {
3059- m_radiogroup.add_button
3060+ radiogroup_.add_button
3061 (hbox2,
3062 Point(0, 0),
3063 g_gr->images().get(cs_pic),
3064@@ -269,15 +269,15 @@
3065 hbox2->add(btn, UI::Box::AlignLeft, false, true);
3066 }
3067
3068- m_radiogroup.set_state(m_selected_information);
3069- m_radiogroup.changedto.connect
3070+ radiogroup_.set_state(selected_information_);
3071+ radiogroup_.changedto.connect
3072 (boost::bind(&GeneralStatisticsMenu::radiogroup_changed, this, _1));
3073
3074- m_box.add(hbox2, UI::Box::AlignTop, true);
3075+ box_.add(hbox2, UI::Box::AlignTop, true);
3076
3077- m_box.add
3078+ box_.add
3079 (new WuiPlotAreaSlider
3080- (&m_box, m_plot, 0, 0, 100, 45,
3081+ (&box_, plot_, 0, 0, 100, 45,
3082 g_gr->images().get("pics/but1.png"))
3083 , UI::Box::AlignTop
3084 , true);
3085@@ -288,11 +288,11 @@
3086 Game & game = dynamic_cast<InteractiveGameBase&>(*get_parent()).game();
3087 if (game.is_loaded()) {
3088 // Save informations for recreation, if window is reopened
3089- m_my_registry->selected_information = m_selected_information;
3090- m_my_registry->time = m_plot.get_time();
3091+ my_registry_->selected_information = selected_information_;
3092+ my_registry_->time = plot_.get_time();
3093 PlayerNumber const nr_players = game.map().get_nrplayers();
3094 iterate_players_existing_novar(p, nr_players, game) {
3095- m_my_registry->selected_players[p - 1] = m_cbs[p - 1]->get_perm_pressed();
3096+ my_registry_->selected_players[p - 1] = cbs_[p - 1]->get_perm_pressed();
3097 }
3098 }
3099 }
3100@@ -310,11 +310,11 @@
3101 void GeneralStatisticsMenu::cb_changed_to(int32_t const id)
3102 {
3103 // This represents our player number
3104- m_cbs[id - 1]->set_perm_pressed(!m_cbs[id - 1]->get_perm_pressed());
3105+ cbs_[id - 1]->set_perm_pressed(!cbs_[id - 1]->get_perm_pressed());
3106
3107- m_plot.show_plot
3108- ((id - 1) * m_ndatasets + m_selected_information,
3109- m_cbs[id - 1]->get_perm_pressed());
3110+ plot_.show_plot
3111+ ((id - 1) * ndatasets_ + selected_information_,
3112+ cbs_[id - 1]->get_perm_pressed());
3113 }
3114
3115 /*
3116@@ -325,11 +325,11 @@
3117 dynamic_cast<InteractiveGameBase&>(*get_parent()).game()
3118 .get_general_statistics().size();
3119 for (uint32_t i = 0; i < statistics_size; ++i)
3120- if (m_cbs[i]) {
3121- m_plot.show_plot
3122- (i * m_ndatasets + id, m_cbs[i]->get_perm_pressed());
3123- m_plot.show_plot
3124- (i * m_ndatasets + m_selected_information, false);
3125+ if (cbs_[i]) {
3126+ plot_.show_plot
3127+ (i * ndatasets_ + id, cbs_[i]->get_perm_pressed());
3128+ plot_.show_plot
3129+ (i * ndatasets_ + selected_information_, false);
3130 }
3131- m_selected_information = id;
3132+ selected_information_ = id;
3133 }
3134
3135=== modified file 'src/wui/general_statistics_menu.h'
3136--- src/wui/general_statistics_menu.h 2014-09-10 13:03:40 +0000
3137+++ src/wui/general_statistics_menu.h 2016-01-24 20:25:45 +0000
3138@@ -1,5 +1,5 @@
3139 /*
3140- * Copyright (C) 2002-2004, 2006-2013 by the Widelands Development Team
3141+ * Copyright (C) 2002-2016 by the Widelands Development Team
3142 *
3143 * This program is free software; you can redistribute it and/or
3144 * modify it under the terms of the GNU General Public License
3145@@ -53,13 +53,13 @@
3146 virtual ~GeneralStatisticsMenu();
3147
3148 private:
3149- Registry * m_my_registry;
3150- UI::Box m_box;
3151- WuiPlotArea m_plot;
3152- UI::Radiogroup m_radiogroup;
3153- int32_t m_selected_information;
3154- UI::Button * m_cbs[MAX_PLAYERS];
3155- uint32_t m_ndatasets;
3156+ Registry * my_registry_;
3157+ UI::Box box_;
3158+ WuiPlotArea plot_;
3159+ UI::Radiogroup radiogroup_;
3160+ int32_t selected_information_;
3161+ UI::Button * cbs_[MAX_PLAYERS];
3162+ uint32_t ndatasets_;
3163
3164 void clicked_help();
3165 void cb_changed_to(int32_t);
3166
3167=== modified file 'src/wui/interactive_gamebase.cc'
3168--- src/wui/interactive_gamebase.cc 2016-01-16 15:57:31 +0000
3169+++ src/wui/interactive_gamebase.cc 2016-01-24 20:25:45 +0000
3170@@ -1,5 +1,5 @@
3171 /*
3172- * Copyright (C) 2007-2011 by the Widelands Development Team
3173+ * Copyright (C) 2007-2016 by the Widelands Development Team
3174 *
3175 * This program is free software; you can redistribute it and/or
3176 * modify it under the terms of the GNU General Public License
3177@@ -52,25 +52,25 @@
3178 :
3179 InteractiveBase(_game, global_s),
3180 chat_provider_(nullptr),
3181- m_building_census_format
3182+ building_census_format_
3183 (global_s.get_string("building_census_format", "%N")),
3184- m_building_statistics_format
3185+ building_statistics_format_
3186 (global_s.get_string("building_statistics_format", "%t")),
3187- m_building_tooltip_format
3188+ building_tooltip_format_
3189 (global_s.get_string("building_tooltip_format", "%r")),
3190- m_chatenabled(chatenabled),
3191- m_multiplayer(multiplayer),
3192- m_playertype(pt),
3193+ chatenabled_(chatenabled),
3194+ multiplayer_(multiplayer),
3195+ playertype_(pt),
3196
3197 #define INIT_BTN(picture, name, tooltip) \
3198 TOOLBAR_BUTTON_COMMON_PARAMETERS(name), \
3199 g_gr->images().get("pics/" picture ".png"), \
3200 tooltip \
3201
3202- m_toggle_buildhelp
3203+ toggle_buildhelp_
3204 (INIT_BTN("menu_toggle_buildhelp", "buildhelp", _("Show Building Spaces (on/off)")))
3205 {
3206- m_toggle_buildhelp.sigclicked.connect(boost::bind(&InteractiveGameBase::toggle_buildhelp, this));
3207+ toggle_buildhelp_.sigclicked.connect(boost::bind(&InteractiveGameBase::toggle_buildhelp, this));
3208 }
3209
3210 /// \return a pointer to the running \ref Game instance.
3211@@ -90,7 +90,7 @@
3212 chat_provider_ = &chat;
3213 chat_overlay_->set_chat_provider(chat);
3214
3215- m_chatenabled = true;
3216+ chatenabled_ = true;
3217 }
3218
3219 ChatProvider * InteractiveGameBase::get_chat_provider()
3220@@ -137,7 +137,7 @@
3221 Widelands::Map & map = egbase().map();
3222 auto* overlay_manager = mutable_field_overlay_manager();
3223 show_buildhelp(false);
3224- m_toggle_buildhelp.set_perm_pressed(buildhelp());
3225+ toggle_buildhelp_.set_perm_pressed(buildhelp());
3226
3227 overlay_manager->register_overlay_callback_function
3228 (boost::bind(&InteractiveGameBase::calculate_buildcaps, this, _1));
3229@@ -147,14 +147,14 @@
3230 map.recalc_whole_map(egbase().world());
3231
3232 // Close game-relevant UI windows (but keep main menu open)
3233- delete m_fieldaction.window;
3234- m_fieldaction.window = nullptr;
3235+ delete fieldaction_.window;
3236+ fieldaction_.window = nullptr;
3237
3238 hide_minimap();
3239 }
3240
3241 void InteractiveGameBase::on_buildhelp_changed(const bool value) {
3242- m_toggle_buildhelp.set_perm_pressed(value);
3243+ toggle_buildhelp_.set_perm_pressed(value);
3244 }
3245
3246 /**
3247@@ -188,10 +188,10 @@
3248 void InteractiveGameBase::show_game_summary()
3249 {
3250 game().game_controller()->set_desired_speed(0);
3251- if (m_game_summary.window) {
3252- m_game_summary.window->set_visible(true);
3253- m_game_summary.window->think();
3254+ if (game_summary_.window) {
3255+ game_summary_.window->set_visible(true);
3256+ game_summary_.window->think();
3257 return;
3258 }
3259- new GameSummaryScreen(this, &m_game_summary);
3260+ new GameSummaryScreen(this, &game_summary_);
3261 }
3262
3263=== modified file 'src/wui/interactive_gamebase.h'
3264--- src/wui/interactive_gamebase.h 2016-01-16 15:57:31 +0000
3265+++ src/wui/interactive_gamebase.h 2016-01-24 20:25:45 +0000
3266@@ -1,5 +1,5 @@
3267 /*
3268- * Copyright (C) 2002-2003, 2006-2013 by the Widelands Development Team
3269+ * Copyright (C) 2002-2016 by the Widelands Development Team
3270 *
3271 * This program is free software; you can redistribute it and/or
3272 * modify it under the terms of the GNU General Public License
3273@@ -62,13 +62,13 @@
3274
3275 // TODO(sirver): Remove the use of these methods as the strings are no longer configurable.
3276 const std::string & building_census_format () const {
3277- return m_building_census_format;
3278+ return building_census_format_;
3279 }
3280 const std::string & building_statistics_format () const {
3281- return m_building_statistics_format;
3282+ return building_statistics_format_;
3283 }
3284 const std::string & building_tooltip_format () const {
3285- return m_building_tooltip_format;
3286+ return building_tooltip_format_;
3287 }
3288
3289 virtual bool can_see(Widelands::PlayerNumber) const = 0;
3290@@ -76,11 +76,11 @@
3291 virtual Widelands::PlayerNumber player_number() const = 0;
3292
3293 virtual void node_action() = 0;
3294- const PlayerType & get_playertype()const {return m_playertype;}
3295- void set_playertype(const PlayerType & pt) {m_playertype = pt;}
3296+ const PlayerType & get_playertype()const {return playertype_;}
3297+ void set_playertype(const PlayerType & pt) {playertype_ = pt;}
3298
3299 bool try_show_ship_window();
3300- bool is_multiplayer() {return m_multiplayer;}
3301+ bool is_multiplayer() {return multiplayer_;}
3302
3303 void show_game_summary();
3304 void postload() override;
3305@@ -90,18 +90,18 @@
3306 void draw_overlay(RenderTarget &) override;
3307 virtual int32_t calculate_buildcaps(const Widelands::TCoords<Widelands::FCoords> c) = 0;
3308
3309- GameMainMenuWindows m_mainm_windows;
3310+ GameMainMenuWindows main_windows_;
3311 ChatProvider * chat_provider_;
3312- std::string m_building_census_format;
3313- std::string m_building_statistics_format;
3314- std::string m_building_tooltip_format;
3315- bool m_chatenabled;
3316- bool m_multiplayer;
3317- PlayerType m_playertype;
3318- UI::UniqueWindow::Registry m_fieldaction;
3319- UI::UniqueWindow::Registry m_game_summary;
3320+ std::string building_census_format_;
3321+ std::string building_statistics_format_;
3322+ std::string building_tooltip_format_;
3323+ bool chatenabled_;
3324+ bool multiplayer_;
3325+ PlayerType playertype_;
3326+ UI::UniqueWindow::Registry fieldaction_;
3327+ UI::UniqueWindow::Registry game_summary_;
3328
3329- UI::Button m_toggle_buildhelp;
3330+ UI::Button toggle_buildhelp_;
3331
3332 private:
3333 void on_buildhelp_changed(const bool value) override;
3334
3335=== modified file 'src/wui/interactive_player.cc'
3336--- src/wui/interactive_player.cc 2016-01-16 15:57:31 +0000
3337+++ src/wui/interactive_player.cc 2016-01-24 20:25:45 +0000
3338@@ -1,5 +1,5 @@
3339 /*
3340- * Copyright (C) 2002-2004, 2006-2011 by the Widelands Development Team
3341+ * Copyright (C) 2002-2016 by the Widelands Development Team
3342 *
3343 * This program is free software; you can redistribute it and/or
3344 * modify it under the terms of the GNU General Public License
3345@@ -66,8 +66,8 @@
3346 bool const multiplayer)
3347 :
3348 InteractiveGameBase (_game, global_s, NONE, multiplayer, multiplayer),
3349- m_auto_roadbuild_mode(global_s.get_bool("auto_roadbuild_mode", true)),
3350- m_flag_to_connect(Widelands::Coords::null()),
3351+ auto_roadbuild_mode_(global_s.get_bool("auto_roadbuild_mode", true)),
3352+ flag_to_connect_(Widelands::Coords::null()),
3353
3354 // Chat is different, as chat_provider_ needs to be checked when toggling
3355 // Minimap is different as it warps and stuff
3356@@ -84,59 +84,59 @@
3357 tooltip \
3358
3359
3360-m_toggle_chat
3361+toggle_chat_
3362 (INIT_BTN_this
3363 ("menu_chat", "chat", _("Chat"))),
3364-m_toggle_options_menu
3365+toggle_options_menu_
3366 (INIT_BTN
3367 ("menu_options_menu", "options_menu", _("Options"))),
3368-m_toggle_statistics_menu
3369+toggle_statistics_menu_
3370 (INIT_BTN
3371 ("menu_toggle_menu", "statistics_menu", _("Statistics"))),
3372-m_toggle_objectives
3373+toggle_objectives_
3374 (INIT_BTN
3375 ("menu_objectives", "objectives", _("Objectives"))),
3376-m_toggle_minimap
3377+toggle_minimap_
3378 (INIT_BTN_this
3379 ("menu_toggle_minimap", "minimap", _("Minimap"))),
3380-m_toggle_message_menu
3381+toggle_message_menu_
3382 (INIT_BTN
3383 ("menu_toggle_oldmessage_menu", "messages", _("Messages"))),
3384-m_toggle_help
3385+toggle_help_
3386 (INIT_BTN
3387 ("menu_help", "help", _("Tribal Encyclopedia")))
3388
3389 {
3390- m_toggle_chat.sigclicked.connect
3391+ toggle_chat_.sigclicked.connect
3392 (boost::bind(&InteractivePlayer::toggle_chat, this));
3393- m_toggle_options_menu.sigclicked.connect
3394- (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(m_options)));
3395- m_toggle_statistics_menu.sigclicked.connect
3396- (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(m_statisticsmenu)));
3397- m_toggle_objectives.sigclicked.connect
3398- (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(m_objectives)));
3399- m_toggle_minimap.sigclicked.connect
3400+ toggle_options_menu_.sigclicked.connect
3401+ (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(options_)));
3402+ toggle_statistics_menu_.sigclicked.connect
3403+ (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(statisticsmenu_)));
3404+ toggle_objectives_.sigclicked.connect
3405+ (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(objectives_)));
3406+ toggle_minimap_.sigclicked.connect
3407 (boost::bind(&InteractivePlayer::toggle_minimap, this));
3408- m_toggle_message_menu.sigclicked.connect
3409- (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(m_message_menu)));
3410- m_toggle_help.sigclicked.connect
3411- (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(m_encyclopedia)));
3412+ toggle_message_menu_.sigclicked.connect
3413+ (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(message_menu_)));
3414+ toggle_help_.sigclicked.connect
3415+ (boost::bind(&UI::UniqueWindow::Registry::toggle, boost::ref(encyclopedia_)));
3416
3417 // TODO(unknown): instead of making unneeded buttons invisible after generation,
3418 // they should not at all be generated. -> implement more dynamic toolbar UI
3419- toolbar_.add(&m_toggle_options_menu, UI::Box::AlignLeft);
3420- toolbar_.add(&m_toggle_statistics_menu, UI::Box::AlignLeft);
3421- toolbar_.add(&m_toggle_minimap, UI::Box::AlignLeft);
3422- toolbar_.add(&m_toggle_buildhelp, UI::Box::AlignLeft);
3423+ toolbar_.add(&toggle_options_menu_, UI::Box::AlignLeft);
3424+ toolbar_.add(&toggle_statistics_menu_, UI::Box::AlignLeft);
3425+ toolbar_.add(&toggle_minimap_, UI::Box::AlignLeft);
3426+ toolbar_.add(&toggle_buildhelp_, UI::Box::AlignLeft);
3427 if (multiplayer) {
3428- toolbar_.add(&m_toggle_chat, UI::Box::AlignLeft);
3429- m_toggle_chat.set_visible(false);
3430- m_toggle_chat.set_enabled(false);
3431+ toolbar_.add(&toggle_chat_, UI::Box::AlignLeft);
3432+ toggle_chat_.set_visible(false);
3433+ toggle_chat_.set_enabled(false);
3434 }
3435
3436- toolbar_.add(&m_toggle_help, UI::Box::AlignLeft);
3437- toolbar_.add(&m_toggle_objectives, UI::Box::AlignLeft);
3438- toolbar_.add(&m_toggle_message_menu, UI::Box::AlignLeft);
3439+ toolbar_.add(&toggle_help_, UI::Box::AlignLeft);
3440+ toolbar_.add(&toggle_objectives_, UI::Box::AlignLeft);
3441+ toolbar_.add(&toggle_message_menu_, UI::Box::AlignLeft);
3442
3443 set_player_number(plyn);
3444 fieldclicked.connect(boost::bind(&InteractivePlayer::node_action, this));
3445@@ -148,22 +148,22 @@
3446 registry.on_delete = std::bind(&UI::Button::set_perm_pressed, &btn, false); \
3447 if (registry.window) btn.set_perm_pressed(true); \
3448
3449- INIT_BTN_HOOKS(m_chat, m_toggle_chat)
3450- INIT_BTN_HOOKS(m_options, m_toggle_options_menu)
3451- INIT_BTN_HOOKS(m_statisticsmenu, m_toggle_statistics_menu)
3452- INIT_BTN_HOOKS(minimap_registry(), m_toggle_minimap)
3453- INIT_BTN_HOOKS(m_objectives, m_toggle_objectives)
3454- INIT_BTN_HOOKS(m_encyclopedia, m_toggle_help)
3455- INIT_BTN_HOOKS(m_message_menu, m_toggle_message_menu)
3456+ INIT_BTN_HOOKS(chat_, toggle_chat_)
3457+ INIT_BTN_HOOKS(options_, toggle_options_menu_)
3458+ INIT_BTN_HOOKS(statisticsmenu_, toggle_statistics_menu_)
3459+ INIT_BTN_HOOKS(minimap_registry(), toggle_minimap_)
3460+ INIT_BTN_HOOKS(objectives_, toggle_objectives_)
3461+ INIT_BTN_HOOKS(encyclopedia_, toggle_help_)
3462+ INIT_BTN_HOOKS(message_menu_, toggle_message_menu_)
3463
3464- m_encyclopedia.open_window = [this] {new EncyclopediaWindow(*this, m_encyclopedia);};
3465- m_options.open_window = [this] {new GameOptionsMenu(*this, m_options, m_mainm_windows);};
3466- m_statisticsmenu.open_window = [this] {
3467- new GameMainMenu(*this, m_statisticsmenu, m_mainm_windows);
3468+ encyclopedia_.open_window = [this] {new EncyclopediaWindow(*this, encyclopedia_);};
3469+ options_.open_window = [this] {new GameOptionsMenu(*this, options_, main_windows_);};
3470+ statisticsmenu_.open_window = [this] {
3471+ new GameMainMenu(*this, statisticsmenu_, main_windows_);
3472 };
3473- m_objectives.open_window = [this] {new GameObjectivesMenu(this, m_objectives);};
3474- m_message_menu.open_window = [this] {new GameMessageMenu(*this, m_message_menu);};
3475- m_mainm_windows.stock.open_window = [this] {new StockMenu(*this, m_mainm_windows.stock);};
3476+ objectives_.open_window = [this] {new GameObjectivesMenu(this, objectives_);};
3477+ message_menu_.open_window = [this] {new GameMessageMenu(*this, message_menu_);};
3478+ main_windows_.stock.open_window = [this] {new StockMenu(*this, main_windows_.stock);};
3479
3480 #ifndef NDEBUG // only in debug builds
3481 addCommand
3482@@ -177,46 +177,46 @@
3483 registry.on_create = 0; \
3484 registry.on_delete = 0;
3485
3486- DEINIT_BTN_HOOKS(m_chat, m_toggle_chat)
3487- DEINIT_BTN_HOOKS(m_options, m_toggle_options_menu)
3488- DEINIT_BTN_HOOKS(m_statisticsmenu, m_toggle_statistics_menu)
3489- DEINIT_BTN_HOOKS(minimap_registry(), m_toggle_minimap)
3490- DEINIT_BTN_HOOKS(m_objectives, m_toggle_objectives)
3491- DEINIT_BTN_HOOKS(m_encyclopedia, m_toggle_help)
3492- DEINIT_BTN_HOOKS(m_message_menu, m_toggle_message_menu)
3493+ DEINIT_BTN_HOOKS(chat_, toggle_chat_)
3494+ DEINIT_BTN_HOOKS(options_, toggle_options_menu_)
3495+ DEINIT_BTN_HOOKS(statisticsmenu_, toggle_statistics_menu_)
3496+ DEINIT_BTN_HOOKS(minimap_registry(), toggle_minimap_)
3497+ DEINIT_BTN_HOOKS(objectives_, toggle_objectives_)
3498+ DEINIT_BTN_HOOKS(encyclopedia_, toggle_help_)
3499+ DEINIT_BTN_HOOKS(message_menu_, toggle_message_menu_)
3500 }
3501
3502 void InteractivePlayer::think()
3503 {
3504 InteractiveBase::think();
3505
3506- if (m_flag_to_connect) {
3507- Widelands::Field & field = egbase().map()[m_flag_to_connect];
3508+ if (flag_to_connect_) {
3509+ Widelands::Field & field = egbase().map()[flag_to_connect_];
3510 if (upcast(Widelands::Flag const, flag, field.get_immovable())) {
3511 if (!flag->has_road() && !is_building_road())
3512- if (m_auto_roadbuild_mode) {
3513+ if (auto_roadbuild_mode_) {
3514 // There might be a fieldaction window open, showing a button
3515 // for roadbuilding. If that dialog remains open so that the
3516 // button is clicked, we would enter roadbuilding mode while
3517 // we are already in roadbuilding mode from the call below.
3518 // That is not allowed. Therefore we must delete the
3519 // fieldaction window before entering roadbuilding mode here.
3520- delete m_fieldaction.window;
3521- m_fieldaction.window = nullptr;
3522- warp_mouse_to_node(m_flag_to_connect);
3523+ delete fieldaction_.window;
3524+ fieldaction_.window = nullptr;
3525+ warp_mouse_to_node(flag_to_connect_);
3526 set_sel_pos
3527 (Widelands::NodeAndTriangle<>
3528- (m_flag_to_connect,
3529+ (flag_to_connect_,
3530 Widelands::TCoords<>
3531- (m_flag_to_connect, Widelands::TCoords<>::D)));
3532- start_build_road(m_flag_to_connect, field.get_owned_by());
3533+ (flag_to_connect_, Widelands::TCoords<>::D)));
3534+ start_build_road(flag_to_connect_, field.get_owned_by());
3535 }
3536- m_flag_to_connect = Widelands::Coords::null();
3537+ flag_to_connect_ = Widelands::Coords::null();
3538 }
3539 }
3540 if (is_multiplayer()) {
3541- m_toggle_chat.set_visible(m_chatenabled);
3542- m_toggle_chat.set_enabled(m_chatenabled);
3543+ toggle_chat_.set_visible(chatenabled_);
3544+ toggle_chat_.set_enabled(chatenabled_);
3545 }
3546 {
3547 char const * msg_icon = "pics/menu_toggle_oldmessage_menu.png";
3548@@ -230,8 +230,8 @@
3549 (boost::format(ngettext("%u new message", "%u new messages", nr_new_messages)) %
3550 nr_new_messages).str();
3551 }
3552- m_toggle_message_menu.set_pic(g_gr->images().get(msg_icon));
3553- m_toggle_message_menu.set_tooltip(msg_tooltip);
3554+ toggle_message_menu_.set_pic(g_gr->images().get(msg_icon));
3555+ toggle_message_menu_.set_tooltip(msg_tooltip);
3556 }
3557 }
3558
3559@@ -239,18 +239,18 @@
3560 void InteractivePlayer::popup_message
3561 (Widelands::MessageId const id, const Widelands::Message & message)
3562 {
3563- m_message_menu.create();
3564- dynamic_cast<GameMessageMenu&>(*m_message_menu.window)
3565+ message_menu_.create();
3566+ dynamic_cast<GameMessageMenu&>(*message_menu_.window)
3567 .show_new_message(id, message);
3568 }
3569
3570
3571 // Toolbar button callback functions.
3572 void InteractivePlayer::toggle_chat() {
3573- if (m_chat.window)
3574- delete m_chat.window;
3575+ if (chat_.window)
3576+ delete chat_.window;
3577 else if (chat_provider_)
3578- GameChatMenu::create_chat_console(this, m_chat, *chat_provider_);
3579+ GameChatMenu::create_chat_console(this, chat_, *chat_provider_);
3580 }
3581
3582 bool InteractivePlayer::can_see(Widelands::PlayerNumber const p) const
3583@@ -263,7 +263,7 @@
3584 }
3585 Widelands::PlayerNumber InteractivePlayer::player_number() const
3586 {
3587- return m_player_number;
3588+ return player_number_;
3589 }
3590
3591 int32_t InteractivePlayer::calculate_buildcaps(const Widelands::TCoords<Widelands::FCoords> c) {
3592@@ -289,7 +289,7 @@
3593 }
3594
3595 // everything else can bring up the temporary dialog
3596- show_field_action(this, get_player(), &m_fieldaction);
3597+ show_field_action(this, get_player(), &fieldaction_);
3598 }
3599 }
3600
3601@@ -315,7 +315,7 @@
3602 return true;
3603
3604 case SDLK_i:
3605- m_mainm_windows.stock.toggle();
3606+ main_windows_.stock.toggle();
3607 return true;
3608
3609 case SDLK_m:
3610@@ -323,11 +323,11 @@
3611 return true;
3612
3613 case SDLK_n:
3614- m_message_menu.toggle();
3615+ message_menu_.toggle();
3616 return true;
3617
3618 case SDLK_o:
3619- m_objectives.toggle();
3620+ objectives_.toggle();
3621 return true;
3622
3623 case SDLK_c:
3624@@ -335,16 +335,16 @@
3625 return true;
3626
3627 case SDLK_b:
3628- if (m_mainm_windows.building_stats.window == nullptr) {
3629- new BuildingStatisticsMenu(*this, m_mainm_windows.building_stats);
3630+ if (main_windows_.building_stats.window == nullptr) {
3631+ new BuildingStatisticsMenu(*this, main_windows_.building_stats);
3632 } else {
3633- m_mainm_windows.building_stats.toggle();
3634+ main_windows_.building_stats.toggle();
3635 }
3636 return true;
3637
3638 case SDLK_s:
3639 if (code.mod & (KMOD_LCTRL | KMOD_RCTRL))
3640- new GameMainMenuSaveGame(*this, m_mainm_windows.savegame);
3641+ new GameMainMenuSaveGame(*this, main_windows_.savegame);
3642 else
3643 set_display_flag
3644 (dfShowStatistics, !get_display_flag(dfShowStatistics));
3645@@ -355,16 +355,16 @@
3646 break;
3647 /* no break */
3648 case SDLK_HOME:
3649- move_view_to(game().map().get_starting_pos(m_player_number));
3650+ move_view_to(game().map().get_starting_pos(player_number_));
3651 return true;
3652
3653 case SDLK_KP_ENTER:
3654 case SDLK_RETURN:
3655- if (!chat_provider_ | !m_chatenabled || !is_multiplayer())
3656+ if (!chat_provider_ | !chatenabled_ || !is_multiplayer())
3657 break;
3658
3659- if (!m_chat.window)
3660- GameChatMenu::create_chat_console(this, m_chat, *chat_provider_);
3661+ if (!chat_.window)
3662+ GameChatMenu::create_chat_console(this, chat_, *chat_provider_);
3663
3664 return true;
3665 default:
3666@@ -380,7 +380,7 @@
3667 * player
3668 */
3669 void InteractivePlayer::set_player_number(uint32_t const n) {
3670- m_player_number = n;
3671+ player_number_ = n;
3672 }
3673
3674
3675@@ -404,10 +404,10 @@
3676 }
3677
3678 DebugConsole::write(
3679- str(boost::format("Switching from #%1% to #%2%.") % static_cast<int>(m_player_number) % n));
3680- m_player_number = n;
3681+ str(boost::format("Switching from #%1% to #%2%.") % static_cast<int>(player_number_) % n));
3682+ player_number_ = n;
3683
3684- if (UI::UniqueWindow* const building_statistics_window = m_mainm_windows.building_stats.window) {
3685+ if (UI::UniqueWindow* const building_statistics_window = main_windows_.building_stats.window) {
3686 dynamic_cast<BuildingStatisticsMenu&>(*building_statistics_window).update();
3687 }
3688 }
3689
3690=== modified file 'src/wui/interactive_player.h'
3691--- src/wui/interactive_player.h 2015-11-01 10:11:56 +0000
3692+++ src/wui/interactive_player.h 2016-01-24 20:25:45 +0000
3693@@ -1,5 +1,5 @@
3694 /*
3695- * Copyright (C) 2002-2003, 2006-2010 by the Widelands Development Team
3696+ * Copyright (C) 2002-2016 by the Widelands Development Team
3697 *
3698 * This program is free software; you can redistribute it and/or
3699 * modify it under the terms of the GNU General Public License
3700@@ -63,11 +63,11 @@
3701 bool handle_key(bool down, SDL_Keysym) override;
3702
3703 Widelands::Player & player() const {
3704- return game().player(m_player_number);
3705+ return game().player(player_number_);
3706 }
3707 Widelands::Player * get_player() const override {
3708 assert(&game());
3709- return game().get_player(m_player_number);
3710+ return game().get_player(player_number_);
3711 }
3712
3713 // for savegames
3714@@ -78,7 +78,7 @@
3715 void think() override;
3716
3717 void set_flag_to_connect(Widelands::Coords const location) {
3718- m_flag_to_connect = location;
3719+ flag_to_connect_ = location;
3720 }
3721
3722 void popup_message(Widelands::MessageId, const Widelands::Message &);
3723@@ -87,24 +87,24 @@
3724 private:
3725 void cmdSwitchPlayer(const std::vector<std::string> & args);
3726
3727- Widelands::PlayerNumber m_player_number;
3728- bool m_auto_roadbuild_mode;
3729- Widelands::Coords m_flag_to_connect;
3730-
3731- UI::Button m_toggle_chat;
3732- UI::Button m_toggle_options_menu;
3733- UI::Button m_toggle_statistics_menu;
3734- UI::Button m_toggle_objectives;
3735- UI::Button m_toggle_minimap;
3736- UI::Button m_toggle_message_menu;
3737- UI::Button m_toggle_help;
3738-
3739- UI::UniqueWindow::Registry m_chat;
3740- UI::UniqueWindow::Registry m_options;
3741- UI::UniqueWindow::Registry m_statisticsmenu;
3742- UI::UniqueWindow::Registry m_objectives;
3743- UI::UniqueWindow::Registry m_encyclopedia;
3744- UI::UniqueWindow::Registry m_message_menu;
3745+ Widelands::PlayerNumber player_number_;
3746+ bool auto_roadbuild_mode_;
3747+ Widelands::Coords flag_to_connect_;
3748+
3749+ UI::Button toggle_chat_;
3750+ UI::Button toggle_options_menu_;
3751+ UI::Button toggle_statistics_menu_;
3752+ UI::Button toggle_objectives_;
3753+ UI::Button toggle_minimap_;
3754+ UI::Button toggle_message_menu_;
3755+ UI::Button toggle_help_;
3756+
3757+ UI::UniqueWindow::Registry chat_;
3758+ UI::UniqueWindow::Registry options_;
3759+ UI::UniqueWindow::Registry statisticsmenu_;
3760+ UI::UniqueWindow::Registry objectives_;
3761+ UI::UniqueWindow::Registry encyclopedia_;
3762+ UI::UniqueWindow::Registry message_menu_;
3763 };
3764
3765
3766
3767=== modified file 'src/wui/interactive_spectator.cc'
3768--- src/wui/interactive_spectator.cc 2016-01-16 15:57:31 +0000
3769+++ src/wui/interactive_spectator.cc 2016-01-24 20:25:45 +0000
3770@@ -1,5 +1,5 @@
3771 /*
3772- * Copyright (C) 2007-2011 by the Widelands Development Team
3773+ * Copyright (C) 2007-2016 by the Widelands Development Team
3774 *
3775 * This program is free software; you can redistribute it and/or
3776 * modify it under the terms of the GNU General Public License
3777@@ -49,49 +49,49 @@
3778 g_gr->images().get("pics/" picture ".png"), \
3779 tooltip \
3780
3781- m_toggle_chat
3782+ toggle_chat_
3783 (INIT_BTN("menu_chat", "chat", _("Chat"))),
3784- m_exit
3785+ exit_
3786 (INIT_BTN("menu_exit_game", "exit_replay", _("Exit Replay"))),
3787- m_save
3788+ save_
3789 (INIT_BTN("menu_save_game", "save_game", _("Save Game"))),
3790- m_toggle_options_menu
3791+ toggle_options_menu_
3792 (INIT_BTN("menu_options_menu", "options_menu", _("Options"))),
3793- m_toggle_statistics
3794+ toggle_statistics_
3795 (INIT_BTN("menu_general_stats", "general_stats", _("Statistics"))),
3796- m_toggle_minimap
3797+ toggle_minimap_
3798 (INIT_BTN("menu_toggle_minimap", "minimap", _("Minimap")))
3799 {
3800- m_toggle_chat.sigclicked.connect(boost::bind(&InteractiveSpectator::toggle_chat, this));
3801- m_exit.sigclicked.connect(boost::bind(&InteractiveSpectator::exit_btn, this));
3802- m_save.sigclicked.connect(boost::bind(&InteractiveSpectator::save_btn, this));
3803- m_toggle_options_menu.sigclicked.connect(boost::bind(&InteractiveSpectator::toggle_options_menu, this));
3804- m_toggle_statistics.sigclicked.connect(boost::bind(&InteractiveSpectator::toggle_statistics, this));
3805- m_toggle_minimap.sigclicked.connect(boost::bind(&InteractiveSpectator::toggle_minimap, this));
3806+ toggle_chat_.sigclicked.connect(boost::bind(&InteractiveSpectator::toggle_chat, this));
3807+ exit_.sigclicked.connect(boost::bind(&InteractiveSpectator::exit_btn, this));
3808+ save_.sigclicked.connect(boost::bind(&InteractiveSpectator::save_btn, this));
3809+ toggle_options_menu_.sigclicked.connect(boost::bind(&InteractiveSpectator::toggle_options_menu, this));
3810+ toggle_statistics_.sigclicked.connect(boost::bind(&InteractiveSpectator::toggle_statistics, this));
3811+ toggle_minimap_.sigclicked.connect(boost::bind(&InteractiveSpectator::toggle_minimap, this));
3812
3813 toolbar_.set_layout_toplevel(true);
3814 if (!is_multiplayer()) {
3815- toolbar_.add(&m_exit, UI::Box::AlignLeft);
3816- toolbar_.add(&m_save, UI::Box::AlignLeft);
3817+ toolbar_.add(&exit_, UI::Box::AlignLeft);
3818+ toolbar_.add(&save_, UI::Box::AlignLeft);
3819 } else
3820- toolbar_.add(&m_toggle_options_menu, UI::Box::AlignLeft);
3821- toolbar_.add(&m_toggle_statistics, UI::Box::AlignLeft);
3822- toolbar_.add(&m_toggle_minimap, UI::Box::AlignLeft);
3823- toolbar_.add(&m_toggle_buildhelp, UI::Box::AlignLeft);
3824- toolbar_.add(&m_toggle_chat, UI::Box::AlignLeft);
3825+ toolbar_.add(&toggle_options_menu_, UI::Box::AlignLeft);
3826+ toolbar_.add(&toggle_statistics_, UI::Box::AlignLeft);
3827+ toolbar_.add(&toggle_minimap_, UI::Box::AlignLeft);
3828+ toolbar_.add(&toggle_buildhelp_, UI::Box::AlignLeft);
3829+ toolbar_.add(&toggle_chat_, UI::Box::AlignLeft);
3830
3831 // TODO(unknown): instead of making unneeded buttons invisible after generation,
3832 // they should not at all be generated. -> implement more dynamic toolbar UI
3833 if (is_multiplayer()) {
3834- m_exit.set_visible(false);
3835- m_exit.set_enabled(false);
3836- m_save.set_visible(false);
3837- m_save.set_enabled(false);
3838+ exit_.set_visible(false);
3839+ exit_.set_enabled(false);
3840+ save_.set_visible(false);
3841+ save_.set_enabled(false);
3842 } else {
3843- m_toggle_chat.set_visible(false);
3844- m_toggle_chat.set_enabled(false);
3845- m_toggle_options_menu.set_visible(false);
3846- m_toggle_options_menu.set_enabled(false);
3847+ toggle_chat_.set_visible(false);
3848+ toggle_chat_.set_enabled(false);
3849+ toggle_options_menu_.set_visible(false);
3850+ toggle_options_menu_.set_enabled(false);
3851 }
3852
3853 adjust_toolbar_position();
3854@@ -99,17 +99,17 @@
3855 // Setup all screen elements
3856 fieldclicked.connect(boost::bind(&InteractiveSpectator::node_action, this));
3857
3858-#define INIT_BTN_HOOKS(registry, btn) \
3859- registry.on_create = std::bind(&UI::Button::set_perm_pressed, &btn, true); \
3860- registry.on_delete = std::bind(&UI::Button::set_perm_pressed, &btn, false); \
3861- if (registry.window) \
3862+#define INIT_BTN_HOOKS(registry, btn) \
3863+ registry.on_create = std::bind(&UI::Button::set_perm_pressed, &btn, true); \
3864+ registry.on_delete = std::bind(&UI::Button::set_perm_pressed, &btn, false); \
3865+ if (registry.window) \
3866 btn.set_perm_pressed(true);
3867
3868- INIT_BTN_HOOKS(m_chat, m_toggle_chat)
3869- INIT_BTN_HOOKS(m_options, m_toggle_options_menu)
3870- INIT_BTN_HOOKS(m_mainm_windows.general_stats, m_toggle_statistics)
3871- INIT_BTN_HOOKS(m_mainm_windows.savegame, m_save)
3872- INIT_BTN_HOOKS(minimap_registry(), m_toggle_minimap)
3873+ INIT_BTN_HOOKS(chat_, toggle_chat_)
3874+ INIT_BTN_HOOKS(options_, toggle_options_menu_)
3875+ INIT_BTN_HOOKS(main_windows_.general_stats, toggle_statistics_)
3876+ INIT_BTN_HOOKS(main_windows_.savegame, save_)
3877+ INIT_BTN_HOOKS(minimap_registry(), toggle_minimap_)
3878
3879 }
3880
3881@@ -119,15 +119,15 @@
3882 // buttons. The assertions are safeguards in case somewhere else in the
3883 // code someone would overwrite our hooks.
3884
3885-#define DEINIT_BTN_HOOKS(registry, btn) \
3886- registry.on_create = 0; \
3887+#define DEINIT_BTN_HOOKS(registry, btn) \
3888+ registry.on_create = 0; \
3889 registry.on_delete = 0;
3890
3891- DEINIT_BTN_HOOKS(m_chat, m_toggle_chat)
3892- DEINIT_BTN_HOOKS(m_options, m_toggle_options_menu)
3893- DEINIT_BTN_HOOKS(m_mainm_windows.general_stats, m_toggle_statistics)
3894- DEINIT_BTN_HOOKS(m_mainm_windows.savegame, m_save)
3895- DEINIT_BTN_HOOKS(minimap_registry(), m_toggle_minimap)
3896+ DEINIT_BTN_HOOKS(chat_, toggle_chat_)
3897+ DEINIT_BTN_HOOKS(options_, toggle_options_menu_)
3898+ DEINIT_BTN_HOOKS(main_windows_.general_stats, toggle_statistics_)
3899+ DEINIT_BTN_HOOKS(main_windows_.savegame, save_)
3900+ DEINIT_BTN_HOOKS(minimap_registry(), toggle_minimap_)
3901 }
3902
3903
3904@@ -160,10 +160,10 @@
3905 // Toolbar button callback functions.
3906 void InteractiveSpectator::toggle_chat()
3907 {
3908- if (m_chat.window)
3909- delete m_chat.window;
3910+ if (chat_.window)
3911+ delete chat_.window;
3912 else if (chat_provider_)
3913- GameChatMenu::create_chat_console(this, m_chat, *chat_provider_);
3914+ GameChatMenu::create_chat_console(this, chat_, *chat_provider_);
3915 }
3916
3917
3918@@ -181,10 +181,10 @@
3919 if (is_multiplayer()) {
3920 return;
3921 }
3922- if (m_mainm_windows.savegame.window)
3923- delete m_mainm_windows.savegame.window;
3924+ if (main_windows_.savegame.window)
3925+ delete main_windows_.savegame.window;
3926 else {
3927- new GameMainMenuSaveGame(*this, m_mainm_windows.savegame);
3928+ new GameMainMenuSaveGame(*this, main_windows_.savegame);
3929 }
3930 }
3931
3932@@ -193,18 +193,18 @@
3933 if (!is_multiplayer()) {
3934 return;
3935 }
3936- if (m_options.window)
3937- delete m_options.window;
3938+ if (options_.window)
3939+ delete options_.window;
3940 else
3941- new GameOptionsMenu(*this, m_options, m_mainm_windows);
3942+ new GameOptionsMenu(*this, options_, main_windows_);
3943 }
3944
3945
3946 void InteractiveSpectator::toggle_statistics() {
3947- if (m_mainm_windows.general_stats.window)
3948- delete m_mainm_windows.general_stats.window;
3949+ if (main_windows_.general_stats.window)
3950+ delete main_windows_.general_stats.window;
3951 else
3952- new GeneralStatisticsMenu(*this, m_mainm_windows.general_stats);
3953+ new GeneralStatisticsMenu(*this, main_windows_.general_stats);
3954 }
3955
3956
3957@@ -237,7 +237,7 @@
3958 return;
3959
3960 // everything else can bring up the temporary dialog
3961- show_field_action(this, nullptr, &m_fieldaction);
3962+ show_field_action(this, nullptr, &fieldaction_);
3963 }
3964
3965
3966@@ -262,7 +262,7 @@
3967
3968 case SDLK_s:
3969 if (code.mod & (KMOD_LCTRL | KMOD_RCTRL)) {
3970- new GameMainMenuSaveGame(*this, m_mainm_windows.savegame);
3971+ new GameMainMenuSaveGame(*this, main_windows_.savegame);
3972 } else
3973 set_display_flag
3974 (dfShowStatistics, !get_display_flag(dfShowStatistics));
3975@@ -270,13 +270,13 @@
3976
3977 case SDLK_RETURN:
3978 case SDLK_KP_ENTER:
3979- if (!chat_provider_ | !m_chatenabled)
3980+ if (!chat_provider_ | !chatenabled_)
3981 break;
3982
3983- if (!m_chat.window)
3984- GameChatMenu::create_chat_console(this, m_chat, *chat_provider_);
3985+ if (!chat_.window)
3986+ GameChatMenu::create_chat_console(this, chat_, *chat_provider_);
3987
3988- dynamic_cast<GameChatMenu*>(m_chat.window)->enter_chat_message();
3989+ dynamic_cast<GameChatMenu*>(chat_.window)->enter_chat_message();
3990 return true;
3991
3992 default:
3993
3994=== modified file 'src/wui/interactive_spectator.h'
3995--- src/wui/interactive_spectator.h 2015-11-01 10:11:56 +0000
3996+++ src/wui/interactive_spectator.h 2016-01-24 20:25:45 +0000
3997@@ -1,5 +1,5 @@
3998 /*
3999- * Copyright (C) 2002-2003, 2006-2008 by the Widelands Development Team
4000+ * Copyright (C) 2002-2016 by the Widelands Development Team
4001 *
4002 * This program is free software; you can redistribute it and/or
4003 * modify it under the terms of the GNU General Public License
4004@@ -58,16 +58,16 @@
4005 void node_action() override;
4006
4007 private:
4008- UI::Button m_toggle_chat;
4009- UI::Button m_exit;
4010- UI::Button m_save;
4011- UI::Button m_toggle_options_menu;
4012- UI::Button m_toggle_statistics;
4013- UI::Button m_toggle_minimap;
4014-
4015-
4016- UI::UniqueWindow::Registry m_chat;
4017- UI::UniqueWindow::Registry m_options;
4018+ UI::Button toggle_chat_;
4019+ UI::Button exit_;
4020+ UI::Button save_;
4021+ UI::Button toggle_options_menu_;
4022+ UI::Button toggle_statistics_;
4023+ UI::Button toggle_minimap_;
4024+
4025+
4026+ UI::UniqueWindow::Registry chat_;
4027+ UI::UniqueWindow::Registry options_;
4028 };
4029
4030
4031
4032=== modified file 'src/wui/itemwaresdisplay.cc'
4033--- src/wui/itemwaresdisplay.cc 2016-01-17 19:54:32 +0000
4034+++ src/wui/itemwaresdisplay.cc 2016-01-24 20:25:45 +0000
4035@@ -1,5 +1,5 @@
4036 /*
4037- * Copyright (C) 2011, 2013 by the Widelands Development Team
4038+ * Copyright (C) 2011-2016 by the Widelands Development Team
4039 *
4040 * This program is free software; you can redistribute it and/or
4041 * modify it under the terms of the GNU General Public License
4042@@ -40,9 +40,9 @@
4043 */
4044 ItemWaresDisplay::ItemWaresDisplay(Panel * parent, const Widelands::Player & gplayer) :
4045 Panel(parent, 0, 0, 0, 0),
4046- m_player(gplayer),
4047- m_capacity(0),
4048- m_items_per_row(IWD_DefaultItemsPerRow)
4049+ player_(gplayer),
4050+ capacity_(0),
4051+ items_per_row_(IWD_DefaultItemsPerRow)
4052 {
4053 set_desired_size(2 * IWD_HBorder, 2 * IWD_VBorder);
4054 }
4055@@ -52,8 +52,8 @@
4056 */
4057 void ItemWaresDisplay::clear()
4058 {
4059- if (!m_items.empty()) {
4060- m_items.clear();
4061+ if (!items_.empty()) {
4062+ items_.clear();
4063 update();
4064 }
4065 }
4066@@ -66,8 +66,8 @@
4067 */
4068 void ItemWaresDisplay::set_capacity(uint32_t cap)
4069 {
4070- if (cap != m_capacity) {
4071- m_capacity = cap;
4072+ if (cap != capacity_) {
4073+ capacity_ = cap;
4074 recalc_desired_size();
4075 }
4076 }
4077@@ -77,16 +77,16 @@
4078 */
4079 void ItemWaresDisplay::set_items_per_row(uint32_t nr)
4080 {
4081- if (nr != m_items_per_row) {
4082- m_items_per_row = nr;
4083+ if (nr != items_per_row_) {
4084+ items_per_row_ = nr;
4085 recalc_desired_size();
4086 }
4087 }
4088
4089 void ItemWaresDisplay::recalc_desired_size()
4090 {
4091- uint32_t nrrows = (m_capacity + m_items_per_row - 1) / m_items_per_row;
4092- uint32_t rowitems = m_capacity >= m_items_per_row ? m_items_per_row : m_capacity;
4093+ uint32_t nrrows = (capacity_ + items_per_row_ - 1) / items_per_row_;
4094+ uint32_t rowitems = capacity_ >= items_per_row_ ? items_per_row_ : capacity_;
4095
4096 set_desired_size(2 * IWD_HBorder + rowitems * IWD_ItemWidth, 2 * IWD_VBorder + nrrows * IWD_ItemHeight);
4097 }
4098@@ -99,7 +99,7 @@
4099 Item it;
4100 it.worker = worker;
4101 it.index = index;
4102- m_items.push_back(it);
4103+ items_.push_back(it);
4104 update();
4105 }
4106
4107@@ -109,10 +109,10 @@
4108
4109 dst.fill_rect(Rect(Point(0, 0), get_w(), get_h()), RGBAColor(0, 0, 0, 0));
4110
4111- for (uint32_t idx = 0; idx < m_items.size(); ++idx) {
4112- const Item & it = m_items[idx];
4113- uint32_t row = idx / m_items_per_row;
4114- uint32_t col = idx % m_items_per_row;
4115+ for (uint32_t idx = 0; idx < items_.size(); ++idx) {
4116+ const Item & it = items_[idx];
4117+ uint32_t row = idx / items_per_row_;
4118+ uint32_t col = idx % items_per_row_;
4119
4120 uint32_t x = IWD_HBorder / 2 + col * IWD_ItemWidth;
4121 uint32_t y = IWD_VBorder + row * IWD_ItemHeight;
4122
4123=== modified file 'src/wui/itemwaresdisplay.h'
4124--- src/wui/itemwaresdisplay.h 2015-11-11 09:52:55 +0000
4125+++ src/wui/itemwaresdisplay.h 2016-01-24 20:25:45 +0000
4126@@ -1,5 +1,5 @@
4127 /*
4128- * Copyright (C) 2011 by the Widelands Development Team
4129+ * Copyright (C) 2011-2016 by the Widelands Development Team
4130 *
4131 * This program is free software; you can redistribute it and/or
4132 * modify it under the terms of the GNU General Public License
4133@@ -36,12 +36,12 @@
4134 struct ItemWaresDisplay : UI::Panel {
4135 ItemWaresDisplay(UI::Panel * parent, const Widelands::Player & player);
4136
4137- const Widelands::Player & player() const {return m_player;}
4138+ const Widelands::Player & player() const {return player_;}
4139
4140- uint32_t capacity() const {return m_capacity;}
4141+ uint32_t capacity() const {return capacity_;}
4142 void set_capacity(uint32_t cap);
4143
4144- uint32_t items_per_row() const {return m_items_per_row;}
4145+ uint32_t items_per_row() const {return items_per_row_;}
4146 void set_items_per_row(uint32_t nr);
4147
4148 void clear();
4149@@ -57,10 +57,10 @@
4150
4151 void recalc_desired_size();
4152
4153- const Widelands::Player & m_player;
4154- uint32_t m_capacity;
4155- uint32_t m_items_per_row;
4156- std::vector<Item> m_items;
4157+ const Widelands::Player & player_;
4158+ uint32_t capacity_;
4159+ uint32_t items_per_row_;
4160+ std::vector<Item> items_;
4161 };
4162
4163 #endif // end of include guard: WL_WUI_ITEMWARESDISPLAY_H
4164
4165=== modified file 'src/wui/mapdata.h'
4166--- src/wui/mapdata.h 2016-01-17 08:29:59 +0000
4167+++ src/wui/mapdata.h 2016-01-24 20:25:45 +0000
4168@@ -1,5 +1,5 @@
4169 /*
4170- * Copyright (C) 2002, 2006-2009, 2011, 2014-2015 by the Widelands Development Team
4171+ * Copyright (C) 2002-2016 by the Widelands Development Team
4172 *
4173 * This program is free software; you can redistribute it and/or
4174 * modify it under the terms of the GNU General Public License
4175@@ -36,8 +36,8 @@
4176 * Author data for a map or scenario.
4177 */
4178 struct MapAuthorData {
4179- const std::string& get_names() const {return m_names;}
4180- size_t get_number() const {return m_number;}
4181+ const std::string& get_names() const {return names_;}
4182+ size_t get_number() const {return number_;}
4183
4184 // Parses author list string into localized contatenated list
4185 // string. Use , as list separator and no whitespaces between
4186@@ -45,13 +45,13 @@
4187 MapAuthorData(const std::string& author_list) {
4188 std::vector<std::string> authors;
4189 boost::split(authors, author_list, boost::is_any_of(","));
4190- m_names = i18n::localize_list(authors, i18n::ConcatenateWith::AMPERSAND);
4191- m_number = authors.size();
4192+ names_ = i18n::localize_list(authors, i18n::ConcatenateWith::AMPERSAND);
4193+ number_ = authors.size();
4194 }
4195
4196 private:
4197- std::string m_names;
4198- size_t m_number;
4199+ std::string names_;
4200+ size_t number_;
4201 };
4202
4203 /**
4204
4205=== modified file 'src/wui/mapview.cc'
4206--- src/wui/mapview.cc 2015-03-29 18:07:45 +0000
4207+++ src/wui/mapview.cc 2016-01-24 20:25:45 +0000
4208@@ -33,10 +33,10 @@
4209 MapView::MapView(
4210 UI::Panel* parent, int32_t x, int32_t y, uint32_t w, uint32_t h, InteractiveBase& player)
4211 : UI::Panel(parent, x, y, w, h),
4212- m_renderer(new GameRenderer()),
4213- m_intbase(player),
4214- m_viewpoint(Point(0, 0)),
4215- m_dragging(false) {
4216+ renderer_(new GameRenderer()),
4217+ intbase_(player),
4218+ viewpoint_(Point(0, 0)),
4219+ dragging_(false) {
4220 }
4221
4222 MapView::~MapView()
4223@@ -50,7 +50,7 @@
4224 const Widelands::Map & map = intbase().egbase().map();
4225 Point p;
4226 MapviewPixelFunctions::get_save_pix(map, c, p.x, p.y);
4227- p -= m_viewpoint;
4228+ p -= viewpoint_;
4229
4230 // If the user has scrolled the node outside the viewable area, he most
4231 // surely doesn't want to jump there.
4232@@ -86,15 +86,15 @@
4233 }
4234
4235 if (upcast(InteractivePlayer const, interactive_player, &intbase())) {
4236- m_renderer->rendermap(dst, egbase, m_viewpoint, interactive_player->player());
4237+ renderer_->rendermap(dst, egbase, viewpoint_, interactive_player->player());
4238 } else {
4239- m_renderer->rendermap(dst, egbase, m_viewpoint);
4240+ renderer_->rendermap(dst, egbase, viewpoint_);
4241 }
4242 }
4243
4244 void MapView::set_changeview(const MapView::ChangeViewFn & fn)
4245 {
4246- m_changeview = fn;
4247+ changeview_ = fn;
4248 }
4249
4250 /*
4251@@ -104,22 +104,22 @@
4252 */
4253 void MapView::set_viewpoint(Point vp, bool jump)
4254 {
4255- if (vp == m_viewpoint)
4256+ if (vp == viewpoint_)
4257 return;
4258
4259 MapviewPixelFunctions::normalize_pix(intbase().egbase().map(), vp);
4260- m_viewpoint = vp;
4261+ viewpoint_ = vp;
4262
4263- if (m_changeview)
4264- m_changeview(vp, jump);
4265- changeview(m_viewpoint.x, m_viewpoint.y);
4266+ if (changeview_)
4267+ changeview_(vp, jump);
4268+ changeview(viewpoint_.x, viewpoint_.y);
4269 }
4270
4271
4272 void MapView::stop_dragging() {
4273 WLApplication::get()->set_mouse_lock(false);
4274 grab_mouse(false);
4275- m_dragging = false;
4276+ dragging_ = false;
4277 }
4278
4279 /**
4280@@ -138,7 +138,7 @@
4281
4282 fieldclicked();
4283 } else if (btn == SDL_BUTTON_RIGHT) {
4284- m_dragging = true;
4285+ dragging_ = true;
4286 grab_mouse(true);
4287 WLApplication::get()->set_mouse_lock(true);
4288 }
4289@@ -146,7 +146,7 @@
4290 }
4291 bool MapView::handle_mouserelease(const uint8_t btn, int32_t, int32_t)
4292 {
4293- if (btn == SDL_BUTTON_RIGHT && m_dragging)
4294+ if (btn == SDL_BUTTON_RIGHT && dragging_)
4295 stop_dragging();
4296 return true;
4297 }
4298@@ -160,7 +160,7 @@
4299 bool MapView::handle_mousemove
4300 (uint8_t const state, int32_t x, int32_t y, int32_t xdiff, int32_t ydiff)
4301 {
4302- if (m_dragging) {
4303+ if (dragging_) {
4304 if (state & SDL_BUTTON(SDL_BUTTON_RIGHT))
4305 set_rel_viewpoint(Point(xdiff, ydiff), false);
4306 else stop_dragging();
4307@@ -183,8 +183,8 @@
4308 ===============
4309 */
4310 void MapView::track_sel(Point m) {
4311- m += m_viewpoint;
4312- m_intbase.set_sel_pos
4313+ m += viewpoint_;
4314+ intbase_.set_sel_pos
4315 (MapviewPixelFunctions::calc_node_and_triangle
4316 (intbase().egbase().map(), m.x, m.y));
4317 }
4318
4319=== modified file 'src/wui/mapview.h'
4320--- src/wui/mapview.h 2014-11-13 08:25:45 +0000
4321+++ src/wui/mapview.h 2016-01-24 20:25:45 +0000
4322@@ -1,5 +1,5 @@
4323 /*
4324- * Copyright (C) 2002-2004, 2006-2011 by the Widelands Development Team
4325+ * Copyright (C) 2002-2016 by the Widelands Development Team
4326 *
4327 * This program is free software; you can redistribute it and/or
4328 * modify it under the terms of the GNU General Public License
4329@@ -63,10 +63,10 @@
4330 void warp_mouse_to_node(Widelands::Coords);
4331
4332 void set_viewpoint(Point vp, bool jump);
4333- void set_rel_viewpoint(Point r, bool jump) {set_viewpoint(m_viewpoint + r, jump);}
4334+ void set_rel_viewpoint(Point r, bool jump) {set_viewpoint(viewpoint_ + r, jump);}
4335
4336- Point get_viewpoint() const {return m_viewpoint;}
4337- bool is_dragging() const {return m_dragging;}
4338+ Point get_viewpoint() const {return viewpoint_;}
4339+ bool is_dragging() const {return dragging_;}
4340
4341 // Drawing
4342 void draw(RenderTarget &) override;
4343@@ -80,16 +80,16 @@
4344 void track_sel(Point m);
4345
4346 protected:
4347- InteractiveBase & intbase() const {return m_intbase;}
4348+ InteractiveBase & intbase() const {return intbase_;}
4349
4350 private:
4351 void stop_dragging();
4352
4353- std::unique_ptr<GameRenderer> m_renderer;
4354- InteractiveBase & m_intbase;
4355- ChangeViewFn m_changeview;
4356- Point m_viewpoint;
4357- bool m_dragging;
4358+ std::unique_ptr<GameRenderer> renderer_;
4359+ InteractiveBase & intbase_;
4360+ ChangeViewFn changeview_;
4361+ Point viewpoint_;
4362+ bool dragging_;
4363 };
4364
4365
4366
4367=== modified file 'src/wui/minimap.cc'
4368--- src/wui/minimap.cc 2015-11-28 11:04:12 +0000
4369+++ src/wui/minimap.cc 2016-01-24 20:25:45 +0000
4370@@ -1,5 +1,5 @@
4371 /*
4372- * Copyright (C) 2002-2004, 2006-2011 by the Widelands Development Team
4373+ * Copyright (C) 2002-2016 by the Widelands Development Team
4374 *
4375 * This program is free software; you can redistribute it and/or
4376 * modify it under the terms of the GNU General Public License
4377@@ -36,11 +36,11 @@
4378 InteractiveBase & ibase)
4379 :
4380 UI::Panel (&parent, x, y, 10, 10),
4381- m_ibase (ibase),
4382- m_viewx (0),
4383- m_viewy (0),
4384- m_pic_map_spot(g_gr->images().get("pics/map_spot.png")),
4385- m_flags (flags)
4386+ ibase_ (ibase),
4387+ viewx_ (0),
4388+ viewy_ (0),
4389+ pic_map_spot_(g_gr->images().get("pics/map_spot.png")),
4390+ flags_ (flags)
4391 {}
4392
4393
4394@@ -52,8 +52,8 @@
4395 */
4396 void MiniMap::View::set_view_pos(const int32_t x, const int32_t y)
4397 {
4398- m_viewx = x / TRIANGLE_WIDTH;
4399- m_viewy = y / TRIANGLE_HEIGHT;
4400+ viewx_ = x / TRIANGLE_WIDTH;
4401+ viewy_ = y / TRIANGLE_HEIGHT;
4402
4403 update();
4404 }
4405@@ -62,12 +62,12 @@
4406 void MiniMap::View::draw(RenderTarget & dst)
4407 {
4408 minimap_image_ =
4409- draw_minimap(m_ibase.egbase(),
4410- m_ibase.get_player(),
4411- (*m_flags) & (MiniMapLayer::Zoom2) ?
4412- Point((m_viewx - get_w() / 4), (m_viewy - get_h() / 4)) :
4413- Point((m_viewx - get_w() / 2), (m_viewy - get_h() / 2)),
4414- *m_flags | MiniMapLayer::ViewWindow);
4415+ draw_minimap(ibase_.egbase(),
4416+ ibase_.get_player(),
4417+ (*flags_) & (MiniMapLayer::Zoom2) ?
4418+ Point((viewx_ - get_w() / 4), (viewy_ - get_h() / 4)) :
4419+ Point((viewx_ - get_w() / 2), (viewy_ - get_h() / 2)),
4420+ *flags_ | MiniMapLayer::ViewWindow);
4421 dst.blit(Point(), minimap_image_.get());
4422 }
4423
4424@@ -83,15 +83,15 @@
4425
4426 // calculates the coordinates corresponding to the mouse position
4427 Widelands::Coords c;
4428- if (*m_flags & MiniMapLayer::Zoom2)
4429+ if (*flags_ & MiniMapLayer::Zoom2)
4430 c = Widelands::Coords
4431- (m_viewx + 1 - (get_w() / 2 - x) / 2,
4432- m_viewy + 1 - (get_h() / 2 - y) / 2);
4433+ (viewx_ + 1 - (get_w() / 2 - x) / 2,
4434+ viewy_ + 1 - (get_h() / 2 - y) / 2);
4435 else
4436 c = Widelands::Coords
4437- (m_viewx + 1 - get_w() / 2 + x, m_viewy + 1 - get_h() / 2 + y);
4438+ (viewx_ + 1 - get_w() / 2 + x, viewy_ + 1 - get_h() / 2 + y);
4439
4440- m_ibase.egbase().map().normalize_coords(c);
4441+ ibase_.egbase().map().normalize_coords(c);
4442
4443 dynamic_cast<MiniMap&>(*get_parent()).warpview(c.x * TRIANGLE_WIDTH, c.y * TRIANGLE_HEIGHT);
4444
4445@@ -102,7 +102,7 @@
4446 }
4447
4448 void MiniMap::View::set_zoom(int32_t z) {
4449- const Widelands::Map & map = m_ibase.egbase().map();
4450+ const Widelands::Map & map = ibase_.egbase().map();
4451 set_size((map.get_width() * z), (map.get_height()) * z);
4452 }
4453
4454@@ -129,52 +129,52 @@
4455 inline uint32_t MiniMap::number_of_buttons_per_row() const {return 3;}
4456 inline uint32_t MiniMap::number_of_button_rows () const {return 2;}
4457 inline uint32_t MiniMap::but_w () const {
4458- return m_view.get_w() / number_of_buttons_per_row();
4459+ return view_.get_w() / number_of_buttons_per_row();
4460 }
4461 inline uint32_t MiniMap::but_h () const {return 20;}
4462 MiniMap::MiniMap(InteractiveBase & ibase, Registry * const registry)
4463 :
4464 UI::UniqueWindow(&ibase, "minimap", registry, 0, 0, _("Map")),
4465- m_view(*this, &registry->flags, 0, 0, 0, 0, ibase),
4466+ view_(*this, &registry->flags, 0, 0, 0, 0, ibase),
4467
4468 button_terrn
4469 (this, "terrain",
4470- but_w() * 0, m_view.get_h() + but_h() * 0, but_w(), but_h(),
4471+ but_w() * 0, view_.get_h() + but_h() * 0, but_w(), but_h(),
4472 g_gr->images().get("pics/but0.png"),
4473 g_gr->images().get("pics/button_terrn.png"),
4474 _("Terrain"),
4475 true, false, true),
4476 button_owner
4477 (this, "owner",
4478- but_w() * 1, m_view.get_h() + but_h() * 0, but_w(), but_h(),
4479+ but_w() * 1, view_.get_h() + but_h() * 0, but_w(), but_h(),
4480 g_gr->images().get("pics/but0.png"),
4481 g_gr->images().get("pics/button_owner.png"),
4482 _("Owner"),
4483 true, false, true),
4484 button_flags
4485 (this, "flags",
4486- but_w() * 2, m_view.get_h() + but_h() * 0, but_w(), but_h(),
4487+ but_w() * 2, view_.get_h() + but_h() * 0, but_w(), but_h(),
4488 g_gr->images().get("pics/but0.png"),
4489 g_gr->images().get("pics/button_flags.png"),
4490 _("Flags"),
4491 true, false, true),
4492 button_roads
4493 (this, "roads",
4494- but_w() * 0, m_view.get_h() + but_h() * 1, but_w(), but_h(),
4495+ but_w() * 0, view_.get_h() + but_h() * 1, but_w(), but_h(),
4496 g_gr->images().get("pics/but0.png"),
4497 g_gr->images().get("pics/button_roads.png"),
4498 _("Roads"),
4499 true, false, true),
4500 button_bldns
4501 (this, "buildings",
4502- but_w() * 1, m_view.get_h() + but_h() * 1, but_w(), but_h(),
4503+ but_w() * 1, view_.get_h() + but_h() * 1, but_w(), but_h(),
4504 g_gr->images().get("pics/but0.png"),
4505 g_gr->images().get("pics/button_bldns.png"),
4506 _("Buildings"),
4507 true, false, true),
4508 button_zoom
4509 (this, "zoom",
4510- but_w() * 2, m_view.get_h() + but_h() * 1, but_w(), but_h(),
4511+ but_w() * 2, view_.get_h() + but_h() * 1, but_w(), but_h(),
4512 g_gr->images().get("pics/but0.png"),
4513 g_gr->images().get("pics/button_zoom.png"),
4514 _("Zoom"),
4515@@ -198,37 +198,37 @@
4516
4517
4518 void MiniMap::toggle(MiniMapLayer const button) {
4519- *m_view.m_flags = MiniMapLayer(*m_view.m_flags ^ button);
4520+ *view_.flags_ = MiniMapLayer(*view_.flags_ ^ button);
4521 if (button == MiniMapLayer::Zoom2)
4522 resize();
4523 update_button_permpressed();
4524 }
4525
4526 void MiniMap::resize() {
4527- m_view.set_zoom(*m_view.m_flags & MiniMapLayer::Zoom2 ? 2 : 1);
4528+ view_.set_zoom(*view_.flags_ & MiniMapLayer::Zoom2 ? 2 : 1);
4529 set_inner_size
4530- (m_view.get_w(), m_view.get_h() + number_of_button_rows() * but_h());
4531- button_terrn.set_pos(Point(but_w() * 0, m_view.get_h() + but_h() * 0));
4532+ (view_.get_w(), view_.get_h() + number_of_button_rows() * but_h());
4533+ button_terrn.set_pos(Point(but_w() * 0, view_.get_h() + but_h() * 0));
4534 button_terrn.set_size(but_w(), but_h());
4535- button_owner.set_pos(Point(but_w() * 1, m_view.get_h() + but_h() * 0));
4536+ button_owner.set_pos(Point(but_w() * 1, view_.get_h() + but_h() * 0));
4537 button_owner.set_size(but_w(), but_h());
4538- button_flags.set_pos(Point(but_w() * 2, m_view.get_h() + but_h() * 0));
4539+ button_flags.set_pos(Point(but_w() * 2, view_.get_h() + but_h() * 0));
4540 button_flags.set_size(but_w(), but_h());
4541- button_roads.set_pos(Point(but_w() * 0, m_view.get_h() + but_h() * 1));
4542+ button_roads.set_pos(Point(but_w() * 0, view_.get_h() + but_h() * 1));
4543 button_roads.set_size(but_w(), but_h());
4544- button_bldns.set_pos(Point(but_w() * 1, m_view.get_h() + but_h() * 1));
4545+ button_bldns.set_pos(Point(but_w() * 1, view_.get_h() + but_h() * 1));
4546 button_bldns.set_size(but_w(), but_h());
4547- button_zoom .set_pos(Point(but_w() * 2, m_view.get_h() + but_h() * 1));
4548+ button_zoom .set_pos(Point(but_w() * 2, view_.get_h() + but_h() * 1));
4549 button_zoom .set_size(but_w(), but_h());
4550 move_inside_parent();
4551 }
4552
4553 // Makes the buttons reflect the selected layers
4554 void MiniMap::update_button_permpressed() {
4555- button_terrn.set_perm_pressed(*m_view.m_flags & MiniMapLayer::Terrain);
4556- button_owner.set_perm_pressed(*m_view.m_flags & MiniMapLayer::Owner);
4557- button_flags.set_perm_pressed(*m_view.m_flags & MiniMapLayer::Flag);
4558- button_roads.set_perm_pressed(*m_view.m_flags & MiniMapLayer::Road);
4559- button_bldns.set_perm_pressed(*m_view.m_flags & MiniMapLayer::Building);
4560- button_zoom .set_perm_pressed(*m_view.m_flags & MiniMapLayer::Zoom2);
4561+ button_terrn.set_perm_pressed(*view_.flags_ & MiniMapLayer::Terrain);
4562+ button_owner.set_perm_pressed(*view_.flags_ & MiniMapLayer::Owner);
4563+ button_flags.set_perm_pressed(*view_.flags_ & MiniMapLayer::Flag);
4564+ button_roads.set_perm_pressed(*view_.flags_ & MiniMapLayer::Road);
4565+ button_bldns.set_perm_pressed(*view_.flags_ & MiniMapLayer::Building);
4566+ button_zoom .set_perm_pressed(*view_.flags_ & MiniMapLayer::Zoom2);
4567 }
4568
4569=== modified file 'src/wui/minimap.h'
4570--- src/wui/minimap.h 2015-02-20 07:45:49 +0000
4571+++ src/wui/minimap.h 2016-01-24 20:25:45 +0000
4572@@ -1,5 +1,5 @@
4573 /*
4574- * Copyright (C) 2002-2004, 2006, 2008-2011 by the Widelands Development Team
4575+ * Copyright (C) 2002-20116 by the Widelands Development Team
4576 *
4577 * This program is free software; you can redistribute it and/or
4578 * modify it under the terms of the GNU General Public License
4579@@ -46,7 +46,7 @@
4580 boost::signals2::signal<void (int32_t, int32_t)> warpview;
4581
4582 void set_view_pos(int32_t const x, int32_t const y) {
4583- m_view.set_view_pos(x, y);
4584+ view_.set_view_pos(x, y);
4585 }
4586
4587 private:
4588@@ -79,16 +79,16 @@
4589 void set_zoom(int32_t z);
4590
4591 private:
4592- InteractiveBase & m_ibase;
4593- int32_t m_viewx, m_viewy;
4594- const Image* m_pic_map_spot;
4595+ InteractiveBase & ibase_;
4596+ int32_t viewx_, viewy_;
4597+ const Image* pic_map_spot_;
4598
4599 // This needs to be owned since it will be rendered by the RenderQueue
4600 // later, so it must be valid for the whole frame.
4601 std::unique_ptr<Texture> minimap_image_;
4602
4603 public:
4604- MiniMapLayer* m_flags;
4605+ MiniMapLayer* flags_;
4606 };
4607
4608 uint32_t number_of_buttons_per_row() const;
4609@@ -96,7 +96,7 @@
4610 uint32_t but_w () const;
4611 uint32_t but_h () const;
4612
4613- View m_view;
4614+ View view_;
4615 UI::Button button_terrn;
4616 UI::Button button_owner;
4617 UI::Button button_flags;
4618
4619=== modified file 'src/wui/multiplayersetupgroup.cc'
4620--- src/wui/multiplayersetupgroup.cc 2015-12-11 19:06:50 +0000
4621+++ src/wui/multiplayersetupgroup.cc 2016-01-24 20:25:45 +0000
4622@@ -1,5 +1,5 @@
4623 /*
4624- * Copyright (C) 2010-2011 by the Widelands Development Team
4625+ * Copyright (C) 2010-2016 by the Widelands Development Team
4626 *
4627 * This program is free software; you can redistribute it and/or
4628 * modify it under the terms of the GNU General Public License
4629@@ -51,8 +51,8 @@
4630 type_icon(nullptr),
4631 type(nullptr),
4632 s(settings),
4633- m_id(id),
4634- m_save(-2)
4635+ id_(id),
4636+ save_(-2)
4637 {
4638 set_size(w, h);
4639 name = new UI::Textarea
4640@@ -81,7 +81,7 @@
4641
4642 /// Switch human players and spectator
4643 void toggle_type() {
4644- UserSettings us = s->settings().users.at(m_id);
4645+ UserSettings us = s->settings().users.at(id_);
4646 int16_t p = us.position;
4647 if (p == UserSettings::none())
4648 p = -1;
4649@@ -101,7 +101,7 @@
4650
4651 /// Care about visibility and current values
4652 void refresh() {
4653- UserSettings us = s->settings().users.at(m_id);
4654+ UserSettings us = s->settings().users.at(id_);
4655 if (us.position == UserSettings::not_connected()) {
4656 std::string free_i18n = _("free");
4657 std::string free_text =
4658@@ -113,7 +113,7 @@
4659 type_icon->set_visible(false);
4660 } else {
4661 name->set_text(us.name);
4662- if (m_save != us.position) {
4663+ if (save_ != us.position) {
4664 std::string pic;
4665 std::string temp_tooltip;
4666 if (us.position < UserSettings::highest_playernum()) {
4667@@ -127,7 +127,7 @@
4668 }
4669
4670 // Either Button if changeable OR text if not
4671- if (m_id == s->settings().usernum) {
4672+ if (id_ == s->settings().usernum) {
4673 type->set_pic(g_gr->images().get(pic));
4674 type->set_tooltip(temp_tooltip);
4675 type->set_visible(true);
4676@@ -136,7 +136,7 @@
4677 type_icon->set_tooltip(temp_tooltip);
4678 type_icon->set_visible(true);
4679 }
4680- m_save = us.position;
4681+ save_ = us.position;
4682 }
4683 }
4684 }
4685@@ -145,8 +145,8 @@
4686 UI::Icon * type_icon;
4687 UI::Button * type;
4688 GameSettingsProvider * const s;
4689- uint8_t const m_id;
4690- int16_t m_save; // saved position to check rewrite need.
4691+ uint8_t const id_;
4692+ int16_t save_; // saved position to check rewrite need.
4693 };
4694
4695 struct MultiPlayerPlayerGroup : public UI::Box {
4696@@ -165,9 +165,9 @@
4697 init(nullptr),
4698 s(settings),
4699 n(npsb),
4700- m_id(id),
4701- m_tribepics(tp),
4702- m_tribenames(tn)
4703+ id_(id),
4704+ tribepics_(tp),
4705+ tribenames_(tn)
4706 {
4707 set_size(w, h);
4708
4709@@ -217,42 +217,42 @@
4710
4711 /// Toggle through the types
4712 void toggle_type() {
4713- n->toggle_type(m_id);
4714+ n->toggle_type(id_);
4715 }
4716
4717 /// Toggle through the tribes + handle shared in players
4718 void toggle_tribe() {
4719- n->toggle_tribe(m_id);
4720+ n->toggle_tribe(id_);
4721 }
4722
4723 /// Toggle through the initializations
4724 void toggle_init() {
4725- n->toggle_init(m_id);
4726+ n->toggle_init(id_);
4727 }
4728
4729 /// Toggle through the teams
4730 void toggle_team() {
4731- n->toggle_team(m_id);
4732+ n->toggle_team(id_);
4733 }
4734
4735 /// Refresh all user interfaces
4736 void refresh() {
4737 const GameSettings & settings = s->settings();
4738
4739- if (m_id >= settings.players.size()) {
4740+ if (id_ >= settings.players.size()) {
4741 set_visible(false);
4742 return;
4743 }
4744
4745- n->refresh(m_id);
4746+ n->refresh(id_);
4747
4748 set_visible(true);
4749
4750- const PlayerSettings & player_setting = settings.players[m_id];
4751- bool typeaccess = s->can_change_player_state(m_id);
4752- bool tribeaccess = s->can_change_player_tribe(m_id);
4753- bool const initaccess = s->can_change_player_init(m_id);
4754- bool teamaccess = s->can_change_player_team(m_id);
4755+ const PlayerSettings & player_setting = settings.players[id_];
4756+ bool typeaccess = s->can_change_player_state(id_);
4757+ bool tribeaccess = s->can_change_player_tribe(id_);
4758+ bool const initaccess = s->can_change_player_init(id_);
4759+ bool teamaccess = s->can_change_player_team(id_);
4760
4761 type->set_enabled(typeaccess);
4762 if (player_setting.state == PlayerSettings::stateClosed) {
4763@@ -320,21 +320,21 @@
4764 type->set_pic(g_gr->images().get(pic));
4765 if (player_setting.random_tribe) {
4766 std::string random = pgettext("tribe", "Random");
4767- if (!m_tribenames["random"].size())
4768- m_tribepics[random] = g_gr->images().get("pics/random.png");
4769+ if (!tribenames_["random"].size())
4770+ tribepics_[random] = g_gr->images().get("pics/random.png");
4771 tribe->set_tooltip(random.c_str());
4772- tribe->set_pic(m_tribepics[random]);
4773+ tribe->set_pic(tribepics_[random]);
4774 } else {
4775- if (!m_tribenames[player_setting.tribe].size()) {
4776+ if (!tribenames_[player_setting.tribe].size()) {
4777 // get tribes name and picture
4778 i18n::Textdomain td("tribes");
4779 for (const TribeBasicInfo& tribeinfo : settings.tribes) {
4780- m_tribenames[tribeinfo.name] = _(tribeinfo.descname);
4781- m_tribepics[tribeinfo.name] = g_gr->images().get(tribeinfo.icon);
4782+ tribenames_[tribeinfo.name] = _(tribeinfo.descname);
4783+ tribepics_[tribeinfo.name] = g_gr->images().get(tribeinfo.icon);
4784 }
4785 }
4786- tribe->set_tooltip(m_tribenames[player_setting.tribe].c_str());
4787- tribe->set_pic(m_tribepics[player_setting.tribe]);
4788+ tribe->set_tooltip(tribenames_[player_setting.tribe].c_str());
4789+ tribe->set_pic(tribepics_[player_setting.tribe]);
4790 }
4791 tribe->set_flat(false);
4792
4793@@ -375,9 +375,9 @@
4794 UI::Button * team;
4795 GameSettingsProvider * const s;
4796 NetworkPlayerSettingsBackend * const n;
4797- uint8_t const m_id;
4798- std::map<std::string, const Image* > & m_tribepics;
4799- std::map<std::string, std::string> & m_tribenames;
4800+ uint8_t const id_;
4801+ std::map<std::string, const Image* > & tribepics_;
4802+ std::map<std::string, std::string> & tribenames_;
4803 };
4804
4805 MultiPlayerSetupGroup::MultiPlayerSetupGroup
4806@@ -392,9 +392,9 @@
4807 npsb(new NetworkPlayerSettingsBackend(s)),
4808 clientbox(this, 0, buth, UI::Box::Vertical, w / 3, h - buth),
4809 playerbox(this, w * 6 / 15, buth, UI::Box::Vertical, w * 9 / 15, h - buth),
4810-m_buth(buth),
4811-m_fsize(fsize),
4812-m_fname(fname)
4813+buth_(buth),
4814+fsize_(fsize),
4815+fname_(fname)
4816 {
4817 UI::TextStyle tsmaller(UI::TextStyle::makebold(UI::Font::get(fname, fsize * 3 / 4), UI_FONT_CLR_FG));
4818
4819@@ -462,7 +462,7 @@
4820 (&playerbox, i,
4821 0, 0, playerbox.get_w(), buth,
4822 s, npsb.get(),
4823- m_tribepics, m_tribenames);
4824+ tribepics_, tribenames_);
4825 playerbox.add(multi_player_player_groups.at(i), 1);
4826 }
4827 refresh();
4828@@ -488,7 +488,7 @@
4829 for (uint32_t i = 0; i < settings.users.size(); ++i) {
4830 if (!multi_player_client_groups.at(i)) {
4831 multi_player_client_groups.at(i) = new MultiPlayerClientGroup(
4832- &clientbox, i, 0, 0, clientbox.get_w(), m_buth, s, UI::Font::get(m_fname, m_fsize));
4833+ &clientbox, i, 0, 0, clientbox.get_w(), buth_, s, UI::Font::get(fname_, fsize_));
4834 clientbox.add(&*multi_player_client_groups.at(i), 1);
4835 }
4836 multi_player_client_groups.at(i)->refresh();
4837
4838=== modified file 'src/wui/multiplayersetupgroup.h'
4839--- src/wui/multiplayersetupgroup.h 2015-01-21 21:21:46 +0000
4840+++ src/wui/multiplayersetupgroup.h 2016-01-24 20:25:45 +0000
4841@@ -1,5 +1,5 @@
4842 /*
4843- * Copyright (C) 2010 by the Widelands Development Team
4844+ * Copyright (C) 2010-2016 by the Widelands Development Team
4845 *
4846 * This program is free software; you can redistribute it and/or
4847 * modify it under the terms of the GNU General Public License
4848@@ -64,11 +64,11 @@
4849 UI::Box clientbox, playerbox;
4850 std::vector<UI::Textarea *> labels;
4851
4852- uint32_t m_buth, m_fsize;
4853- std::string m_fname;
4854+ uint32_t buth_, fsize_;
4855+ std::string fname_;
4856
4857- std::map<std::string, const Image* > m_tribepics;
4858- std::map<std::string, std::string> m_tribenames;
4859+ std::map<std::string, const Image* > tribepics_;
4860+ std::map<std::string, std::string> tribenames_;
4861 };
4862
4863
4864
4865=== modified file 'src/wui/playerdescrgroup.cc'
4866--- src/wui/playerdescrgroup.cc 2016-01-17 09:54:31 +0000
4867+++ src/wui/playerdescrgroup.cc 2016-01-24 20:25:45 +0000
4868@@ -180,16 +180,16 @@
4869 d->btnPlayerType->set_title(title);
4870
4871 TribeBasicInfo info = Widelands::Tribes::tribeinfo(player.tribe);
4872- if (!m_tribenames[player.tribe].size()) {
4873+ if (!tribenames_[player.tribe].size()) {
4874 // Tribe's localized name
4875- m_tribenames[player.tribe] = info.descname;
4876+ tribenames_[player.tribe] = info.descname;
4877 }
4878 if (player.random_tribe) {
4879 d->btnPlayerTribe->set_title(pgettext("tribe", "Random"));
4880 d->btnPlayerTribe->set_tooltip(_("The tribe will be set at random."));
4881 } else {
4882 i18n::Textdomain td("tribes");
4883- d->btnPlayerTribe->set_title(_(m_tribenames[player.tribe]));
4884+ d->btnPlayerTribe->set_title(_(tribenames_[player.tribe]));
4885 d->btnPlayerTribe->set_tooltip(info.tooltip);
4886 }
4887
4888
4889=== modified file 'src/wui/playerdescrgroup.h'
4890--- src/wui/playerdescrgroup.h 2014-12-06 12:22:35 +0000
4891+++ src/wui/playerdescrgroup.h 2016-01-24 20:25:45 +0000
4892@@ -1,5 +1,5 @@
4893 /*
4894- * Copyright (C) 2002, 2006, 2008, 2010 by the Widelands Development Team
4895+ * Copyright (C) 2002-2016 by the Widelands Development Team
4896 *
4897 * This program is free software; you can redistribute it and/or
4898 * modify it under the terms of the GNU General Public License
4899@@ -55,7 +55,7 @@
4900 void toggle_playerteam();
4901
4902 PlayerDescriptionGroupImpl * d;
4903- std::map<std::string, std::string> m_tribenames;
4904+ std::map<std::string, std::string> tribenames_;
4905 };
4906
4907
4908
4909=== modified file 'src/wui/plot_area.cc'
4910--- src/wui/plot_area.cc 2016-01-18 19:35:25 +0000
4911+++ src/wui/plot_area.cc 2016-01-24 20:25:45 +0000
4912@@ -1,5 +1,5 @@
4913 /*
4914- * Copyright (C) 2002-2004, 2008-2013 by the Widelands Development Team
4915+ * Copyright (C) 2002-2016 by the Widelands Development Team
4916 *
4917 * This program is free software; you can redistribute it and/or
4918 * modify it under the terms of the GNU General Public License
4919@@ -247,10 +247,10 @@
4920 int32_t const x, int32_t const y, int32_t const w, int32_t const h)
4921 :
4922 UI::Panel (parent, x, y, w, h),
4923-m_plotmode(PLOTMODE_ABSOLUTE),
4924-m_sample_rate(0),
4925-m_time (TIME_GAME),
4926-m_game_time_id(0)
4927+plotmode_(PLOTMODE_ABSOLUTE),
4928+sample_rate_(0),
4929+time_ (TIME_GAME),
4930+game_time_id_(0)
4931 {}
4932
4933
4934@@ -258,15 +258,15 @@
4935 uint32_t game_time = 0;
4936
4937 // Find running time of the game, based on the plot data
4938- for (uint32_t plot = 0; plot < m_plotdata.size(); ++plot)
4939- if (game_time < m_plotdata[plot].dataset->size() * m_sample_rate)
4940- game_time = m_plotdata[plot].dataset->size() * m_sample_rate;
4941+ for (uint32_t plot = 0; plot < plotdata_.size(); ++plot)
4942+ if (game_time < plotdata_[plot].dataset->size() * sample_rate_)
4943+ game_time = plotdata_[plot].dataset->size() * sample_rate_;
4944 return game_time;
4945 }
4946
4947 std::vector<std::string> WuiPlotArea::get_labels() {
4948 std::vector<std::string> labels;
4949- for (int32_t i = 0; i < m_game_time_id; i++) {
4950+ for (int32_t i = 0; i < game_time_id_; i++) {
4951 UNIT unit = get_suggested_unit(time_in_ms[i]);
4952 uint32_t val = ms_to_unit(unit, time_in_ms[i]);
4953 labels.push_back((boost::format(get_unit_name(unit)) % boost::lexical_cast<std::string>(val)).str());
4954@@ -276,7 +276,7 @@
4955 }
4956
4957 uint32_t WuiPlotArea::get_plot_time() {
4958- if (m_time == TIME_GAME) {
4959+ if (time_ == TIME_GAME) {
4960 // Start with the game time
4961 uint32_t time_ms = get_game_time();
4962
4963@@ -297,7 +297,7 @@
4964 }
4965 return time_ms;
4966 } else {
4967- return time_in_ms[m_time];
4968+ return time_in_ms[time_];
4969 }
4970 }
4971
4972@@ -316,8 +316,8 @@
4973 uint32_t i;
4974 for (i = 1; i < 7 && time_in_ms[i] <= game_time; i++) {
4975 }
4976- m_game_time_id = i;
4977- return m_game_time_id;
4978+ game_time_id_ = i;
4979+ return game_time_id_;
4980 }
4981
4982 /*
4983@@ -331,22 +331,22 @@
4984 draw_diagram(time_ms, get_inner_w(), get_inner_h(), xline_length, dst);
4985
4986 // How many do we take together when relative ploting
4987- const int32_t how_many = calc_how_many(time_ms, m_sample_rate);
4988+ const int32_t how_many = calc_how_many(time_ms, sample_rate_);
4989
4990 uint32_t max = 0;
4991 // Find the maximum value.
4992- if (m_plotmode == PLOTMODE_ABSOLUTE) {
4993- for (uint32_t i = 0; i < m_plotdata.size(); ++i)
4994- if (m_plotdata[i].showplot) {
4995- for (uint32_t l = 0; l < m_plotdata[i].dataset->size(); ++l)
4996- if (max < (*m_plotdata[i].dataset)[l])
4997- max = (*m_plotdata[i].dataset)[l];
4998+ if (plotmode_ == PLOTMODE_ABSOLUTE) {
4999+ for (uint32_t i = 0; i < plotdata_.size(); ++i)
5000+ if (plotdata_[i].showplot) {
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: